Skip to content

Commit a5416c2

Browse files
simplify
1 parent b23d9e0 commit a5416c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/poke_env/battle/abstract_battle.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ def _check_heal_message_for_item(self, split_message: List[str]):
330330
# |-heal|p2a: Quagsire|100/100|[from] item: Sitrus Berry
331331
if len(split_message) == 5 and split_message[4].startswith("[from] item:"):
332332
pkmn = split_message[2]
333-
item_str = to_id_str(split_message[4].split("item:")[-1])
333+
item = to_id_str(split_message[4].split("item:")[-1])
334334
pkmn_object = self.get_pokemon(pkmn)
335-
if pkmn_object.item is not None and "berry" not in item_str:
336-
pkmn_object.item = item_str
335+
if pkmn_object.item is not None and "berry" not in item:
336+
pkmn_object.item = item
337337

338338
def _check_heal_message_for_ability(self, split_message: List[str]):
339339
# Catches when a side heals from it's own ability

0 commit comments

Comments
 (0)