mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 06:19:29 +02:00
Endure Tokens only endure one hit
This commit is contained in:
parent
6dec84e39c
commit
779075a3dc
@ -1503,8 +1503,8 @@ export class ContactBurnProtectedTag extends DamageProtectedTag {
|
||||
}
|
||||
|
||||
export class EnduringTag extends BattlerTag {
|
||||
constructor(sourceMove: Moves) {
|
||||
super(BattlerTagType.ENDURING, BattlerTagLapseType.TURN_END, 0, sourceMove);
|
||||
constructor(tagType: BattlerTagType, lapseType: BattlerTagLapseType, sourceMove: Moves) {
|
||||
super(tagType, lapseType, 0, sourceMove);
|
||||
}
|
||||
|
||||
onAdd(pokemon: Pokemon): void {
|
||||
@ -3004,7 +3004,9 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source
|
||||
case BattlerTagType.BURNING_BULWARK:
|
||||
return new ContactBurnProtectedTag(sourceMove);
|
||||
case BattlerTagType.ENDURING:
|
||||
return new EnduringTag(sourceMove);
|
||||
return new EnduringTag(tagType, BattlerTagLapseType.TURN_END, sourceMove);
|
||||
case BattlerTagType.ENDURE_TOKEN:
|
||||
return new EnduringTag(tagType, BattlerTagLapseType.AFTER_HIT, sourceMove);
|
||||
case BattlerTagType.STURDY:
|
||||
return new SturdyTag(sourceMove);
|
||||
case BattlerTagType.PERISH_SONG:
|
||||
|
@ -92,4 +92,5 @@ export enum BattlerTagType {
|
||||
COMMANDED = "COMMANDED",
|
||||
GRUDGE = "GRUDGE",
|
||||
PSYCHO_SHIFT = "PSYCHO_SHIFT",
|
||||
ENDURE_TOKEN = "ENDURE_TOKEN",
|
||||
}
|
||||
|
@ -2955,6 +2955,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
surviveDamage.value = this.lapseTag(BattlerTagType.ENDURING);
|
||||
} else if (this.hp > 1 && this.getTag(BattlerTagType.STURDY)) {
|
||||
surviveDamage.value = this.lapseTag(BattlerTagType.STURDY);
|
||||
} else if (this.hp >= 1 && this.getTag(BattlerTagType.ENDURE_TOKEN)) {
|
||||
surviveDamage.value = this.lapseTag(BattlerTagType.ENDURE_TOKEN);
|
||||
}
|
||||
if (!surviveDamage.value) {
|
||||
this.scene.applyModifiers(SurviveDamageModifier, this.isPlayer(), this, surviveDamage);
|
||||
|
@ -3656,7 +3656,7 @@ export class EnemyEndureChanceModifier extends EnemyPersistentModifier {
|
||||
return false;
|
||||
}
|
||||
|
||||
target.addTag(BattlerTagType.ENDURING, 1);
|
||||
target.addTag(BattlerTagType.ENDURE_TOKEN, 1);
|
||||
|
||||
target.battleData.endured = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user