From 1915e6bba141904def5fecc81ad5ea64ed928386 Mon Sep 17 00:00:00 2001 From: Kyle Coburn Date: Sun, 19 Apr 2015 11:07:21 -0700 Subject: [PATCH] Standardize more Pokemon menu selection --- ai/strategies.lua | 8 +++++--- storage/pokemon.lua | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ai/strategies.lua b/ai/strategies.lua index f707f9f..69689fd 100644 --- a/ai/strategies.lua +++ b/ai/strategies.lua @@ -926,12 +926,14 @@ Strategies.functions = { else Input.press("B") end - elseif main == Menu.pokemon then --TODO check loop + elseif main == Menu.pokemon then + local selectIndex if Memory.value("menu", "selection_mode") == 1 then - Menu.select(nidoranIndex, true) + selectIndex = nidoranIndex else - Menu.select(0, true) + selectIndex = 0 end + Pokemon.select(selectIndex) else Input.press("B") end diff --git a/storage/pokemon.lua b/storage/pokemon.lua index 8652f25..83ef0d9 100644 --- a/storage/pokemon.lua +++ b/storage/pokemon.lua @@ -316,7 +316,7 @@ function Pokemon.use(move) Input.press("B") end elseif main == Menu.pokemon then - Menu.select(pokeName, true) + Pokemon.select(pokeName) elseif main == 228 then Input.press("B") else