You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { SufPassiveSkill, PrePassiveSkill, CounterSkill } from './base';
|
|
|
|
import i18n from '../i18n';
|
|
|
|
import { BattleRole, replace } from '@/tool';
|
|
|
|
const { t } = i18n;
|
|
|
|
|
|
|
|
export class FuRenPiHu extends PrePassiveSkill {
|
|
|
|
name: string = 'furenpihu';
|
|
|
|
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]);
|
|
|
|
}
|
|
|
|
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]));
|
|
|
|
}
|
|
|
|
}
|