This commit is contained in:
muscode13 2024-10-28 00:04:32 -06:00
parent b86cefbae6
commit d382e2747f
3 changed files with 10 additions and 10 deletions

View File

@ -2951,8 +2951,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source
case BattlerTagType.GORILLA_TACTICS:
return new GorillaTacticsTag();
case BattlerTagType.UNBURDEN:
return new UnburdenTag();
case BattlerTagType.SUBSTITUTE:
return new UnburdenTag();
case BattlerTagType.SUBSTITUTE:
return new SubstituteTag(sourceMove, sourceId);
case BattlerTagType.AUTOTOMIZED:
return new AutotomizedTag();

View File

@ -76,7 +76,7 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc {
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(),
hpHealed.value, i18next.t("battle:hpHealBerry", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), berryName: getBerryName(berryType) }), true));
applyPostItemLostAbAttrs(PostItemLostAbAttr, pokemon, pokemon.hasPassive(), false, []);
};
};
case BerryType.LUM:
return (pokemon: Pokemon) => {
if (pokemon.battleData) {
@ -88,7 +88,7 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc {
pokemon.resetStatus(true, true);
pokemon.updateInfo();
applyPostItemLostAbAttrs(PostItemLostAbAttr, pokemon, pokemon.hasPassive(), false, []);
};
};
case BerryType.LIECHI:
case BerryType.GANLON:
case BerryType.PETAYA:
@ -104,7 +104,7 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc {
applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, statStages);
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ stat ], statStages.value));
applyPostItemLostAbAttrs(PostItemLostAbAttr, pokemon, pokemon.hasPassive(), false, []);
};
};
case BerryType.LANSAT:
return (pokemon: Pokemon) => {
if (pokemon.battleData) {
@ -112,7 +112,7 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc {
}
pokemon.addTag(BattlerTagType.CRIT_BOOST);
applyPostItemLostAbAttrs(PostItemLostAbAttr, pokemon, pokemon.hasPassive(), false, []);
};
};
case BerryType.STARF:
return (pokemon: Pokemon) => {
if (pokemon.battleData) {
@ -123,7 +123,7 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc {
applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, stages);
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ randStat ], stages.value));
applyPostItemLostAbAttrs(PostItemLostAbAttr, pokemon, pokemon.hasPassive(), false, []);
};
};
case BerryType.LEPPA:
return (pokemon: Pokemon) => {
if (pokemon.battleData) {

View File

@ -946,9 +946,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
ret >>= 1;
}
if (this.getTag(BattlerTagType.UNBURDEN)) {
ret *= 2;
}
break;
ret *= 2;
}
break;
}
const highestStatBoost = this.findTag(t => t instanceof HighestStatBoostTag && (t as HighestStatBoostTag).stat === stat) as HighestStatBoostTag;