killerfer
Last Activity:
Jun 28, 2019
Joined:
Nov 4, 2015
Messages:
198
Likes Received:
49
Trophy Points:
28
Location:
Brazil

Share This Page

killerfer

Veteran, from Brazil

Veteran
killerfer was last seen:
Jun 28, 2019
    1. zen_honkey
      zen_honkey
      Hi!  I saw you helped someone with an absorption barrier formula.  I want to include items that create and restore barrier points per turn, but can't figure out how to write in a maximum BP for the item.


      For example, a Barrier Ring starts each fight with 500 points and restores 100 points per turn with a maximum of 500.  I already have the starting points and regenerating points, but I'm not much for the lunatic mode.  Any help you can give me would be greatly appreciated. 
      1. killerfer
        killerfer
        Sure thing! Try this:


        <Custom Barrier Points>
        var maxbarrier = 500;
        value = maxbarrier - user.barrierPoints()
        </Custom Barrier Points>


        <Custom Barrier Regen>
        var maxbarrier = 500;
        var regen = 100;
        if ((maxbarrier - user.barrierPoints()) < regen) {
        value = maxbarrier - user.barrierPoints()
        } else {
        value = regen
        }
        </Custom Barrier Regen>


        Let me know if it works.
        May 14, 2016
      2. zen_honkey
        zen_honkey
        Worked like a charm.  Thanks a lot!
        May 14, 2016
  • Loading...
  • Loading...
  • About

    Location:
    Brazil
    First Language:
    Portuguese