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, PassiveSkill } from './base';
|
|
|
|
import i18n from '../i18n';
|
|
|
|
import { BattleRole, replace } from '@/tool';
|
|
|
|
const { t } = i18n;
|
|
|
|
|
|
|
|
//断
|
|
|
|
export class Duan extends SufPassiveSkill {
|
|
|
|
name: string = 'duan';
|
|
|
|
rate: number = 10;
|
|
|
|
order: number = 999;
|
|
|
|
dmg: number = 999999999;
|
|
|
|
desc(): string {
|
|
|
|
return replace(t('skill.duan.1'), [this.rate]);
|
|
|
|
}
|
|
|
|
trigger(owner: BattleRole, target: BattleRole): boolean {
|
|
|
|
return target.attr.curHp / target.attr.hp < this.rate / 100;
|
|
|
|
}
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void {
|
|
|
|
target.addHp(-1 * this.dmg);
|
|
|
|
const log = replace(t('skill.duan.2'), [this.rate, this.dmg]);
|
|
|
|
owner.battleLog(log);
|
|
|
|
}
|
|
|
|
}
|