Damage based of $gameParty.gold using Yanfly Lunatic Mode Skill Core

hi im using lunatic mode for yanfly's skill core and trying to make two skills called "Payday" and "Payback".. But im doing zero damage even if i have 100,000 gold.


heres the code im using give me some tips on how to fix it plz thank you.


Payday


<Pre-Damage Eval>


dmg = $gameParty.gold * 0.5;


$gameParty.gainGold(100);


</Pre-Damage Eval>


Damage Formula looks like this.


a.mat += dmg; a.mat;


Payback does damage based on a multiplier as you take damage. the more damage you take the more you deal. pretty simple but not working either.


Payback


<Pre-Damage Eval>


dmg = $gameParty.gold  * 0.5;


$gameParty.loseGold(100);


</Pre-Damage Eval>


Damage Formula looks like this.


1/(1/a.mhp*a.hp) * (a.mat += dmg);


the problem is the dmg variable isnt being recognized for some reason in the pre-damage evaluation. please help idk whats wrong code to me looks right.


i also tried a.mat = dmg but that doesnt work either. i also tried just adding dmg; as the damage formula but not working either.
solved. i forgot to add () in the $gameParty.gold() part to recognize gold amount oops.. but works great now.


here's the code for "Payday" and "Payback"


Payday: what it does is give you random gold per hit from 50-500GP, and deal more damage based on 10% of your gold amount.


<Pre-Damage Eval>


dmg = $gameParty.gold() * 0.1;


x = (Math.floor(Math.randomInt(500) + 50));


$gameParty.gainGold(x);


</Pre-Damage Eval>


Damage Formula looks like this.


dmg;


Payback: Payback does damage based on a multiplier as you take damage. the multiplier is 10% of your gold!!! the more damage you take the more you deal.  it also makes you loose gold from 50-500GP randomly so you deal less damage as you use it but increased damaged as you take hits.


<Pre-Damage Eval>


dmg = $gameParty.gold() * 0.1;


x = (Math.floor(Math.randomInt(500) + 50));


$gameParty.loseGold(x);


</Pre-Damage Eval>


Damage Formula looks like this.


1/(1/a.mhp*a.hp) * dmg;

Original thread: https://forums.rpgmakerweb.com/threads/damage-based-of-gameparty-gold-using-yanfly-lunatic-mode-skill-core.73577/