This script allows you to specify a scope condition for your items and skills.
A scope condition is a formula that is used to determine whether a skill
or item has an effect on a target or not. If it has no effect on a target then
the action does not do anything to that target.
Script: download here
Place this script below Materials and above Main
Note-tag skills/items with
<scope condition: formula />
Where the formula is some valid ruby statement.
The following variables are available for your formula
a - current attacker b - target f - friends unit o - opponents unit v - game variables s - game switches
The target is all of the targets that the skill/item can affect. For example,
if a skill affects all enemies, then
b will be replaced with each enemy
during action execution.
The f and o variables depend on who the current attacker is.
If the attacker is an actor, then the friends unit is the game party.
Some example scope conditions
<scope condition: b.level % 5 == 0 /> -targets with levels that are multiples of 5 <scope condition: b.state.include?(23) /> -targets with state 23 applied <scope condition: b.name =~ /slime/i /> -targets with the word "e" in their name (case-insensitive) <scope condition: b.hp > (b.mhp / 2) /> -targets with more than 50% of their max HP