From 1cc9834240baf89a09e305dc99a34192cb4c5988 Mon Sep 17 00:00:00 2001 From: mengyxu Date: Thu, 15 May 2025 00:12:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=A5=9E=E8=AF=9D=E8=A3=85?= =?UTF-8?q?=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增神话装备:狸猫足印、毒蛇、火晶环、刑枷、鬼甲、鱼篮 --- .../equips/pants/{鱼蓝.png => 鱼篮.png} | Bin src/config/equips/bracers.ts | 48 +++++++++++++-- src/config/equips/pants.ts | 23 ++++++- src/config/i18n/zh/euips.ts | 6 +- src/config/i18n/zh/skills.ts | 14 +++-- src/config/skill/base.ts | 11 +++- src/config/skill/bracers.ts | 51 ++++++++++++++- src/config/skill/buff.ts | 58 ++++++++++++++++-- src/config/skill/neck.ts | 8 +-- src/config/skill/pants.ts | 36 +++++++++-- src/tool/caller/battle.ts | 2 +- 11 files changed, 228 insertions(+), 29 deletions(-) rename public/img/equips/pants/{鱼蓝.png => 鱼篮.png} (100%) diff --git a/public/img/equips/pants/鱼蓝.png b/public/img/equips/pants/鱼篮.png similarity index 100% rename from public/img/equips/pants/鱼蓝.png rename to public/img/equips/pants/鱼篮.png diff --git a/src/config/equips/bracers.ts b/src/config/equips/bracers.ts index 2626102..1cb5f5f 100644 --- a/src/config/equips/bracers.ts +++ b/src/config/equips/bracers.ts @@ -7,16 +7,56 @@ const extraEntrys = ['atk', 'crit', 'critDmg', 'hp', 'def', 'atkPercent', 'defPe const coefficient = { shabby: 0.6, ordinary: 0.9, artifact: 1.3, epic: 1.6, unique: 1.8, colorful: 1.8 }; export const bracersColorfulCategorys: Categorys[] = [ + new Categorys( + 'limao', + 'bracers/狸猫足印.png', + [ + { type: 'critDmg', valCoefficient: 1 }, + { type: 'atkPercent', valCoefficient: 1 }, + { type: 'atk', valCoefficient: 1.2 }, + ], + 'LiZhao', + 0.8 + ), + new Categorys( + 'dushe', + 'bracers/毒蛇.png', + [ + { type: 'critDmg', valCoefficient: 1 }, + { type: 'atkPercent', valCoefficient: 0.8 }, + { type: 'atk', valCoefficient: 1.1 }, + ], + 'JuDu', + 0.5 + ), new Categorys( 'xianglong', 'bracers/降龙.png', [ { type: 'critDmg', valCoefficient: 1.2 }, - { type: 'atkPercent', valCoefficient: 0.7 }, + { type: 'atkPercent', valCoefficient: 1 }, { type: 'atk', valCoefficient: 1 }, ], - 'Xianglong' + 'Xianglong', + 0.1 ), + new Categorys( + 'huojing', + 'bracers/火晶环.png', + [ + { type: 'atkPercent', valCoefficient: 1 }, + { type: 'atk', valCoefficient: 1.8 }, + ], + 'DaLiDan' + ), + new Categorys('xingjia', 'bracers/刑枷.png', [ + { type: 'atkPercent', valCoefficient: 1 }, + { type: 'critDmg', valCoefficient: 1.2 }, + { type: 'crit', valCoefficient: 1.2 }, + { type: 'atk', valCoefficient: 1.2 }, + { type: 'hp', valCoefficient: 1.2 }, + { type: 'def', valCoefficient: 1.2 }, + ]), ]; export const bracersUniqueCategorys: Categorys[] = [ new Categorys('duoqing', 'bracers/多情腕.png', [ @@ -31,7 +71,7 @@ export const bracersUniqueCategorys: Categorys[] = [ ]), new Categorys('rsggu', 'bracers/人参果裹布.png', [ { type: 'critDmg', valCoefficient: 1.2 }, - { type: 'atkPercent', valCoefficient: 1.0 }, + { type: 'atkPercent', valCoefficient: 1 }, { type: 'atk', valCoefficient: 0.7 }, ]), new Categorys('yingwu', 'bracers/鹦鹉杯.png', [ @@ -39,7 +79,7 @@ export const bracersUniqueCategorys: Categorys[] = [ { type: 'atk', valCoefficient: 1.6 }, ]), new Categorys('meipusa', 'bracers/美菩萨.png', [ - { type: 'atkPercent', valCoefficient: 1.2 }, + { type: 'atkPercent', valCoefficient: 1 }, { type: 'def', valCoefficient: 0.9 }, { type: 'hp', valCoefficient: 1.2 }, ]), diff --git a/src/config/equips/pants.ts b/src/config/equips/pants.ts index 60cd763..edebdbc 100644 --- a/src/config/equips/pants.ts +++ b/src/config/equips/pants.ts @@ -5,6 +5,17 @@ import { qualitys, extra_entry_num } from './constant'; const extraEntrys = ['atk', 'hp', 'def', 'defPercent', 'hpPercent', 'dmgReduc', 'critAvoid', 'critDmgReduc']; const coefficient = { shabby: 0.7, ordinary: 1, artifact: 1.5, epic: 1.8, unique: 2, colorful: 2 }; export const pantsColorfulCategorys: Categorys[] = [ + new Categorys( + 'guijia', + 'pants/鬼甲.png', + [ + { type: 'def', valCoefficient: 1.5 }, + { type: 'atk', valCoefficient: 1.2 }, + { type: 'hp', valCoefficient: 1.4 }, + ], + 'KongBuLingYu', + 0.98 + ), new Categorys( 'baizhequn', 'pants/奎英的百褶裙.png', @@ -13,7 +24,17 @@ export const pantsColorfulCategorys: Categorys[] = [ { type: 'bloc', valCoefficient: 1.5 }, { type: 'hp', valCoefficient: 1.4 }, ], - 'FuRenPiHu' + 'FuRenBiHu' + ), + new Categorys( + 'yulan', + 'pants/鱼篮.png', + [ + { type: 'def', valCoefficient: 1.2 }, + { type: 'bloc', valCoefficient: 1.3 }, + { type: 'hp', valCoefficient: 1.6 }, + ], + 'LingGan' ), ]; diff --git a/src/config/i18n/zh/euips.ts b/src/config/i18n/zh/euips.ts index 938e2b3..fe041b6 100644 --- a/src/config/i18n/zh/euips.ts +++ b/src/config/i18n/zh/euips.ts @@ -214,11 +214,11 @@ export const shoes = { }; export const bracers = { type: '护腕', + limao: ['狸猫足印', '无声,快速,锐利,不可思议。'], + dushe: ['毒蛇', '即使血是冷的,但你又怎知它不向往温暖。'], xianglong: ['降龙', '见龙在田,利见大人。'], - xingjia: ['刑枷', '我无法为野心套上邢枷,所以只好走向毁灭。'], - xuedun: ['毒蛇', '即使血是冷的,但你又怎知它不向往温暖。'], huojing: ['火晶环', '闻上去有股老君八卦炉中丹屑的味道。'], - limao: ['狸猫足印', '无声,快速,锐利,不可思议。'], + xingjia: ['刑枷', '我无法为野心套上邢枷,所以只好走向毁灭。'], meipusa: ['美菩萨', '是因为美丽?还是因为菩萨?'], rsggu: ['人参果裹步', '不吃也要拿个碗盖好嘛,你看现在爬得满桌都是血...... ----清风'], duoqing: ['多情腕', '多情自古空余恨,此恨绵绵无绝期。'], diff --git a/src/config/i18n/zh/skills.ts b/src/config/i18n/zh/skills.ts index 7fd4724..e5ce2d3 100644 --- a/src/config/i18n/zh/skills.ts +++ b/src/config/i18n/zh/skills.ts @@ -47,26 +47,32 @@ export const vampire = ['汲血', '生命偷取${0}%。', '触发汲血,偷取${ export const prototype = ['现原形', '将目标变为猴子,持续${0}回合,冷却${1}回合,对boss只有${2}%成功率。']; export const critFear = ['暴击恐惧', '暴击时附加${0}%攻击力的额外伤害。', '触发暴击恐惧,附加${0}点伤害']; export const liulipan = ['琉璃盘', '使用后产生黑红内丹,临时提高${0}点基础攻击力进行攻击,冷却${1}回合。']; -export const JHSY = ['镜花水月', '被攻击时有${0}%概率反弹${1}%所受伤害(减伤前)。', '${0}触发了镜花水月,反弹${1}点伤害']; +export const JHSY = ['镜花水月', '被攻击时有${0}%概率反弹${1}%所受伤害。', '${0}触发了镜花水月,反弹${1}点伤害']; +export const lizhao = ['利爪', '被攻击时有${0}%概率增加${1}%技能伤害倍率。', '触发利爪,增加${0}%技能伤害倍率。']; +export const judu = ['剧毒', '被攻击时有${0}%概率喷出毒液,使目标进入溃烂状态${1}回合。', '触发剧毒,${0}进度溃烂状态${1}回合。']; export const xianglong = ['降龙', '攻击时,若生命值低于${0}%,增加${1}%伤害加成。', '触发降龙,增加${1}%伤害加成。']; +export const dalidan = ['大力丹', '提升${0}%攻击加成。']; -export const furenpihu = [ +export const kongbulingyu = ['恐怖领域', '周围敌方目标防御力降低${0}点。', '防御力降低${0}点。']; +export const furenbihu = [ '白骨夫人的庇护', '血量低于${0}%时,获得${1}%伤害减免,持续${2}回合,此效果每场战斗只能触发一次。', '血量低于${0}%,触发白骨夫人的庇护,获得${1}%伤害减免', ]; +export const linggan = ['灵感', '每回合回复${0}%生命。']; -export const atkbuff = ['提升${0}点基础攻击力。', '提升${0}%基础攻击力。']; +export const atkbuff = ['提升${0}点基础攻击力。', '提升${0}%基础攻击力。', '提升${0}%攻击加成。']; export const critbuff = ['提升${0}%暴击率。', '提升${0}%暴击伤害。', '提升${0}%暴击减免。', '提升${0}%暴击伤害减免。']; export const defbuff = ['提升${0}点防御。', '提升${0}%防御。', '获得${0}%伤害减免。']; +export const kuilan = '防御降低${0}%。'; //未实装,待补充 export const ruiyayin = ['锐牙印', '攻击时有${0}概率偷取目标${1}%暴击率,持续${2}回合。']; export const xuanwo = ['漩涡', '攻击时有${0}概率提升${1}%点基础攻击力,持续${2}回合,冷去${3}回合。']; -export const kongbulingyu = ['恐怖领域', '自身防御力提升${0}点,周围敌方目标防御力降低${1}点。']; + export const shichou = ['世仇', '每回合对周围地方目标施加震慑(攻击力降低${0}%)状态,最多叠加${1}层。']; export const nuyi = ['奴役', '攻击时有${0}概率附加尸毒,持续${1}回合,若目标在尸毒持续时间内死亡,则回复所有生命。']; export const jinmaibaolie = ['筋脉爆裂', '攻击时有${0}概率使目标筋脉爆裂,每回合流失%{1}当前生命值,持续${2}回合。']; diff --git a/src/config/skill/base.ts b/src/config/skill/base.ts index b1314aa..a9b89d7 100644 --- a/src/config/skill/base.ts +++ b/src/config/skill/base.ts @@ -76,6 +76,15 @@ export abstract class PassiveSkill implements Skill { afterBattle(owner: BattleRole, target: BattleRole): void {} onAtked(owner: BattleRole, target: BattleRole): void {} } +//战斗开始前触发 +export abstract class StartPassiveSkill extends PassiveSkill { + beforeBattle(owner: BattleRole, target: BattleRole): void { + this.takeEffect(owner, target); + } + trigger(owner: BattleRole, target: BattleRole): boolean { + return true; + } +} //攻击前触发的被动 export abstract class PrePassiveSkill extends PassiveSkill { beforeAtk(owner: BattleRole, target: BattleRole): void { @@ -160,7 +169,7 @@ export class Attack extends ActionSkill { return t('skill.attack.1'); } use(owner: BattleRole, target: BattleRole) { - owner.skillPercent = this.precent; + owner.skillPercent += this.precent; owner.callDmg(target); let critLog = owner.crit ? t('skill.crit.0') : ''; if (owner.dmg) { diff --git a/src/config/skill/bracers.ts b/src/config/skill/bracers.ts index f67a123..f4b7e67 100644 --- a/src/config/skill/bracers.ts +++ b/src/config/skill/bracers.ts @@ -1,8 +1,9 @@ -import { CounterSkill, Attack, Control, GainsSkill, SufPassiveSkill, Vampire, PrePassiveSkill } from './base'; +import { CounterSkill, Attack, Control, GainsSkill, SufPassiveSkill, Vampire, PrePassiveSkill, PassiveSkill, StartPassiveSkill } from './base'; import i18n from '../i18n'; import { BattleRole, callDmgPercent, replace } from '@/tool'; +import { AtkPercentBuff, KuiLan } from './buff'; const { t } = i18n; - +//降龙 export class Xianglong extends PrePassiveSkill { name: string = 'xianglong'; hpPercent: number = 30; @@ -20,3 +21,49 @@ export class Xianglong extends PrePassiveSkill { owner.battleLog(replace(t('skill.xianglong.2'), [this.hpPercent, this.dmgPercent])); } } +//大力丹 +export class DaLiDan extends StartPassiveSkill { + name: string = 'dalidan'; + atkPercent: number = 100; + desc(): string { + return replace(t('skill.dalidan.1'), [this.atkPercent]); + } + takeEffect(owner: BattleRole, target: BattleRole): void { + const dalidan = new AtkPercentBuff(this.name, this.atkPercent, 9999); + owner.putBuff(dalidan); + } +} +//剧毒 +export class JuDu extends CounterSkill { + name: string = 'judu'; + rate: number = 80; + percent: number = 50; + last: number = 2; + desc(): string { + return replace(t('skill.judu.1'), [this.rate, this.last]) + replace(t('skill.kuilan'), [this.percent]); + } + trigger(owner: BattleRole, target: BattleRole): boolean { + return Math.random() < this.rate / 100; + } + takeEffect(owner: BattleRole, target: BattleRole): void { + const judu = new KuiLan('kuilan', this.percent, this.last); + target.putBuff(judu); + owner.battleLog(replace(t('skill.judu.2'), [t(target.type), this.last])); + } +} +//利爪 +export class LiZhao extends PrePassiveSkill { + name: string = 'lizhao'; + rate: number = 30; + percent: number = 100; + desc(): string { + return replace(t('skill.lizhao.1'), [this.rate, this.percent]); + } + trigger(owner: BattleRole, target: BattleRole): boolean { + return owner.action != null && Math.random() < this.rate / 100; + } + takeEffect(owner: BattleRole, target: BattleRole): void { + owner.skillPercent += this.percent; + owner.battleLog(replace(t('skill.lizhao.2'), [this.percent])); + } +} diff --git a/src/config/skill/buff.ts b/src/config/skill/buff.ts index 5410f79..d4df9b2 100644 --- a/src/config/skill/buff.ts +++ b/src/config/skill/buff.ts @@ -53,11 +53,25 @@ export abstract class PercentBuff extends Buff { super(name, last, maxLayer); this.percent = percent; } - abstract desc(): string; - abstract takeEffect(owner: BattleRole): void; } -//攻击增益BUFF -export class AtkPercentBuff extends PercentBuff { +//百分比减益DEBUFF +export abstract class PercentDebuff extends Debuff { + percent: number; + constructor(name: string, percent: number, last: number, maxLayer?: number) { + super(name, last, maxLayer); + this.percent = percent; + } +} +//固定数值减益DEBUFF +export abstract class ConstantDebuff extends Debuff { + number: number; + constructor(name: string, number: number, last: number, maxLayer?: number) { + super(name, last, maxLayer); + this.number = number; + } +} +//基础攻击百分比增益BUFF +export class BaseAtkPercentBuff extends PercentBuff { desc(): string { return replace(t('skill.atkbuff.1'), [this.percent * this.layer]); } @@ -65,6 +79,15 @@ export class AtkPercentBuff extends PercentBuff { owner.extraAttr.baseAtk += (this.percent / 100) * this.layer * owner.attr.baseAtk; } } +//攻击加成增益BUFF +export class AtkPercentBuff extends PercentBuff { + desc(): string { + return replace(t('skill.atkbuff.2'), [this.percent * this.layer]); + } + takeEffect(owner: BattleRole): void { + owner.extraAttr.atkPercent += this.percent; + } +} //爆伤增益BUFF export class CritDmgBuff extends PercentBuff { desc(): string { @@ -110,3 +133,30 @@ export class ControlAbnormal extends Abnormal { owner.action = null; } } +//溃烂 +export class KuiLan extends PercentDebuff { + desc(): string { + return replace(t('skill.kongbulingyu.2'), [this.percent]); + } + takeEffect(owner: BattleRole): void { + owner.extraAttr.def += owner.attr.def * (this.percent / -100); + } +} +//恐怖领域 +export class KBLYDebuff extends ConstantDebuff { + desc(): string { + return replace(t('skill.kongbulingyu.2'), [this.number]); + } + takeEffect(owner: BattleRole): void { + owner.extraAttr.def -= this.number; + } +} +//灵感 +export class LingGanBuff extends PercentBuff { + desc(): string { + return replace(t('skill.linggan.1'), [this.percent]); + } + takeEffect(owner: BattleRole): void { + owner.addHp(Math.ceil(owner.attr.hp * (this.percent / 100))); + } +} diff --git a/src/config/skill/neck.ts b/src/config/skill/neck.ts index f62969b..815ba65 100644 --- a/src/config/skill/neck.ts +++ b/src/config/skill/neck.ts @@ -1,7 +1,7 @@ import { SufPassiveSkill, PassiveSkill, PrePassiveSkill, CounterSkill } from './base'; import i18n from '../i18n'; import { BattleRole, replace } from '@/tool'; -import { AtkPercentBuff, DmgReducBuff } from './buff'; +import { BaseAtkPercentBuff, DmgReducBuff } from './buff'; const { t } = i18n; //断 @@ -57,13 +57,13 @@ export class ShaYi extends SufPassiveSkill { return owner.dmg > 0; } takeEffect(owner: BattleRole, target: BattleRole): void { - const shayi = new AtkPercentBuff(this.name, this.atkPercent, 9999, this.maxLayer); + const shayi = new BaseAtkPercentBuff(this.name, this.atkPercent, 9999, this.maxLayer); owner.putBuff(shayi); owner.battleLog(replace(t('skill.shayi.2'), [shayi.layer])); } onAtked(owner: BattleRole, target: BattleRole): void { if (target.crit) { - const shayi = new AtkPercentBuff(this.name, this.atkPercent, 9999, this.maxLayer); + const shayi = new BaseAtkPercentBuff(this.name, this.atkPercent, 9999, this.maxLayer); shayi.layer = -1 * this.reduc; owner.putBuff(shayi); owner.battleLog(replace(t('skill.shayi.3'), [this.reduc])); @@ -84,7 +84,7 @@ export class NuMu extends CounterSkill { return target.dmg > 0; } takeEffect(owner: BattleRole, target: BattleRole): void { - const numu = new AtkPercentBuff(this.name, this.atkPercent, 9999, this.maxLayer); + const numu = new BaseAtkPercentBuff(this.name, this.atkPercent, 9999, this.maxLayer); owner.putBuff(numu); owner.battleLog(replace(t('skill.numu.2'), [numu.layer])); } diff --git a/src/config/skill/pants.ts b/src/config/skill/pants.ts index f39b91f..6090017 100644 --- a/src/config/skill/pants.ts +++ b/src/config/skill/pants.ts @@ -1,22 +1,48 @@ -import { SufPassiveSkill, PrePassiveSkill, CounterSkill } from './base'; +import { SufPassiveSkill, PrePassiveSkill, CounterSkill, StartPassiveSkill } from './base'; import i18n from '../i18n'; import { BattleRole, replace } from '@/tool'; +import { KBLYDebuff, LingGanBuff } from './buff'; const { t } = i18n; -export class FuRenPiHu extends PrePassiveSkill { - name: string = 'furenpihu'; +//恐怖领域 +export class KongBuLingYu extends StartPassiveSkill { + name: string = 'kongbulingyu'; + defReduc: number = 500; + desc(): string { + return replace(t('skill.kongbulingyu.1'), [this.defReduc]); + } + takeEffect(owner: BattleRole, target: BattleRole): void { + const buff = new KBLYDebuff(this.name, this.defReduc, 9999); + target.putBuff(buff); + } +} +//白骨夫人的庇护 +export class FuRenBiHu extends PrePassiveSkill { + name: string = 'furenbihu'; cd: number = 999; hpPercent: number = 30; last: number = 3; dmgReduc: number = 100; desc(): string { - return replace(t('skill.furenpihu.1'), [this.hpPercent, this.dmgReduc, this.last]); + return replace(t('skill.furenbihu.1'), [this.hpPercent, this.dmgReduc, this.last]); } trigger(owner: BattleRole, target: BattleRole): boolean { return owner.attr.curHp / owner.attr.hp < this.hpPercent / 100; } takeEffect(owner: BattleRole, target: BattleRole): void { owner.extraAttr.dmgReduc = this.dmgReduc; - owner.battleLog(replace(t('skill.furenpihu.2'), [this.hpPercent, this.dmgReduc])); + owner.battleLog(replace(t('skill.furenbihu.2'), [this.hpPercent, this.dmgReduc])); + } +} +//灵感 +export class LingGan extends StartPassiveSkill { + name: string = 'linggan'; + percent: number = 1.5; + desc(): string { + return replace(t('skill.linggan.1'), [this.percent]); + } + takeEffect(owner: BattleRole, target: BattleRole): void { + const linggan = new LingGanBuff(this.name, this.percent, 9999); + owner.putBuff(linggan); } } diff --git a/src/tool/caller/battle.ts b/src/tool/caller/battle.ts index c460393..309e6e1 100644 --- a/src/tool/caller/battle.ts +++ b/src/tool/caller/battle.ts @@ -40,7 +40,7 @@ export class BattleRole { this.extraAttr.hp = 0; this.extraAttr.critDmg = 0; this.shield = Math.ceil(this.shield * 0.9); - this.skillPercent = 100; + this.skillPercent = 0; }; addSkill = (skillName, lv?) => {