Jump to content

Recommended Posts

For my game, I have a skill that runs a common event which lowers your defense after using it. I only want it to decrease it in battle, but the defense stat stays lowered permanently. I want it to be stackable, and I don't know how to make stackable states. How would I do this so the defense stat only lowers in battle and reverts on the field?

Share this post


Link to post
Share on other sites

For my game, I have a skill that runs a common event which lowers your defense after using it. I only want it to decrease it in battle, but the defense stat stays lowered permanently. I want it to be stackable, and I don't know how to make stackable states. How would I do this so the defense stat only lowers in battle and reverts on the field?

About the stacking:

How about using debuffs?

Of course, if you don't want the 75% multiplier per stack, then you'll 2 states doing the same thing(lowering the defense with the same amount):

# Pseudocode for conditional branch
If 1st state isn't applied
  Apply 1st state
Else if 1st state is applied
  Apply 2nd state
End

If you want the state to be stacked for more times, then you'll need n such states instead of just 2, where n is how many times you would want the state to be stacked.

 

About only applying the state in battle:

If the states are set to be removed at battle end, they should really be gone upon battle end.

If the skill can be used outside battle, then you can use this script call in the conditional branch:

SceneManager.scene_is?(Scene_Battle)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted