ref: ab696295b3d029663062238e8033882bb8cd9cff
parent: 71090c13497946b739cd13f80d31ee13b464e9e6
parent: d8605df73d52abd60256838d33d167bd953c31b6
author: mid-kid <esteve.varela@gmail.com>
date: Sat Nov 23 18:20:20 EST 2019
Merge pull request #229 from ketsuban/percent-macro Use percent macro for trainer AI packages
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -421,28 +421,28 @@
dbw 1,LanceAI ; lance
JugglerAI:
- cp $40
+ cp 25 percent + 1
ret nc
jp AISwitchIfEnoughMons
BlackbeltAI:
- cp $20
+ cp 13 percent - 1
ret nc
jp AIUseXAttack
GiovanniAI:
- cp $40
+ cp 25 percent + 1
ret nc
jp AIUseGuardSpec
CooltrainerMAI:
- cp $40
+ cp 25 percent + 1
ret nc
jp AIUseXAttack
CooltrainerFAI:
- cp $40
- ld a, $A
+ cp 25 percent + 1
+ ld a, 10
call AICheckIfHPBelowFraction
jp c, AIUseHyperPotion
ld a, 5
@@ -458,43 +458,43 @@
jp AIUseFullHeal
MistyAI:
- cp $40
+ cp 25 percent + 1
ret nc
jp AIUseXDefend
LtSurgeAI:
- cp $40
+ cp 25 percent + 1
ret nc
jp AIUseXSpeed
ErikaAI:
- cp $80
+ cp 50 percent + 1
ret nc
- ld a, $A
+ ld a, 10
call AICheckIfHPBelowFraction
ret nc
jp AIUseSuperPotion
KogaAI:
- cp $40
+ cp 25 percent + 1
ret nc
jp AIUseXAttack
BlaineAI:
- cp $40
+ cp 25 percent + 1
ret nc
jp AIUseSuperPotion
SabrinaAI:
- cp $40
+ cp 25 percent + 1
ret nc
- ld a, $A
+ ld a, 10
call AICheckIfHPBelowFraction
ret nc
jp AIUseHyperPotion
Sony2AI:
- cp $20
+ cp 13 percent - 1
ret nc
ld a, 5
call AICheckIfHPBelowFraction
@@ -502,7 +502,7 @@
jp AIUsePotion
Sony3AI:
- cp $20
+ cp 13 percent - 1
ret nc
ld a, 5
call AICheckIfHPBelowFraction
@@ -510,7 +510,7 @@
jp AIUseFullRestore
LoreleiAI:
- cp $80
+ cp 50 percent + 1
ret nc
ld a, 5
call AICheckIfHPBelowFraction
@@ -518,14 +518,14 @@
jp AIUseSuperPotion
BrunoAI:
- cp $40
+ cp 25 percent + 1
ret nc
jp AIUseXDefend
AgathaAI:
- cp $14
+ cp 8 percent
jp c, AISwitchIfEnoughMons
- cp $80
+ cp 50 percent + 1
ret nc
ld a, 4
call AICheckIfHPBelowFraction
@@ -533,7 +533,7 @@
jp AIUseSuperPotion
LanceAI:
- cp $80
+ cp 50 percent + 1
ret nc
ld a, 5
call AICheckIfHPBelowFraction