To lay out things first:
1). State with restriction of 'Cannot Move' will force the Auto-removal Timing to Turn End to prevent unending state effect. (You cannot use Action End on a 'Cannot Move' state).
2). I'm using the STB battle system from Visustella, and I want to make Stun state that lasts for 1 action. Turn End in this case does not work since the state will be purged in the next turn eventhough the target has not taken an action.
My goal:
1). Make a proper Stun state for 1 action, where the target is not able to move on said action.
My workaround so far:
1). I figured, I could use the JS: Pre-Start Action to check if the target is affected by state 12 (Stun) and if so, force them to use a blank skill, therefore effectively "Stun" them.
2). Set the Stun state without any restriction and make the Auto-removal Timing Action End for 1 turn.
Here is said code for JS: Pre-Start Action
//Skill 21 is a blank skill, using skill 0 also has the same effect.
Findings:
1). This works great for the enemies. When they are stunned, they do nothing essentially (force action skill 21).
2). But when the player / actor is stunned, we, the player, still able to choose any action from the the command list (Attack/Guard/Skill/etc.). ALTHOUGH, choosing any command will result in performing skill 21 nonetheless.
*So if you choose Attack, you do nothing, if you choose Guard you still do nothing.
I need help:
I need help or guidance on how to tackle the player/actor problem so that you skip the choosing command phase and straight up do nothing. Any help/suggestion/idea will help. Honestly maybe I overthink the way to do it.
I also can provide you with screen captures if that is any help.
And so, thank you in advance and I really appreciate any help given
.
1). State with restriction of 'Cannot Move' will force the Auto-removal Timing to Turn End to prevent unending state effect. (You cannot use Action End on a 'Cannot Move' state).
2). I'm using the STB battle system from Visustella, and I want to make Stun state that lasts for 1 action. Turn End in this case does not work since the state will be purged in the next turn eventhough the target has not taken an action.
My goal:
1). Make a proper Stun state for 1 action, where the target is not able to move on said action.
My workaround so far:
1). I figured, I could use the JS: Pre-Start Action to check if the target is affected by state 12 (Stun) and if so, force them to use a blank skill, therefore effectively "Stun" them.
2). Set the Stun state without any restriction and make the Auto-removal Timing Action End for 1 turn.
Here is said code for JS: Pre-Start Action
JavaScript:
// Declare Constants
const value = arguments[0];
const user = this.subject();
const target = user;
const a = user;
const b = user;
const action = this;
const item = this.item();
const skill = this.item();
// Perform Actions
if (user.isStateAffected(12)) {
action.setSkill(21);
action.setItemObject($dataSkills[21]);
action.apply(user);
return;
}
Findings:
1). This works great for the enemies. When they are stunned, they do nothing essentially (force action skill 21).
2). But when the player / actor is stunned, we, the player, still able to choose any action from the the command list (Attack/Guard/Skill/etc.). ALTHOUGH, choosing any command will result in performing skill 21 nonetheless.
*So if you choose Attack, you do nothing, if you choose Guard you still do nothing.
I need help:
I need help or guidance on how to tackle the player/actor problem so that you skip the choosing command phase and straight up do nothing. Any help/suggestion/idea will help. Honestly maybe I overthink the way to do it.
I also can provide you with screen captures if that is any help.
And so, thank you in advance and I really appreciate any help given