Change the AI - JimB16/pokecrystalchallenge GitHub Wiki
- main.asm
- battle/core.asm
- Function3c12f: (callba AIChooseMove)
- Function3d517: (AI tries to find the Pkmn to switch to)
- battle/ai/scoring.asm (AI_Basic:, ...)
- battle/ai/items.asm
- AI_SwitchOrTryItem:
- called in battle/core.asm Function3c5fe: and Function3c664:
- AI_Switch:
Already available Functions (battle/ai/scoring.asm)
- AICheckEnemyHP
- AICheckEnemyQuarterHP
- AICheckEnemyHalfHP
- AICheckEnemyMaxHP
- AICheckPlayerHP
- AICheckPlayerQuarterHP
- AICheckPlayerHalfHP
- AICheckPlayerMaxHP
- AICompareSpeed
- AIHasMoveInArray
- ; Return carry if the enemy has a move in array hl.
- AIDamageCalc
- AI_Risky
- ; Use any move that will KO the target.
- AI_Aggressive
- ; Use whatever does the most damage.
- AI_80_20
- AI_50_50