mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-27 02:32:21 +02:00
Rename setAbility to be more accurate
This commit is contained in:
parent
bdd570e415
commit
8fa550ba31
@ -7474,7 +7474,7 @@ export class AbilityGiveAttr extends MoveEffectAttr {
|
|||||||
|
|
||||||
globalScene.queueMessage(i18next.t("moveTriggers:acquiredAbility", { pokemonName: getPokemonNameWithAffix(target), abilityName: allAbilities[user.getAbility().id].name }));
|
globalScene.queueMessage(i18next.t("moveTriggers:acquiredAbility", { pokemonName: getPokemonNameWithAffix(target), abilityName: allAbilities[user.getAbility().id].name }));
|
||||||
|
|
||||||
target.setAbility(user.getAbility());
|
target.setTempAbility(user.getAbility());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -7494,8 +7494,8 @@ export class SwitchAbilitiesAttr extends MoveEffectAttr {
|
|||||||
|
|
||||||
globalScene.queueMessage(i18next.t("moveTriggers:swappedAbilitiesWithTarget", { pokemonName: getPokemonNameWithAffix(user) }));
|
globalScene.queueMessage(i18next.t("moveTriggers:swappedAbilitiesWithTarget", { pokemonName: getPokemonNameWithAffix(user) }));
|
||||||
|
|
||||||
user.setAbility(target.getAbility());
|
user.setTempAbility(target.getAbility());
|
||||||
target.setAbility(tempAbility);
|
target.setTempAbility(tempAbility);
|
||||||
// Swaps Forecast/Flower Gift from Castform/Cherrim
|
// Swaps Forecast/Flower Gift from Castform/Cherrim
|
||||||
globalScene.arena.triggerWeatherBasedFormChangesToNormal();
|
globalScene.arena.triggerWeatherBasedFormChangesToNormal();
|
||||||
// Swaps Forecast/Flower Gift to Castform/Cherrim (edge case)
|
// Swaps Forecast/Flower Gift to Castform/Cherrim (edge case)
|
||||||
|
@ -1434,7 +1434,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
* Sets the {@linkcode Pokemon}'s ability and activates it if it normally activates on summon
|
* Sets the {@linkcode Pokemon}'s ability and activates it if it normally activates on summon
|
||||||
* @param ability New Ability
|
* @param ability New Ability
|
||||||
*/
|
*/
|
||||||
public setAbility(ability: Ability): void {
|
public setTempAbility(ability: Ability): void {
|
||||||
this.summonData.ability = ability.id;
|
this.summonData.ability = ability.id;
|
||||||
|
|
||||||
applyPostSummonAbAttrs(PostSummonAbAttr, this)
|
applyPostSummonAbAttrs(PostSummonAbAttr, this)
|
||||||
|
Loading…
Reference in New Issue
Block a user