M1L4 / QuestingDebug

1 stars 4 forks source link

TrainerBattle | no action executed, switch in last pkm #15

Closed M1L4 closed 7 years ago

M1L4 commented 7 years ago

[Problem] TrainerBattle - last pkm in team won't atk giovanni in Silph Co Headquarters.

[Description] Opponent pkm: Rhyperior SwitchIn: Magneton, full hp/pp Map: Silph Co 11F

[14:40:16] Rhyperior Attacks Charmeleon with Earthquake. [14:40:16] A Critical Hit! [14:40:16] It's Super Effective! [14:40:16] Charmeleon has fainted! [14:40:20] Come Back, Charmeleon! [14:40:20] Go, Magneton! [14:40:29] No action executed: stopping the bot. [14:40:29] Bot stopped [14:41:21] System: $AFK

[Comment] Might other fight be affected as well?

M1L4 commented 7 years ago

[Problem] Trainer Battle - Violat City Gym

[09:35:50] Pidgeotto Attacks Mareep with Quick Attack. [09:35:50] Mareep has fainted! [09:35:55] Come Back, Mareep! [09:35:55] Go, Gastly! [09:36:04] No action executed: stopping the bot. [09:36:04] Bot stopped [09:36:55] System: You are now AFK! [09:40:50] Bot started [09:40:50] Starting new quest: Violet City: Badge Quest [09:41:00] No action executed: stopping the bot. ...

[Description] ---> theirs: Pidgeotto: Flying/Normal ---> ours: Gastly: Ghost/Poison: Gastly Moveset: Spite: Ghost, ineffective vs Normal Curse: Ghost, ineffective vs Normal Lick: Ghost, ineffective vs Normal Mean Look: Normal, Status Move

So gastly had no possible move to execute. Is this corresponding to following commit from the original code(?):

-- bug: if last pokemons have only damaging but type ineffective
-- attacks, then we cannot use the non damaging ones to continue.

if not self.canRun then -- trying to switch while a pokemon is squeezed end up in an infinity loop
    return attack() or game.useAnyMove()
end
return attack() or sendUsablePokemon() or sendAnyPokemon() -- or game.useAnyMove()