I made a succubus skill using events, this skill makes all the actors having a charm state to give the succubus a potion, to make this I made a skill called "Give potion" and I am forcing the actors to give her the potion, but... the results are unexpected...
This is the script in the troop event:
These are my unexpected results:
Having 2 actors having charm and they didn't act on the current turn yet:
This is the script in the troop event:
JavaScript:
for(f=0;f<4;f++){ // for the 4 actors
if($gameParty.members()[f].isStateAffected(38)){ // if they are under charm state
$gameParty.members()[f].startAnimation(231); // it shows a heart animation
setTimeout(function(f){ // 1 second time out to show the heart animation
$gameParty.members()[f].removeState(38); // Remove the charm state in order to let the actor to act
$gameParty.members()[f].forceAction(161,0); // Then I force the give potion skill
BattleManager.forceAction($gameParty.members()[f]); // Perform force action
$gameParty.members()[f].addState(38); // Add charm state again
}, 1000, f);
}
}
These are my unexpected results:
Having 2 actors having charm and they didn't act on the current turn yet:
- the first actor walk ahead,
- then the second actor remove the charm state and gives the potion to the succubus as expected.
- then the first actor attack the first party member (index 0) twice (WHY?).
- the first and second actors remove the charm state.
- then they do nothing, no potion, no attack, no anything, it looks like the enemy had mercy and removed the charm for both 😂