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

#### Nerdboy

##### Veteran
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.

Last edited by a moderator:

#### Nerdboy

##### Veteran
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;

Last edited by a moderator:

### Latest Profile Posts

When there's a will, there's a lifehack.

Before i mess with battle UI further, does it look decent enough?
Free MZ? That's good. I should go try it out then.
Let's see if I can make it in time xD