From f17f935f663b48e575f0363a7157da09827162cd Mon Sep 17 00:00:00 2001 From: Mohamed Mostafa <138163382+MohamedMostafa259@users.noreply.github.com> Date: Wed, 22 Apr 2026 12:48:20 +0200 Subject: [PATCH 1/2] Remove redundant availability checks --- units/en/bonus-unit3/building_your_pokemon_agent.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/units/en/bonus-unit3/building_your_pokemon_agent.mdx b/units/en/bonus-unit3/building_your_pokemon_agent.mdx index e4633bd42..f9e9eb426 100644 --- a/units/en/bonus-unit3/building_your_pokemon_agent.mdx +++ b/units/en/bonus-unit3/building_your_pokemon_agent.mdx @@ -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) @@ -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) From 284eea6bbe3733f390ddd6836958a00c13d60622 Mon Sep 17 00:00:00 2001 From: Mohamed Mostafa <138163382+MohamedMostafa259@users.noreply.github.com> Date: Wed, 22 Apr 2026 11:06:04 +0000 Subject: [PATCH 2/2] remove redundant availability checks from other locales that contain the bonus-unit3 directory: es, fr, zh-CN --- units/es/bonus-unit3/building_your_pokemon_agent.mdx | 4 ++-- units/fr/bonus-unit3/building_your_pokemon_agent.mdx | 4 ++-- units/zh-CN/bonus-unit3/building_your_pokemon_agent.mdx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/units/es/bonus-unit3/building_your_pokemon_agent.mdx b/units/es/bonus-unit3/building_your_pokemon_agent.mdx index 15c748b79..c0b776395 100644 --- a/units/es/bonus-unit3/building_your_pokemon_agent.mdx +++ b/units/es/bonus-unit3/building_your_pokemon_agent.mdx @@ -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) @@ -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) diff --git a/units/fr/bonus-unit3/building_your_pokemon_agent.mdx b/units/fr/bonus-unit3/building_your_pokemon_agent.mdx index a5cc09ec8..0658bd6a6 100644 --- a/units/fr/bonus-unit3/building_your_pokemon_agent.mdx +++ b/units/fr/bonus-unit3/building_your_pokemon_agent.mdx @@ -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) @@ -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) diff --git a/units/zh-CN/bonus-unit3/building_your_pokemon_agent.mdx b/units/zh-CN/bonus-unit3/building_your_pokemon_agent.mdx index 6b3bf2361..8ca2ac77b 100644 --- a/units/zh-CN/bonus-unit3/building_your_pokemon_agent.mdx +++ b/units/zh-CN/bonus-unit3/building_your_pokemon_agent.mdx @@ -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) @@ -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)