From 5b2925cf853b494730e2010e12b372e58d45bfb0 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 5 Apr 2024 18:48:13 -0400 Subject: [PATCH] Endure updated --- src/data/battler-tags.ts | 2 +- src/field/pokemon.ts | 2 +- src/phases.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 9a3ab9be3..7ac8d1412 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -699,7 +699,7 @@ export class ContactBurnProtectedTag extends ProtectedTag { export class EnduringTag extends BattlerTag { constructor(sourceMove: Moves) { - super(BattlerTagType.ENDURING, BattlerTagLapseType.CUSTOM, 0, sourceMove); + super(BattlerTagType.ENDURING, BattlerTagLapseType.TURN_END, 0, sourceMove); } onAdd(pokemon: Pokemon): void { diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 466cc48cf..8d9bec6d0 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1272,7 +1272,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (this.isFainted()) return 0; - if (this.hp > 1 && this.hp - damage <= 0 && !preventEndure) { + if (this.hp >= 1 && this.hp - damage <= 0 && !preventEndure) { const surviveDamage = new Utils.BooleanHolder(false); if (this.lapseTag(BattlerTagType.ENDURING)) surviveDamage.value = true; diff --git a/src/phases.ts b/src/phases.ts index cb955642a..08721c1e2 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -6,7 +6,7 @@ import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMov import { Mode } from './ui/ui'; import { Command } from "./ui/command-ui-handler"; import { Stat } from "./data/pokemon-stat"; -import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyEndureChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, PokemonFriendshipBoosterModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier } from "./modifier/modifier"; +import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, PokemonFriendshipBoosterModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier } from "./modifier/modifier"; import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler"; import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball"; import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims";