KBlockStates XP

KBlockStates XP

by Kyonides
​

Introduction

This script prevents your heroes or your enemies from choosing a target that is still afflicted by a Blocked Target alias Untargetable State.

Set the value of the TARGET_STATE Constant found in the KBlockStates module to your Untargetable State ID.

Available States:
  • Traditional Block Target or Untargetable State 😛
  • No Attack State - Simple Attacks Get Blocked! :S
  • No Healing State - Healing Skills Get Blocked! :S

Don't forget to ask Sylvia about the "Bad States" whenever you see her!

Other Notes

This scriptlet seems to work with the default battle system so feel free to try it in your game project.
I have not tested it while using any other battle system.
The only reason why I came up with this idea was because Hime's script for RM VX Ace had a weird bug that has remained untouched ever since 2015...


Terms & Conditions

Free for use in your game.
Include my nickname in your game credits.
That's it.
Keep it up! Always look forward to your scripts!
Script Updated!​

Now it allows you to set different Block States in a list (an Array [something, here] object).
Some script commands have been shortened for convenience.
You know, RMXP's script call box is a little small. XD
Another Update Has Arrived!​

This time it includes a check or two to make sure some of the previous features work as intended. That is specially true for RMXP that now includes an add-on for the Default Battle System.

Even so, that's not the end of it! 😀

Now it allows you to magically (RM state-wise) Seal Your Bag! 😮

Happy with a sweat I know, that doesn't sound like a popular feature, does it?
But don't worry, my friends! Winking It only works in battle and for certain heroes, the ones afflicted by that state.

Really? Or did you even think for a moment that mobsters like witches, zombies, wizards, dark elves and others would love to see you consume potions and elixirs to get cured or replenish your mana points right away?

Of course not! 😛​
XP Targets Updated!​

Since XP version 1.1.0 has been released, you are now able to pick a skill scope, namely All Enemies and configure a Skill by adding a specific State (+) to its States List and it will apply its effects on Dead Enemies only.

This is how the KBlockStates module looks like nowadays.

Ruby:
module KBlockStates
  NO_TARGET_FOUND = "%s failed to launch the attack."
  ATTACK_STATE = 17
  HEALING_STATE = 18
  NO_GUARD_STATE = 19
  SEALED_BAG_STATE = 20
  DEAD_ENEMIES_STATE = 23
  # Pick your favorite Blocked Target State IDs, i.e. [3, 5, 7]
  TOTAL_BLOCK_TARGET_STATES = [29]
  PARTIAL_BLOCK_TARGET_STATES = [30]
  def self.random_target_state_id
    pos = rand(TOTAL_BLOCK_TARGET_STATES.size)
    TOTAL_BLOCK_TARGET_STATES[pos]
  end
end

Pay attention to the DEAD_ENEMIES_STATE Constant because you need to set the right State ID for your game.

Original thread: https://forums.rpgmakerweb.com/threads/kblockstates-xp.157242/