From 12f85a75dfb34f689a1ba15504f6bbf370c6d91f Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Fri, 26 Apr 2024 19:01:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9D=80=E6=88=AE=E5=85=89=E7=8E=AF?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/_server/table/comment.js | 13 +++++++++++-- public/project/enemys.js | 2 +- public/project/floors/MT51.js | 8 ++------ src/game/enemy/special.ts | 25 ++++++++++++++++++++++++- src/plugin/fx/gameCanvas.ts | 3 ++- src/plugin/shadow/gameShadow.ts | 14 +++++++++++++- src/plugin/ui/book.tsx | 2 +- 7 files changed, 54 insertions(+), 13 deletions(-) diff --git a/public/_server/table/comment.js b/public/_server/table/comment.js index de26e99..f36e8af 100644 --- a/public/_server/table/comment.js +++ b/public/_server/table/comment.js @@ -191,9 +191,18 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_leaf": true, "_type": "popCheckboxSet", "_checkboxSet": function () { + var array = Mota.require('var', 'enemySpecials'); + var b = [], + c = []; + for (var index = 0; index < array.length; index++) { + b.push(index) + var name = array[index].name; + if (name instanceof Function) name = name({}); + c.push(name + "(" + index + ")") + } return { - "prefix": [], - "key": [] + "prefix": c, + "key": b } }, "_data": "特殊属性" diff --git a/public/project/enemys.js b/public/project/enemys.js index 77a2fa5..b767e80 100644 --- a/public/project/enemys.js +++ b/public/project/enemys.js @@ -145,7 +145,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "E593": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E594": {"name":"苍蓝骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E595": {"name":"寒冰兽人","hp":12500,"atk":1800,"def":800,"money":2,"exp":100,"point":0,"special":[7],"hungry":25}, - "E596": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, + "E596": {"name":"苍蓝兽人","hp":10000,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E597": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E598": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E599": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, diff --git a/public/project/floors/MT51.js b/public/project/floors/MT51.js index 5835fba..bbe8532 100644 --- a/public/project/floors/MT51.js +++ b/public/project/floors/MT51.js @@ -16,11 +16,7 @@ main.floors.MT51= "firstArrive": [], "eachArrive": [], "parallelDo": "", - "events": { - "12,6": [ - "当光辉照耀之时,虚像便会消失。" - ] - }, + "events": {}, "changeFloor": { "14,7": { "floorId": "MT50", @@ -44,7 +40,7 @@ main.floors.MT51= [648,648,648,648,648, 0,648,648,648, 0,648,648,648, 0,648], [648, 0, 0, 0,648, 0, 0, 0, 0, 0,648, 0, 0, 0,648], [648, 0,648, 0,648, 0,648,648,648, 0,648, 0, 0, 0,648], - [648, 0,648, 0, 0, 0, 0, 0, 0, 0,648,648,129,648,648], + [648, 0,648, 0, 0, 0, 0, 0, 0, 0,648,648,648,648,648], [648, 0,648, 0,648,648, 0,648, 0,648,648, 0, 0, 0, 94], [648, 0, 0, 0, 0,648, 0,648, 0, 0, 0, 0, 0, 0,648], [648,648,648,648,648,648, 0,648, 0,648,648,648,648,648,648], diff --git a/src/game/enemy/special.ts b/src/game/enemy/special.ts index 1001c4a..9bf18eb 100644 --- a/src/game/enemy/special.ts +++ b/src/game/enemy/special.ts @@ -7,6 +7,10 @@ export interface SpecialDeclaration { color: string; } +const fromFunc = (func: string | ((enemy: Enemy) => string), enemy: Enemy) => { + return typeof func === 'string' ? func : func(enemy); +}; + export const specials: SpecialDeclaration[] = [ { code: 0, @@ -46,7 +50,7 @@ export const specials: SpecialDeclaration[] = [ }, { code: 6, - name: enemy => `${enemy.n}连击`, + name: enemy => `${enemy.n ?? 4}连击`, desc: enemy => `怪物每回合攻击${enemy.n}次`, color: '#fe7' }, @@ -200,5 +204,24 @@ export const specials: SpecialDeclaration[] = [ desc: enemy => `怪物使用苍蓝之灵的力量,使自身受到的伤害减少${enemy.paleShield}%`, color: '#ff6f0a' + }, + { + code: 29, + name: '杀戮光环', + desc: enemy => { + const special = enemy.special; + let str = '
'; + + special.forEach(v => { + const { name, desc, color } = specials[v]; + str += `${fromFunc( + name, + enemy + )}${fromFunc(desc, enemy)}`; + }); + + return str; + }, + color: '#F721F7' } ]; diff --git a/src/plugin/fx/gameCanvas.ts b/src/plugin/fx/gameCanvas.ts index 8f8f8eb..2fef4da 100644 --- a/src/plugin/fx/gameCanvas.ts +++ b/src/plugin/fx/gameCanvas.ts @@ -13,7 +13,8 @@ export function setGameCanvasFilter(filter: string) { } const filterMap: [FloorIds[], string][] = [ - [['MT50'], 'brightness(80%)contrast(120%)'] // 童心佬的滤镜( + [['MT50'], 'brightness(80%)contrast(120%)'], // 童心佬的滤镜( + [['MT51'], 'brightness(90%)contrast(120%)'] // 童心佬的滤镜( ]; export function getCanvasFilterByFloorId( diff --git a/src/plugin/shadow/gameShadow.ts b/src/plugin/shadow/gameShadow.ts index 4c20101..310912c 100644 --- a/src/plugin/shadow/gameShadow.ts +++ b/src/plugin/shadow/gameShadow.ts @@ -84,10 +84,22 @@ const shadowInfo: Partial> = { color: pColor('#e953'), noShelter: true } + ], + MT51: [ + { + id: 'mt51_hero', + x: 0, + y: 0, + decay: 50, + r: 250, + color: 'transparent', + followHero: true + } ] }; const backgroundInfo: Partial> = { - MT50: pColor('#0006') + MT50: pColor('#0006'), + MT51: pColor('#0004') }; const blurInfo: Partial> = {}; const immersionInfo: Partial> = {}; diff --git a/src/plugin/ui/book.tsx b/src/plugin/ui/book.tsx index 09b1af2..068f9d0 100644 --- a/src/plugin/ui/book.tsx +++ b/src/plugin/ui/book.tsx @@ -28,7 +28,7 @@ export const detailInfo: BookDetailInfo = {}; export function getSpecialHint(enemy: ToShowEnemy) { return (
- {enemy.showSpecial.map((v, i) => { + {enemy.special.map((v, i) => { return (