jojobear13 / shinpokered

Mostly-vanilla hack of Pokémon Red/Blue focused on bugfixes and trainer ai
209 stars 42 forks source link

Request: Rival item use #262

Closed Mord5 closed 12 months ago

Mord5 commented 1 year ago

Describe the feature you would like Rival uses Potions on the SS Anne through to Route 22 (2nd). This is pretty weaksauce.

I would like Rival to use Super Potions at Pokémon Tower, Hyper Potions at Silph, and Hyper or Max Potions at Route 22 (2nd).

In general, all Trainers that use healing items could probably stand to use them more often and at higher HP thresholds, especially on Hard Mode. 66% chance of use when <=33% HP seems reasonable to me as a general proposition.

Also, the Champion Rival can't use his Full Restores deliberately to heal status effects, which I think he should be able to do.

jojobear13 commented 1 year ago

In general, all Trainers that use healing items could probably stand to use them more often and at higher HP thresholds, especially on Hard Mode. 66% chance of use when <=33% HP seems reasonable to me as a general proposition.

Trust me. You probably don't want this. Some experimenting was done with making item usage more common, and the result is that the AI has a tendency to blow its turn using an item in moments where it really kills the mood. Though creating a new rule tree for more intelligent item-usage is something to keep in the back of my head.

Also, the Champion Rival can't use his Full Restores deliberately to heal status effects, which I think he should be able to do.

Good idea.

Rival uses Potions on the SS Anne through to Route 22 (2nd). This is pretty weaksauce.

That's because it uses the Rival2 trainer class for all those battles.

I would like Rival to use Super Potions at Pokémon Tower, Hyper Potions at Silph, and Hyper or Max Potions at Route 22 (2nd).

Normally not built into the item-using part of trainer classes, but I'll see what I can do by checking the event flags.

Mord5 commented 1 year ago

That's because it uses the Rival2 trainer class for all those battles. Normally not built into the item-using part of trainer classes, but I'll see what I can do by checking the event flags.

I was able to trigger this behavior by adding a wCurMap check to Sony2AI without the need to add a different trainer class, but maybe there's some pitfall I've overlooked.

Trust me. You probably don't want this. Some experimenting was done with making item usage more common, and the result is that the AI has a tendency to blow its turn using an item in moments where it really kills the mood. Though creating a new rule tree for more intelligent item-usage is something to keep in the back of my head.

Could be. Dealing with Blue's Alakazam with Recover is unpleasant enough as it is that I cut Recover PP to 5 in my home game, so there's definitely something to what you're saying.

Maybe trainers having a # of items per battle rather than per mon would alleviate some of this? But IDK if that would A) actually do anything to fix the problem, B) be practical to implement, and C) be in-scope for the project vision.

Or maybe the problem is me and I just need to learn to stop worrying and love the item clause. 😋

jojobear13 commented 1 year ago

I think these adjustments might be good to play around with: 65ce57f4217030a42b888ac7221142f9068fc0f4