Tips & Tricks – Thornmail

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

The Thornmail is a unique piece of armor in League of Legends. It inflicts recoil damage to anyone who physically attacks its user. This kind of effect can be recreated in RPG Maker MV along with the bonus damage effect involving the wearer’s DEF value.

You can get the copy and paste code here: 

Copy and paste into a state notebox:

<Custom React Effect>
// Check to see if any physical damage is dealt.
if (value > 0 && this.isPhysical()) {
  // Sets the Recoil Rate to 15%.
  var rate = 0.15;
  // Determines the amount of recoil damage dealt.
  var recoil = value * rate;
  // Sets the DEF bonus rate to 25%.
  var rate = 0.25;
  // Determines the amount of bonus damage dealt.
  var bonus = target.def * rate;
  // Rounds up the bonus damage and recoil damage.
  var dmg = Math.ceil(bonus + recoil);
  // Makes the attacker lose damage equal to the dmg variable.
  user.gainHp(-1 * dmg);
  // Check to see if the attacker is dead.
  if (user.isDead()) {
    // If the attacker is dead, make it collapse.
</Custom React Effect>

Please wait while you are redirected...or Click Here if you do not want to wait.