Eval Collection: Pain to Gold!

1451775806949

Pain to Gold is an accessory that will convert any incoming damage to Gold for the party!

Requirements:

♦ YEP_BuffsStatesCore.js

♦ YEP_AutoPassiveStates.js

  1. Create the equipment that bears the Pain to Gold property.
  2. Use the <Passive State: x> in its notebox. You will need to replace the x with the ID of the passive state that we are going to create in a moment.
  3. Create a new state. I called mine Pain to Gold.
  4. Use this notetag in the state’s notebox:

<Custom Respond Effect>
if (value > 0) {
var goldGain = Math.floor(value * 1);
$gameParty.gainGold(goldGain);
text = 'The party received' + goldGain + ' gold!'
var window = SceneManager._scene._logWindow;
window._lines.push(text);
window.refresh();
};
</Custom Respond Effect>

In Line 3 you can alter the amount of Gold gained. In my case the party gains “value * 1” gold which is basically the amount of damage taken.

In Line 5 you can alter the text that’s displayed when the effect occurs. If you do not want to display any text, delete Lines 5 to 8.

Advertisements

Write a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s