I'm probably going make this seem like a lot more trouble than it actually is, but here goes nothing...
I'm trying to create a Skill that puts the user into a positive state called "Charged," which doubles the user's SPI. My intention is to make the "Charged" state last only for 1 turn. (Release conditions: After 1 turn, 100% chance.) Therefore, you use the Skill to put the user into the "Charged" state to double their SPI and then on the next turn, after they take another action, the state will go away.
The Skill/State works perfectly
except for when the player uses the skill two times in a row. The game sees that the user is already in the Charged state and blocks the skill's effect, and then the user loses their Charged state immediately afterward. I tried to cancel the existing Charged state when you use the skill for the second time (using the "States to Cancel" option and selecting "Charged"), but that too denies the user another turn in the Charged state.
I looked into the Game_Battler script to check out how the game handles changing states. If these are the correct lines of coding, the script calls for the addition of states first and then the removal of them.
(Lines 94-113)If I'm right, this is what is preventing the "States to Cancel" option from working the way I want it to. What do I need to do to make my "Changed" state bypass this?
EDIT:Okay, so after looking at it some more I'm pretty sure I got the location in the Game_Battler script wrong. Here's where I think the problem is now:
431-447
464-502