Eval Collection: Pain to Gold!


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


♦ 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);
text = 'The party received' + goldGain + ' gold!'
var window = SceneManager._scene._logWindow;
</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.


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