How to make a shield 'destroyed' by fire attacks.

I need some help making a shield that when equipped, if the user is attacked by a fire element attack or spell, the shield is destroyed (think Deku Shield from Legend of Zelda). It would be nice to make it give a little message too saying that the shield was destroyed.


I'm using all the Yanfly Item engines if it helps. Can I make some sort of custom respond effect?

Thanks in advance.
Bump.
I managed to create the effect you want with Yanfly's Buff & States Core and Auto Passive States in the following way:

  1. Make a shield with the notetag <Auto Passive State: X> (X is the ID of "Vulnerable Shield" state)
  2. Make a "Vulnerable Shield" state (which you can name however you'd like) with the following notetag:

  3. <Custom React Effect>
    if (this.item().damage.elementId === Y) {
    var shield = $dataArmors[Z];
    if (target.hasArmor(shield)) {
    target.discardEquip(shield)
    var text = 'Fire destroyed ' + shield.name + '!';
    var window = SceneManager._scene._logWindow;
    window._lines.push(text + '<CENTER>');
    window.refresh();
    }
    }
    </Custom React Effect>


    Note that Y should be the ID of Fire element in the Types section of your database and Z the ID of the shield which you want to make vulnerable to fire.

I've attached a couple of screenshots to this post to show examples. I hope this was what you were after or at least helps you a little. 🙂


Shield-01.png


Shield-02.png
I managed to create the effect you want with Yanfly's Buff & States Core and Auto Passive States in the following way:

  1. Make a shield with the notetag <Auto Passive State: X> (X is the ID of "Vulnerable Shield" state)
  2. Make a "Vulnerable Shield" state (which you can name however you'd like) with the following notetag:


  3. <Custom React Effect>
    if (this.item().damage.elementId === Y) {
    var shield = $dataArmors[Z];
    if (target.hasArmor(shield)) {
    target.discardEquip(shield)
    var text = 'Fire destroyed ' + shield.name + '!';
    var window = SceneManager._scene._logWindow;
    window._lines.push(text + '<CENTER>');
    window.refresh();
    }
    }
    </Custom React Effect>


    Note that Y should be the ID of Fire element in the Types section of your database and Z the ID of the shield which you want to make vulnerable to fire.

 Thank you! This is perfect! 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-shield-destroyed-by-fire-attacks.59744/