Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions units/en/bonus-unit3/building_your_pokemon_agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class LLMAgentBase(Player):
move_name = args.get("move_name")
if move_name:
chosen_move = self._find_move_by_name(battle, move_name)
if chosen_move and chosen_move in battle.available_moves:
if chosen_move:
action_taken = True
chat_msg = f"AI Decision: Using move '{chosen_move.id}'."
print(chat_msg)
Comment on lines 164 to 170
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The redundant availability checks were removed in the English unit, but the same code excerpt in other locales (e.g., units/es, units/fr, units/zh-CN) still includes chosen_move and chosen_move in battle.available_moves / chosen_switch and chosen_switch in battle.available_switches. If these units are meant to stay in sync, update the translated building_your_pokemon_agent.mdx files to match this logic to avoid inconsistent guidance.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've edited the other locales that contain the bonus-unit3 directory: es, fr, zh-CN

Expand All @@ -177,7 +177,7 @@ class LLMAgentBase(Player):
pokemon_name = args.get("pokemon_name")
if pokemon_name:
chosen_switch = self._find_pokemon_by_name(battle, pokemon_name)
if chosen_switch and chosen_switch in battle.available_switches:
if chosen_switch:
action_taken = True
chat_msg = f"AI Decision: Switching to '{chosen_switch.species}'."
print(chat_msg)
Expand Down
4 changes: 2 additions & 2 deletions units/es/bonus-unit3/building_your_pokemon_agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class LLMAgentBase(Player):
move_name = args.get("move_name")
if move_name:
chosen_move = self._find_move_by_name(battle, move_name)
if chosen_move and chosen_move in battle.available_moves:
if chosen_move:
action_taken = True
chat_msg = f"Decisión de la IA: Usando movimiento '{chosen_move.id}'."
print(chat_msg)
Expand All @@ -177,7 +177,7 @@ class LLMAgentBase(Player):
pokemon_name = args.get("pokemon_name")
if pokemon_name:
chosen_switch = self._find_pokemon_by_name(battle, pokemon_name)
if chosen_switch and chosen_switch in battle.available_switches:
if chosen_switch:
action_taken = True
chat_msg = f"Decisión de la IA: Cambiando a '{chosen_switch.species}'."
print(chat_msg)
Expand Down
4 changes: 2 additions & 2 deletions units/fr/bonus-unit3/building_your_pokemon_agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class LLMAgentBase(Player):
move_name = args.get("move_name")
if move_name:
chosen_move = self._find_move_by_name(battle, move_name)
if chosen_move and chosen_move in battle.available_moves:
if chosen_move:
action_taken = True
chat_msg = f"AI Decision: Using move '{chosen_move.id}'."
print(chat_msg)
Expand All @@ -176,7 +176,7 @@ class LLMAgentBase(Player):
pokemon_name = args.get("pokemon_name")
if pokemon_name:
chosen_switch = self._find_pokemon_by_name(battle, pokemon_name)
if chosen_switch and chosen_switch in battle.available_switches:
if chosen_switch:
action_taken = True
chat_msg = f"AI Decision: Switching to '{chosen_switch.species}'."
print(chat_msg)
Expand Down
4 changes: 2 additions & 2 deletions units/zh-CN/bonus-unit3/building_your_pokemon_agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class LLMAgentBase(Player):
move_name = args.get("move_name")
if move_name:
chosen_move = self._find_move_by_name(battle, move_name)
if chosen_move and chosen_move in battle.available_moves:
if chosen_move:
action_taken = True
chat_msg = f"AI Decision: Using move '{chosen_move.id}'."
print(chat_msg)
Expand All @@ -176,7 +176,7 @@ class LLMAgentBase(Player):
pokemon_name = args.get("pokemon_name")
if pokemon_name:
chosen_switch = self._find_pokemon_by_name(battle, pokemon_name)
if chosen_switch and chosen_switch in battle.available_switches:
if chosen_switch:
action_taken = True
chat_msg = f"AI Decision: Switching to '{chosen_switch.species}'."
print(chat_msg)
Expand Down
Loading