More (very small) AI improvements

- Fixed a bug where the Elite 4 wouldn't use Full Restores. Apparently the game only allows one item per trainer.

- Gave Oak and Chief custom AI found from proto assets (then changed to be less ass)

- Small amount of balancing

- Minor text fixes

- Figured out roughly how the current high-level AI works (Stat boosting moves are only used sometimes on the first turn, Recover is only used sometimes when below half health, otherwise just attack with a move that isn't ineffective. More testing needed for stat lowering moves and things like Barrier)
This commit is contained in:
Martha Schilling 2024-01-06 00:00:18 +00:00
parent 8a59ed4b8e
commit c8f27d8bce
3 changed files with 41 additions and 37 deletions

View file

@ -28,28 +28,28 @@ TrainerAIPointers:
dbw 3, GenericAI dbw 3, GenericAI
dbw 2, BlackbeltAI ; blackbelt dbw 2, BlackbeltAI ; blackbelt
dbw 3, GenericAI ; rival1 dbw 3, GenericAI ; rival1
dbw 3, GenericAI dbw 2, OakAI
dbw 1, GenericAI ; chief dbw 3, ChiefAI ; chief
dbw 3, GenericAI dbw 3, GenericAI
dbw 1, GiovanniAI ; giovanni dbw 1, GiovanniAI ; giovanni
dbw 3, GenericAI dbw 3, GenericAI
dbw 2, CooltrainerMAI ; cooltrainerm dbw 2, CooltrainerMAI ; cooltrainerm
dbw 1, CooltrainerFAI ; cooltrainerf dbw 1, CooltrainerFAI ; cooltrainerf
dbw 2, BrunoAI ; bruno dbw 1, BrunoAI ; bruno
dbw 5, BrockAI ; brock dbw 5, BrockAI ; brock
dbw 1, MistyAI ; misty dbw 2, MistyAI ; misty
dbw 1, LtSurgeAI ; surge dbw 1, LtSurgeAI ; surge
dbw 1, ErikaAI ; erika dbw 1, ErikaAI ; erika
dbw 2, KogaAI ; koga dbw 2, KogaAI ; koga
dbw 2, BlaineAI ; blaine dbw 2, BlaineAI ; blaine
dbw 1, SabrinaAI ; sabrina dbw 1, SabrinaAI ; sabrina
dbw 3, GenericAI dbw 3, GenericAI
dbw 1, Rival2AI ; rival2 dbw 2, Rival2AI ; rival2
dbw 1, Rival3AI ; rival3 dbw 3, Rival3AI ; rival3
dbw 2, LoreleiAI ; lorelei dbw 1, LoreleiAI ; lorelei
dbw 3, GenericAI dbw 3, GenericAI
dbw 2, AgathaAI ; agatha dbw 1, AgathaAI ; agatha
dbw 1, LanceAI ; lance dbw 2, LanceAI ; lance
dbw 3, GenericAI ; Yujirou dbw 3, GenericAI ; Yujirou
dbw 3, GenericAI ; Student dbw 3, GenericAI ; Student
dbw 3, GenericAI ; Firefighter dbw 3, GenericAI ; Firefighter

View file

@ -725,8 +725,8 @@ JugglerAI:
ret nc ret nc
jp AISwitchIfEnoughMons jp AISwitchIfEnoughMons
BlackbeltAI: BlackbeltAI: ; Fun fact! Jacky uses this same AI routine in the proto assets, but only 6% of the time.
cp 13 percent - 1 cp 25 percent + 1
ret nc ret nc
jp AIUseXAttack jp AIUseXAttack
@ -763,10 +763,10 @@ BrockAI:
MistyAI: MistyAI:
cp 25 percent + 1 cp 25 percent + 1
ret nc ret nc
ld a, 10 ld a, 5
call AICheckIfHPBelowFraction call AICheckIfHPBelowFraction
ret nc ret nc
jp AIUseSuperPotion ; Replicates Starmie using Recover. Unlike other trainers that heal, Misty will do this 26% of the time instead of 51%. jp AIUsePotion ; Replicates Starmie using Recover. Unlike other trainers that heal, Misty will do this 26% of the time instead of 51%.
LtSurgeAI: LtSurgeAI:
cp 20 percent + 1 cp 20 percent + 1
@ -774,25 +774,25 @@ LtSurgeAI:
jp AIUseXSpecial jp AIUseXSpecial
ErikaAI: ErikaAI:
cp 50 percent + 1 cp 25 percent + 1
ret nc ret nc
ld a, 10 ld a, 5
call AICheckIfHPBelowFraction call AICheckIfHPBelowFraction
ret nc ret nc
jp AIUseSuperPotion jp AIUseSuperPotion
KogaAI: KogaAI:
cp 50 percent + 1 cp 25 percent + 1
ret nc ret nc
ld a, 10 ld a, 5
call AICheckIfHPBelowFraction call AICheckIfHPBelowFraction
ret nc ret nc
jp AIUseSuperPotion ; Koga is weird - I don't think anything fits. X Attack is certainly not the move though... jp AIUseSuperPotion ; Koga is weird - I don't think anything fits. X Attack is certainly not the move though...
BlaineAI: BlaineAI:
cp 25 percent + 1 cp 40 percent + 1
ret nc ret nc
ld a, 10 ld a, 5
call AICheckIfHPBelowFraction call AICheckIfHPBelowFraction
ret nc ; this fixes the super potion thing - PvK ret nc ; this fixes the super potion thing - PvK
jp AIUseHyperPotion ; Instead of a Super Potion though, let's give him this. More impactful for the sixth gym while staying true to the meme that everyone knows Gen 1 Blaine for. jp AIUseHyperPotion ; Instead of a Super Potion though, let's give him this. More impactful for the sixth gym while staying true to the meme that everyone knows Gen 1 Blaine for.
@ -800,13 +800,13 @@ BlaineAI:
SabrinaAI: SabrinaAI:
cp 25 percent + 1 cp 25 percent + 1
ret nc ret nc
ld a, 10 ld a, 5
call AICheckIfHPBelowFraction call AICheckIfHPBelowFraction
ret nc ret nc
jp AIUseHyperPotion jp AIUseHyperPotion
Rival2AI: Rival2AI:
cp 13 percent - 1 cp 20 percent - 1
ret nc ret nc
ld a, 5 ld a, 5
call AICheckIfHPBelowFraction call AICheckIfHPBelowFraction
@ -822,9 +822,6 @@ Rival3AI:
jp AIUseFullRestore jp AIUseFullRestore
LoreleiAI: LoreleiAI:
cp 15 percent + 1
ret nc
jp AIUseXSpecial
cp 40 percent + 1 cp 40 percent + 1
ret nc ret nc
ld a, 5 ld a, 5
@ -833,9 +830,6 @@ LoreleiAI:
jp AIUseFullRestore jp AIUseFullRestore
BrunoAI: BrunoAI:
cp 15 percent + 1
ret nc
jp AIUseXAttack
cp 40 percent + 1 cp 40 percent + 1
ret nc ret nc
ld a, 5 ld a, 5
@ -844,11 +838,8 @@ BrunoAI:
jp AIUseFullRestore jp AIUseFullRestore
AgathaAI: AgathaAI:
cp 8 percent cp 10 percent
jp c, AISwitchIfEnoughMons jp c, AISwitchIfEnoughMons
cp 15 percent + 1
ret nc
jp AIUseXAccuracy ; hahahahahahahaha
cp 40 percent + 1 cp 40 percent + 1
ret nc ret nc
ld a, 5 ld a, 5
@ -857,16 +848,29 @@ AgathaAI:
jp AIUseFullRestore jp AIUseFullRestore
LanceAI: LanceAI:
cp 15 percent + 1
ret nc
jp AIUseXSpecial
cp 50 percent + 1 cp 50 percent + 1
ret nc ret nc
ld a, 10 ld a, 4
call AICheckIfHPBelowFraction call AICheckIfHPBelowFraction
ret nc ret nc
jp AIUseFullRestore jp AIUseFullRestore
OakAI:
cp 25 percent + 1
ret nc
ld a, 5
call AICheckIfHPBelowFraction
ret nc
jp AIUseFullRestore
ChiefAI:
cp 25 percent + 1
ret nc
ld a, 5
call AICheckIfHPBelowFraction
ret nc
jp AIUseFullRestore ; this was a Dire Hit in the proto assets but we all know how useful that item is in Gen 1
GenericAI: GenericAI:
and a ; clear carry and a ; clear carry
ret ret

View file

@ -77,11 +77,11 @@ _GiovannisRoomText3::
para "PROTECTOR: ¥3,000" ; Giovanni discovered the Protector's use with Rhyperior. para "PROTECTOR: ¥3,000" ; Giovanni discovered the Protector's use with Rhyperior.
para "DIRE HIT: ¥5,200" ; Giovanni uses this in battle. para "X ATTACK: ¥8,000" ; Giovanni uses this in battle.
para "TM27 R&D: ¥15,000" ; Giovanni is confirmed to have created Fissure in vanilla RBY. He also says he made Earthquake in FRLG, but it feels contrived. para "TM27 R&D: ¥15,000" ; Giovanni is confirmed to have created Fissure in vanilla RBY. He also says he made Earthquake in FRLG, but it feels contrived.
para "Business: ¥100,000" para "Business: ¥250,000"
para "It keeps going..." para "It keeps going..."