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 { CounterSkill, Attack, Control, GainsSkill, SufPassiveSkill, Vampire, PrePassiveSkill } from './base';
|
|
|
|
import i18n from '../i18n';
|
|
|
|
import { BattleRole, callDmgPercent, replace } from '@/tool';
|
|
|
|
const { t } = i18n;
|
|
|
|
|
|
|
|
export class Xianglong extends PrePassiveSkill {
|
|
|
|
name: string = 'xianglong';
|
|
|
|
hpPercent: number = 30;
|
|
|
|
dmgPercent: number = 100;
|
|
|
|
last: number = 1;
|
|
|
|
desc(): string {
|
|
|
|
return replace(t('skill.xianglong.1'), [this.hpPercent, this.dmgPercent]);
|
|
|
|
}
|
|
|
|
trigger(owner: BattleRole, target: BattleRole): boolean {
|
|
|
|
return owner.attr.curHp / owner.attr.hp < this.hpPercent / 100;
|
|
|
|
}
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void {
|
|
|
|
const extra = owner.extraAttr;
|
|
|
|
extra.dmgPercent = callDmgPercent(extra.dmgPercent, this.dmgPercent);
|
|
|
|
owner.battleLog(replace(t('skill.xianglong.2'), [this.hpPercent, this.dmgPercent]));
|
|
|
|
}
|
|
|
|
}
|