diff --git a/src/config/equips/neck.ts b/src/config/equips/neck.ts index 0c79619..8a9b547 100644 --- a/src/config/equips/neck.ts +++ b/src/config/equips/neck.ts @@ -11,6 +11,17 @@ class NeckCategory extends Categorys { } export const neckColorfulCategorys: Categorys[] = [ + new NeckCategory( + 'chitong', + 'neck/赤瞳金玉坠.png', + [ + { type: 'critDmg', valCoefficient: 0.9 }, + { type: 'atk', valCoefficient: 0.9 }, + { type: 'hp', valCoefficient: 1.2 }, + ], + 'XingYunShuZi', + 0.99 + ), new NeckCategory( 'duanji', 'neck/断·极.png', diff --git a/src/config/i18n/zh/euips.ts b/src/config/i18n/zh/euips.ts index 5a256ed..e831f93 100644 --- a/src/config/i18n/zh/euips.ts +++ b/src/config/i18n/zh/euips.ts @@ -96,12 +96,12 @@ export const armor = { }; export const neck = { type: '项链', + chitong: ['赤瞳金玉坠', '传闻为仙族神器。佩戴者回洞悉敌人的弱点。'], duanji: ['断·极', '若众生都断了情欲,那世间岂不是一色苍凉。'], hushi: ['虎视', '我看见了你,偷丹贼。 ----三仙的丹房'], xuenu: ['血怒', '我们都曾把愤怒埋藏在鲜血里。'], guiyan: ['鬼眼', '多少楼台平山演,鬼使飞阁绿林空。'], longteng: ['龙腾护心镜', '腾龙即出,四海来朝。'], - chitong: ['赤瞳金玉坠', '传闻为仙族神器。佩戴者回洞悉敌人的弱点。'], fannao: ['百八烦恼珠', '求人不如求己。'], zhuxian: ['诛仙', '原来,神的身体流动的血,都是冷的。'], fodengyou: ['佛灯油', '听说灵山永寂,灯影不摇,我若去了,便叫它风起云动。 ----黄风大圣'], diff --git a/src/config/i18n/zh/skills.ts b/src/config/i18n/zh/skills.ts index c22beed..e668251 100644 --- a/src/config/i18n/zh/skills.ts +++ b/src/config/i18n/zh/skills.ts @@ -21,6 +21,12 @@ export const dujunqianneng = ['督军的潜能', '生命值低于${0}%时,获 export const jinguanghushen = ['金光护身', '抵抗一次死亡,并回复${0}%的生命,此效果每场战斗只能触发一次。', '触发金光护身,回复${0}%生命。']; export const laobukepo = ['牢不可破', '提升${0}%格挡值。']; +export const xingyunshuzi = [ + '幸运数字', + '战斗开始时随机获得一个幸运数字,若攻击造成的伤害以幸运数字结尾,则额外造成幸运数字倍伤害。', + '${0}在本场战斗的幸运数字为:${1}。', + '触发幸运数字,对${0}额外造成${1}点伤害', +]; export const duan = ['断', '攻击目标后,若目标血量低于${0}%,则直接处决目标。', '目标血量低于${0}%,触发【断】,造成${1}点伤害']; export const hongyan = ['红眼', '生命低于${0}%时,提高${1}点基础攻击力,且攻击附加${2}%攻击力的伤害。', '血量低于${0}%,触发红眼,附加${1}点伤害。']; export const shayi = [ @@ -82,4 +88,3 @@ export const shichou = ['世仇', '每回合对周围地方目标施加震慑( export const nuyi = ['奴役', '攻击时有${0}概率附加尸毒,持续${1}回合,若目标在尸毒持续时间内死亡,则回复所有生命。']; export const jiupinjinlian = ['九品金莲', '目标死亡时有${0}%概率额外掉一件装备。']; export const zhuanjie = ['黑白钻戒', '获得${0}%伤害减免。']; -export const xingyunshuzi = ['幸运数字', '战斗开始时随机获得${0}个幸运数字,攻击造成的伤害以幸运数字结尾时,????']; diff --git a/src/config/skill/neck.ts b/src/config/skill/neck.ts index 815ba65..6e7e936 100644 --- a/src/config/skill/neck.ts +++ b/src/config/skill/neck.ts @@ -1,8 +1,9 @@ -import { SufPassiveSkill, PassiveSkill, PrePassiveSkill, CounterSkill } from './base'; -import i18n from '../i18n'; +import { SufPassiveSkill, PrePassiveSkill, CounterSkill } from './base'; +import { createt } from '../i18n'; import { BattleRole, replace } from '@/tool'; import { BaseAtkPercentBuff, DmgReducBuff } from './buff'; -const { t } = i18n; +const st = createt('skill.'); +const t = createt(''); //断 export class Duan extends SufPassiveSkill { @@ -11,14 +12,14 @@ export class Duan extends SufPassiveSkill { order: number = 999; dmg: number = 999999999; desc(): string { - return replace(t('skill.duan.1'), [this.hpPercent]); + return replace(st('duan.1'), [this.hpPercent]); } trigger(owner: BattleRole, target: BattleRole): boolean { return owner.dmg > 0 && target.attr.curHp / target.attr.hp < this.hpPercent / 100; } takeEffect(owner: BattleRole, target: BattleRole): void { target.addHp(-1 * this.dmg); - owner.battleLog(replace(t('skill.duan.2'), [this.hpPercent, this.dmg])); + owner.battleLog(replace(st('duan.2'), [this.hpPercent, this.dmg])); } } //红眼 @@ -28,7 +29,7 @@ export class HongYan extends PrePassiveSkill { atk: number = 2000; atkPercent: number = 200; desc(): string { - return replace(t('skill.hongyan.1'), [this.hpPercent, this.atk, this.atkPercent]); + return replace(st('hongyan.1'), [this.hpPercent, this.atk, this.atkPercent]); } trigger(owner: BattleRole, target: BattleRole): boolean { return owner.attr.curHp / owner.attr.hp < this.hpPercent / 100; @@ -40,7 +41,7 @@ export class HongYan extends PrePassiveSkill { if (this.trigger(owner, target)) { const additional = Math.ceil((owner.atk * this.atkPercent) / 100); target.addHp(-1 * additional); - owner.battleLog(replace(t('skill.hongyan.2'), [this.hpPercent, additional])); + owner.battleLog(replace(st('hongyan.2'), [this.hpPercent, additional])); } } } @@ -51,7 +52,7 @@ export class ShaYi extends SufPassiveSkill { maxLayer: number = 10; reduc: number = 3; desc(): string { - return replace(t('skill.shayi.1'), [this.atkPercent, this.reduc, this.maxLayer]); + return replace(st('shayi.1'), [this.atkPercent, this.reduc, this.maxLayer]); } trigger(owner: BattleRole, target: BattleRole): boolean { return owner.dmg > 0; @@ -59,14 +60,14 @@ export class ShaYi extends SufPassiveSkill { takeEffect(owner: BattleRole, target: BattleRole): void { const shayi = new BaseAtkPercentBuff(this.name, this.atkPercent, 9999, this.maxLayer); owner.putBuff(shayi); - owner.battleLog(replace(t('skill.shayi.2'), [shayi.layer])); + owner.battleLog(replace(st('shayi.2'), [shayi.layer])); } onAtked(owner: BattleRole, target: BattleRole): void { if (target.crit) { 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])); + owner.battleLog(replace(st('shayi.3'), [this.reduc])); } } } @@ -78,7 +79,7 @@ export class NuMu extends CounterSkill { layer: number = 0; maxLayer: number = 10; desc(): string { - return replace(t('skill.numu.1'), [this.atkPercent, this.maxLayer]); + return replace(st('numu.1'), [this.atkPercent, this.maxLayer]); } trigger(owner: BattleRole, target: BattleRole): boolean { return target.dmg > 0; @@ -86,17 +87,17 @@ export class NuMu extends CounterSkill { takeEffect(owner: BattleRole, target: BattleRole): void { const numu = new BaseAtkPercentBuff(this.name, this.atkPercent, 9999, this.maxLayer); owner.putBuff(numu); - owner.battleLog(replace(t('skill.numu.2'), [numu.layer])); + owner.battleLog(replace(st('numu.2'), [numu.layer])); } } -//longteng +//龙腾 export class LongTeng extends CounterSkill { name: string = 'longteng'; dmgReduc: number = 8; rate: number = 8; shieldPercentOfHp: number = 8; desc(): string { - return replace(t('skill.longteng.1'), [this.dmgReduc, this.rate, this.shieldPercentOfHp]); + return replace(st('longteng.1'), [this.dmgReduc, this.rate, this.shieldPercentOfHp]); } beforeBattle(owner: BattleRole, target: BattleRole): void { owner.putBuff(new DmgReducBuff(this.name, this.dmgReduc, 9999)); @@ -107,6 +108,26 @@ export class LongTeng extends CounterSkill { takeEffect(owner: BattleRole, target: BattleRole): void { const shield = Math.ceil((owner.attr.hp * this.shieldPercentOfHp) / 100); owner.shield += shield; - owner.battleLog(replace(t('skill.longteng.2'), [shield])); + owner.battleLog(replace(st('longteng.2'), [shield])); + } +} +//幸运数字 +export class XingYunShuZi extends SufPassiveSkill { + name: string = 'xingyunshuzi'; + num: number = 0; + desc(): string { + return st('xingyunshuzi.1'); + } + beforeBattle(owner: BattleRole, target: BattleRole): void { + this.num = Math.ceil(Math.random() * 9); + owner.battleLog(replace(st('xingyunshuzi.2'), [t(owner.type), this.num])); + } + trigger(owner: BattleRole, target: BattleRole): boolean { + return this.num > 0 && owner.dmg % 10 == this.num; + } + takeEffect(owner: BattleRole, target: BattleRole): void { + const dmg = owner.dmg * this.num; + target.addHp(-1 * dmg); + owner.battleLog(replace(st('xingyunshuzi.3'), [t(target.type), dmg])); } }