Required
Tag Manager: http://himeworks.com/2013/03/07/tag-manager/
How it works
What we want
Suppose we want to make a skill called "Destroy Undead" which will instantly destroy any undead monsters.
Naturally, it will have the effect "add state: death"
Specifying conditions
The problem right now is if we just leave it at that, the skill would instantly kill anything it hits. So we must specify a tag condition. We do this by tagging the skill with
<tag_cond: undead>Which means the "undead" tag must exist in the target for the skill to do anything to it.
Applying tags
Now suppose we are in a battle with two slimes and a zombie.
If we would only want the skill to instantly kill undead monsters, and we want the zombie to be an "undead" monster, then we would tag the zombie with
<tag: undead>Test this in a project and verify that using "Destroy Undead" does nothing to the slimes, and will instantly skill the zombie.
Using tags with states
Now suppose we have another skill that allows you to turn monsters into undead, called "Turn Undead"
First, you would create a state called "Undead" (or anything really).
Then you would tag the state with
Code:
Because states are tag objects, they will be inherited by the battler that has this state. As a result, if you used the "turn undead" skill on the slime and turned it into undead, and then used the "destroy undead" skill on the slime now, it should be instantly destroyed because it is now an undead.<tag: undead>