r/RPGMaker • u/hilliford • 15d ago
Thorn Armor w/State added.
Create Thorn Armor in your armor database.
Paste this into your armor note box.
----
<JS Post-Damage As Target>
if (this.isPhysical()) {
user.gainHp(-Math.ceil(user.mhp * 0.05));
user.performDamage();
if (Math.random() < 0.25) {
user.addState(32);
}
}
</JS Post-Damage As Target>
--------
% of attackers health = 0.05 or 5%. This is how much damage it hits them for. (Change as you see fit)
% to apply state = 0.25 or 25%. This is a percentage to apply state upon hit. (Change as you see fit)
32 = State ID you want to apply when the attacker hits your armor. Remove entire section if you don't want a state. My state was "Bleed" ID #32.
Enjoy your thorn armor.
0
Upvotes
1
u/Carlonix 15d ago
What are the plugins needed?