Good post. Lot's of nitty gritty details for me to comb through.
Quote:
Originally Posted by LinkNinjaMaster
Something else NOT regarding the alleged glitch from before. I noticed that the AI keeps using status moves if I heal myself in-battle, so they decide their action after player item use. Is that intended or not?
|
There's a check I wrote that randomly "blinds" the AI to your lack of status if you used an item or switched. It's 50%. But I think I need to make some adjustments. Since AI routines are run on each move individually, this means the 50% is per-move that can cause a status. Which is fine if you're up against a paras with scratch and stun spore as its moves. But it's a different story with something like a bellsprout with wrap, poison powder, sleep powder, and stun spore. Since the 50% blinding check is run on each of the three status moves, the actual probability that it will use any of its status moves is 1-(0.5)^3 = 87.5%. Hence why it can sometimes feel like an enemy is always countering your usage of items.
Quote:
|
Oh and this one is just a small question but is there a version of Shin PokeRed/Blue that has the better movesets of Yellow? Not asking for new moves or movesets from other Gens, just the movesets of Yellow.
|
I've merged them into the level-up lists in the master branch. Some tweaking was required on some pokemon, notably the eevee lines, in order to smooth out some rough edges with progression.
Quote:
|
So yeah tl;dr Wrap users get to attack when the player switches if the Pokémon switching in has a status ailment, I just described the scenario in detail in case it was needed. I don't know if it's fixed already but I don't see any report in the github.
|
I was able to use your descriptions to recreate a test scenario and preserve it as a saved state. I've set things up against a high-speed ekans with wrap as its only move (note: I can directly edit opponents in the debugger to be whatever I need). Switching out of a trapping move is supposed to make the opponent lose a turn. But if your switch-in choice has a status then it is letting the opponent choose a move (not supposed to happen), so wrap gets chosen. I suspect that this is due to an oversight in how status effects are handled within the turn sequence. I will experiment more and look for a solution.
EDIT: Found the problem. Two issues are causing the observations.
1 - I have it so that, when a trapped pokemon switches, the trapper has FF written as its chosen move. This is a null value that is treated as "no move". In the section where an enemy's chosen move is recorded, either from a link cable value or from the AI making a selection, that FF from earlier is getting overwritten. This is how the opponent is able to use wrap when not allowed.
2 - When the player switches out of a trapping move, I made it so an EnemyActed bit gets set. This makes the battle engine treat the opponent as if it already used an item or switched. The result is a full turn denial. But I neglected to make this a two-way street since it's only supposed to apply to the AI; a player is (and always was even in vanilla) able to use items or switch in the midst of a trapping move even if the opponent switches on the same turn. This means that the check for the EnemyActed bit only gets run if the player's new pokemon is faster than the opponent's pokemon, and it was covering-up the aforementioned 1st issue. But if player switches out of a trapping move into a pokemon slower than the enemy trapper, then the cover-up never happens.
Solution: Make sure the FF null move is not overwritten. The player switching out of a trapping enemy should not set the EnemyActed bit. Instead, the null move should be checked-for during the TrainerAI (switching and item-use) function. If the null move is found, the AI will not switch or use an item. The enemy will then execute the null move as expected.
__________________
Author of
Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the
sideshow thread.