From 977a6784b938d12a0d9e75291041211f315a1b6b Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Sat, 31 Aug 2024 15:57:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=94=9F=E5=91=BD=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E4=B8=8A=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/project/enemys.js | 2 +- public/project/floors/MT75.js | 2 +- public/project/floors/MT77.js | 7 ++ public/project/floors/MT78.js | 40 ++++++---- public/project/floors/MT79.js | 123 ++++++++++++++++++++----------- public/project/floors/MT80.js | 110 ++++++++++++++++----------- src/core/render/preset/damage.ts | 12 +++ src/data/desc.json | 3 +- src/game/enemy/damage.ts | 2 + src/game/enemy/special.ts | 3 +- src/game/mechanism/misc.ts | 10 +++ src/ui/statusBar.vue | 4 +- 12 files changed, 218 insertions(+), 100 deletions(-) diff --git a/public/project/enemys.js b/public/project/enemys.js index 99f8fbe..08cb223 100644 --- a/public/project/enemys.js +++ b/public/project/enemys.js @@ -187,7 +187,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "E674": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E675": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E676": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, - "E677": {"name":"骷髅巫师","hp":150000,"atk":2000,"def":5000,"money":5,"exp":600,"point":0,"special":[13]}, + "E677": {"name":"骷髅巫师","hp":150000,"atk":2000,"def":5000,"money":5,"exp":600,"point":0,"special":[13],"crit":null}, "E678": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E679": {"name":"剑盾之卫","hp":30000,"atk":10000,"def":6000,"money":7,"exp":700,"point":0,"special":[1],"crit":600}, "E680": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, diff --git a/public/project/floors/MT75.js b/public/project/floors/MT75.js index fe9aa97..eed50f5 100644 --- a/public/project/floors/MT75.js +++ b/public/project/floors/MT75.js @@ -43,7 +43,7 @@ main.floors.MT75= "map": [ [648,648,648,648,648,648,648,648,648,648,648,648,648,648,648], [648,491,491,494,491,494, 0, 0, 0,494,491,494,491,491,648], - [648,648,648,648,648,648, 0,682, 0,648,648,648,648,648,648], + [648,648,648,648,648,648, 0,682,659,648,648,648,648,648,648], [648,484,484,492,484,492,578,677,679,492,484,492,484,484,648], [648,648,648,648,648,648,618,249,513,648,648,648,648,648,648], [648, 0, 0, 0, 0,103,232,658,671,103, 0, 0, 0, 0,648], diff --git a/public/project/floors/MT77.js b/public/project/floors/MT77.js index b37a2cc..353cbe1 100644 --- a/public/project/floors/MT77.js +++ b/public/project/floors/MT77.js @@ -24,6 +24,13 @@ main.floors.MT77= 0, 7 ] + }, + "12,14": { + "floorId": "MT79", + "loc": [ + 12, + 0 + ] } }, "beforeBattle": {}, diff --git a/public/project/floors/MT78.js b/public/project/floors/MT78.js index a952991..3474ade 100644 --- a/public/project/floors/MT78.js +++ b/public/project/floors/MT78.js @@ -31,6 +31,20 @@ main.floors.MT78= 0, 7 ] + }, + "0,10": { + "floorId": "MT79", + "loc": [ + 14, + 10 + ] + }, + "0,6": { + "floorId": "MT79", + "loc": [ + 14, + 6 + ] } }, "beforeBattle": {}, @@ -42,19 +56,19 @@ main.floors.MT78= "cannotMoveIn": {}, "map": [ [648,648,648, 91,648,648,648,648,648,648,648,648,648,648,648], - [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], - [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], - [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], - [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], - [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], - [ 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], - [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94], - [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], - [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], - [ 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], - [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], - [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], - [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], + [648, 0,648, 0, 0,648, 33, 0,682, 0,484,648,484, 0,648], + [648,482,648, 34, 0,657, 0, 0,648, 28, 0,578, 0, 27,648], + [648, 0,648,648,648,648,648,677,648,648,648,648,648,492,648], + [648, 27, 0,249, 0,648, 29, 0,648, 27,381, 0,381, 28,648], + [648,648,648,648,482,648, 0,648,648,232,648,648,648,648,648], + [ 92, 0,484,648, 28,648, 21, 0,648, 0, 0,648,482, 0,648], + [648, 0, 0,578, 0,648,648,648,648,648, 0,513, 0, 0, 94], + [648,648,648,648,648,648,494, 0, 21,648,484,648,482, 0,648], + [648, 0, 0,677, 0,491, 0,648, 0,648, 0,648,648,494,648], + [ 92, 0,484,648,648,648,659,648,682,648,682,648, 0,381,648], + [648,648,648,648,376,232, 0,648,491,657,491,658,491, 0,648], + [648,376,487,648,378,648,378,648,648,648,648,648,648,677,648], + [648,403,378,618,381,648, 0, 0,679, 0, 0,376, 0, 0,648], [648,648,648,648,648,648,648, 93,648,648,648,648,648,648,648] ], "bgmap": [ diff --git a/public/project/floors/MT79.js b/public/project/floors/MT79.js index 6d1ec18..8826ebc 100644 --- a/public/project/floors/MT79.js +++ b/public/project/floors/MT79.js @@ -1,45 +1,86 @@ main.floors.MT79= { -"floorId": "MT79", -"title": "苍蓝之殿-左上", -"name": "79", -"width": 15, -"height": 15, -"canFlyTo": true, -"canFlyFrom": true, -"canUseQuickShop": true, -"cannotViewMap": false, -"images": [], -"ratio": 8, -"defaultGround": "T650", -"bgm": "palaceNorth.mp3", -"firstArrive": [], -"eachArrive": [], -"parallelDo": "", -"events": {}, -"changeFloor": {}, -"beforeBattle": {}, -"afterBattle": {}, -"afterGetItem": {}, -"afterOpenDoor": {}, -"autoEvent": {}, -"cannotMove": {}, -"cannotMoveIn": {}, -"map": [ - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + "floorId": "MT79", + "title": "苍蓝之殿-左上", + "name": "79", + "width": 15, + "height": 15, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "cannotViewMap": false, + "images": [], + "ratio": 8, + "defaultGround": "T650", + "bgm": "palaceNorth.mp3", + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": {}, + "changeFloor": { + "14,6": { + "floorId": "MT78", + "loc": [ + 0, + 6 + ] + }, + "14,10": { + "floorId": "MT78", + "loc": [ + 0, + 10 + ] + }, + "12,0": { + "floorId": "MT77", + "loc": [ + 12, + 14 + ] + }, + "0,7": { + "floorId": "MT80", + "loc": [ + 14, + 7 + ] + } + }, + "beforeBattle": {}, + "afterBattle": {}, + "afterGetItem": {}, + "afterOpenDoor": {}, + "autoEvent": {}, + "cannotMove": {}, + "cannotMoveIn": {}, + "map": [ + [648,648,648,648,648,648,648,648,648,648,648,648, 91,648,648], + [648, 21, 0,484, 0,648, 0,381, 0, 0,677, 0, 0, 0,648], + [648,648,648,648,671,648,513,648,648,648,648,482, 0,482,648], + [648, 28, 0,648, 27,648, 28,648, 28,484,648,648,648,648,648], + [648, 0, 29,648, 0,484, 0,492, 0, 29, 0,492, 0, 0,648], + [648,648,538,648,494,648,648,648,648,648,658,648, 0, 0,648], + [648, 0, 0,378, 0,648,376, 0,378,648, 0,578, 0, 0, 94], + [ 92, 0,491, 0, 0,648, 0,487, 0,648, 0,648,648,494,648], + [648,671,648,648,232,648,378, 0,376,648,484, 0,648, 0,648], + [648, 28,403,648, 0,648,648,648,648,648,648,682,648, 0,648], + [648,376,491,492, 0,648, 0,482, 0,657, 29, 0,648, 0, 94], + [648,492,648,648,648,648,648,648,648,648, 0,482,492, 0,648], + [648, 0,403,648, 0,648,484, 0,484,648,658,648,648,513,648], + [648, 27,491,599, 28,578, 0, 0, 0,492, 0, 0,484, 0,648], + [648,648,648,648,648,648,648, 93,648,648,648,648,648,648,648] ], + "bgmap": [ + +], + "fgmap": [ + +], + "bg2map": [ + +], + "fg2map": [ + +] } \ No newline at end of file diff --git a/public/project/floors/MT80.js b/public/project/floors/MT80.js index df30cff..4d2d0f6 100644 --- a/public/project/floors/MT80.js +++ b/public/project/floors/MT80.js @@ -1,45 +1,73 @@ main.floors.MT80= { -"floorId": "MT80", -"title": "苍蓝之殿-左上", -"name": "80", -"width": 15, -"height": 15, -"canFlyTo": true, -"canFlyFrom": true, -"canUseQuickShop": true, -"cannotViewMap": false, -"images": [], -"ratio": 8, -"defaultGround": "T650", -"bgm": "palaceNorth.mp3", -"firstArrive": [], -"eachArrive": [], -"parallelDo": "", -"events": {}, -"changeFloor": {}, -"beforeBattle": {}, -"afterBattle": {}, -"afterGetItem": {}, -"afterOpenDoor": {}, -"autoEvent": {}, -"cannotMove": {}, -"cannotMoveIn": {}, -"map": [ - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + "floorId": "MT80", + "title": "苍蓝之殿-左上", + "name": "80", + "width": 15, + "height": 15, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "cannotViewMap": false, + "images": [], + "ratio": 8, + "defaultGround": "T650", + "bgm": "palaceNorth.mp3", + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": { + "7,2": [ + { + "type": "function", + "async": true, + "function": "function(){\nMota.require('module', 'Mechanism').BluePalace.doorConvert(7, 2);\n}" + } + ] + }, + "changeFloor": { + "14,7": { + "floorId": "MT79", + "loc": [ + 0, + 7 + ] + } + }, + "beforeBattle": {}, + "afterBattle": {}, + "afterGetItem": {}, + "afterOpenDoor": {}, + "autoEvent": {}, + "cannotMove": {}, + "cannotMoveIn": {}, + "map": [ + [648,648,648,648,648,648,648,648,648,648,648,648,648,648,648], + [648,381, 0,484, 0,492, 0, 93,513, 0,618, 0, 0, 0,648], + [648,648,648,648,682,648,648,660,648, 0,648,648,648, 0,648], + [648, 0,484,648, 0, 0,648,648,648, 0,648, 0,648, 0,648], + [648, 27, 29,658, 0, 0,672, 0,657, 0,494, 0,599, 0,648], + [648,648,648,648,492,648,648,648,648,232,648,648,648,648,648], + [648, 0,618, 0, 0,648, 0, 0,648, 0, 0, 0,578, 0,648], + [648, 0,648, 0, 0,648, 0, 0,658, 0, 0, 0,648, 0, 94], + [648, 0,648, 0, 0,682, 0, 0,648,492,648,682,648, 0,648], + [648,494,648,648,648,648,659,648,648, 0,648, 0,648, 0,648], + [648, 0,648, 0, 0,682, 0, 0,494, 0,658, 0,657, 0,648], + [648, 0,648,492,648,648,648,232,648,648,648, 0,648,648,648], + [648, 0,648, 0, 0, 0,648, 0, 0, 0,648,682,648, 0,648], + [648, 0,671, 0, 0, 0,232, 0, 0, 0,677,491,578, 0,648], + [648,648,648,648,648,648,648, 93,648,648,648,648,648,648,648] ], + "bgmap": [ + +], + "fgmap": [ + +], + "bg2map": [ + +], + "fg2map": [ + +] } \ No newline at end of file diff --git a/src/core/render/preset/damage.ts b/src/core/render/preset/damage.ts index f0bbfd6..6904813 100644 --- a/src/core/render/preset/damage.ts +++ b/src/core/render/preset/damage.ts @@ -355,6 +355,18 @@ export class Damage extends Sprite { }; block.add(dam3); } + if (real.special.includes(30)) { + const dam4: DamageRenderable = { + align: 'left', + baseline: 'top', + text: '乾', + color: '#FDCD0B', + x: x * this.cellSize + 1, + y: y * this.cellSize - 2, + strokeWidth: 2 + }; + block.add(dam4); + } } /** diff --git a/src/data/desc.json b/src/data/desc.json index 286b79b..0d58486 100644 --- a/src/data/desc.json +++ b/src/data/desc.json @@ -235,7 +235,8 @@ "生命回复指的是勇士每回合回复的生命值。当与怪物战斗时,勇士每回合都会回复对应量的生命值。因此,当吃攻击时,", "与怪物战斗的回合数可能会减少,导致生命回复的总回复量减少。不过大部分情况下不需要在意这一点,", "减少一回合并不会对吸的血造成很大的影响,除了一些特殊情况。", - "该项会显示在状态栏的生命值右方偏下的位置。", + "该项会显示在状态栏的生命值右方偏下的位置。该项不会超过勇士防御的十分之一,如果真实值溢出,那么多余部分会忽略,", + "当防御提高时,其值会一同改变", "
", "
", "3. 额外攻击:", diff --git a/src/game/enemy/damage.ts b/src/game/enemy/damage.ts index decebb0..9b05b87 100644 --- a/src/game/enemy/damage.ts +++ b/src/game/enemy/damage.ts @@ -1053,6 +1053,8 @@ export function calDamageWith( let { atk, def, hpmax, mana } = hero as HeroStatus; let { hp: monHp, atk: monAtk, def: monDef, special, enemy } = info; + hpmax = Math.min(hpmax, def / 10); + let damage = 0; // 饥渴 diff --git a/src/game/enemy/special.ts b/src/game/enemy/special.ts index a1024be..d4ea006 100644 --- a/src/game/enemy/special.ts +++ b/src/game/enemy/special.ts @@ -69,7 +69,8 @@ export const specials: SpecialDeclaration[] = [ code: 8, name: '抱团', desc: enemy => - `怪物周围5×5范围内每有一个拥有该属性的怪物,自身攻防就增加${enemy.together}%(线性叠加)`, + `怪物周围5×5范围内每有一个拥有该属性的怪物(不包括自身),则对方攻防就增加${enemy.together}%(线性叠加)` + + `,受加成怪物会在右上角显示当前周围有多少个怪物`, color: '#fa4' }, { diff --git a/src/game/mechanism/misc.ts b/src/game/mechanism/misc.ts index 886c28d..95b085c 100644 --- a/src/game/mechanism/misc.ts +++ b/src/game/mechanism/misc.ts @@ -100,6 +100,16 @@ export namespace BluePalace { { fx: 2, fy: 9, dir: 'up', tx: 10, ty: 13, toDir: 'right' }, { fx: 10, fy: 8, dir: 'right', tx: 3, ty: 0, toDir: 'down' }, { fx: 1, fy: 0, dir: 'down', tx: 8, ty: 1, toDir: 'left' } + ], + MT78: [ + { fx: 8, fy: 4, dir: 'right', tx: 8, ty: 6, toDir: 'left' }, + { fx: 7, fy: 7, dir: 'up', tx: 1, ty: 0, toDir: 'down' } + ], + MT79: [ + { fx: 5, fy: 10, dir: 'right', tx: 9, ty: 7, toDir: 'left' }, + { fx: 2, fy: 2, dir: 'up', tx: 7, ty: 5, toDir: 'down' }, + { fx: 4, fy: 11, dir: 'up', tx: 5, ty: 7, toDir: 'right' }, + { fx: 7, fy: 11, dir: 'down', tx: 7, ty: 9, toDir: 'up' } ] }; loading.once('coreInit', initPortals); diff --git a/src/ui/statusBar.vue b/src/ui/statusBar.vue index 8e6b8b7..10b7b4a 100644 --- a/src/ui/statusBar.vue +++ b/src/ui/statusBar.vue @@ -37,7 +37,9 @@ +{{ format(hero.hpmax!) }}/t+{{ + format(Math.min(hero.hpmax!, hero.def! / 10)) + }}/t