Having a weapon type boosts magic DMG calculation, how?

So I'm rusty and trying to remember what I can do and how (not that I was so great to start with). I'm currently trying to remember something I'm pretty sure is possible.

In the game I'm working on Cane's have no special skill instead boosting the effects of any magic as long as equipped.

I'm pretty sure there is a way to tell the game "if X weapon type is equipped boost DMG by Y%".

Let's say for this example Cane's a are Weapon Type 4. What do I type in the DMG calculation again?
I mean, the default assumption seems to me that you'd be using a.mat ("Magic Attack") to serve as your magic attack stat, so why not have all Cane class weapons simply increase Magic Attack?

Forgive me if this is a stupid question.

The specific functionality you're asking for on the other hand is I *think* available in YEP, but not vanilla MV.
I mean, the default assumption seems to me that you'd be using a.mat ("Magic Attack") to serve as your magic attack stat, so why not have all Cane class weapons simply increase Magic Attack?

Forgive me if this is a stupid question.

The specific functionality you're asking for on the other hand is I *think* available in YEP, but not vanilla MV.
I want canes to increase magic DMG by a percentage on top of M.ATK to separate them from other weapons that may increase m.atk.

To put it simply - under this logic Canes will always be a better option for a character who focuses on magic regardless of m.atk of the equipment because it gives all magic a boost.
yanfly autopassive state notetag on cane weapons
<Passive State: X>

yanfly buff/state core notetag on X state,
<Custom Confirm Effect>
if (this.isHpEffect() && this.isMagical()) {
value *= Y;
value = Math.ceil(value);
}
</Custom Confirm Effect>

Y
being the damage modifier (example: +25% potency Y would be 1.25)

forgive me if the custom confirm code is slightly wrong. im not to good with code.
got it from slightly altering a charge up type state the forums helped me with a long time ago.

edit:
it might also be possible to do this without plugins using the damage formula for an if statement check.
something along the lines of a.isEquipType(etypeId) ? formula*Y : formula
yanfly autopassive state notetag on cane weapons
<Passive State: X>

yanfly buff/state core notetag on X state,
<Custom Confirm Effect>
if (this.isHpEffect() && this.isMagical()) {
value *= Y;
value = Math.ceil(value);
}
</Custom Confirm Effect>

Y
being the damage modifier (example: +25% potency Y would be 1.25)

forgive me if the custom confirm code is slightly wrong. im not to good with code.
got it from slightly altering a charge up type state the forums helped me with a long time ago.
Thanks! I'll test it out later.
was putting in an edit for a non-plugin possible alternative when you replied. lol

Original thread: https://forums.rpgmakerweb.com/threads/having-a-weapon-type-boosts-magic-dmg-calculation-how.138048/