Skip to content

Commit fc13771

Browse files
better name
1 parent e638f7e commit fc13771

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/poke_env/battle/pokemon.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Pokemon:
3232
"_last_request",
3333
"_level",
3434
"_max_hp",
35-
"_mega_ability",
35+
"_forme_change_ability",
3636
"_moves",
3737
"_must_recharge",
3838
"_name",
@@ -122,7 +122,7 @@ def __init__(
122122
self._status: Optional[Status] = None
123123
self._status_counter: int = 0
124124
self._temporary_ability: Optional[str] = None
125-
self._mega_ability: Optional[str] = None
125+
self._forme_change_ability: Optional[str] = None
126126
self._temporary_types: List[PokemonType] = []
127127

128128
if request_pokemon:
@@ -489,15 +489,15 @@ def _update_from_pokedex(self, species: str, store_species: bool = True):
489489
or dex_entry["forme"] in ["Primal", "Stellar", "Terastal"]
490490
or dex_entry["forme"].endswith("-Tera")
491491
):
492-
self.mega_ability = dex_entry["abilities"]["0"]
493-
elif self.mega_ability is None:
492+
self.forme_change_ability = dex_entry["abilities"]["0"]
493+
elif self.forme_change_ability is None:
494494
self._possible_abilities = [
495495
to_id_str(ability) for ability in dex_entry["abilities"].values()
496496
]
497497
if len(self._possible_abilities) == 1:
498498
self.ability = self._possible_abilities[0]
499499
else:
500-
self.mega_ability = None
500+
self.forme_change_ability = None
501501

502502
self._heightm = dex_entry["heightm"]
503503
self._weightkg = dex_entry["weightkg"]
@@ -777,8 +777,8 @@ def ability(self) -> Optional[str]:
777777
"""
778778
if self.temporary_ability is not None:
779779
return self.temporary_ability
780-
elif self.mega_ability is not None:
781-
return self.mega_ability
780+
elif self.forme_change_ability is not None:
781+
return self.forme_change_ability
782782
else:
783783
return self._ability
784784

@@ -829,7 +829,7 @@ def base_ability(self) -> Optional[str]:
829829
:return: The pokemon's base ability. None if unknown.
830830
:rtype: str, optional
831831
"""
832-
return self._mega_ability or self._ability
832+
return self._forme_change_ability or self._ability
833833

834834
@property
835835
def base_species(self) -> str:
@@ -987,16 +987,16 @@ def max_hp(self) -> int:
987987
return self._max_hp or 0
988988

989989
@property
990-
def mega_ability(self) -> Optional[str]:
990+
def forme_change_ability(self) -> Optional[str]:
991991
"""
992992
:return: The pokemon's mega ability. None if the pokemon is not mega evolved.
993993
:rtype: str, optional
994994
"""
995-
return self._mega_ability
995+
return self._forme_change_ability
996996

997-
@mega_ability.setter
998-
def mega_ability(self, ability: Optional[str]):
999-
self._mega_ability = to_id_str(ability) if ability is not None else None
997+
@forme_change_ability.setter
998+
def forme_change_ability(self, ability: Optional[str]):
999+
self._forme_change_ability = to_id_str(ability) if ability is not None else None
10001000

10011001
@property
10021002
def moves(self) -> Dict[str, Move]:

0 commit comments

Comments
 (0)