11 changed files with 228 additions and 29 deletions
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
@ -1,22 +1,48 @@
@@ -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); |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue