Plugin to prevent healing of fully healed characters during battle

Discussion in 'JS Plugin Requests' started by BurningOrca, Apr 15, 2019 at 3:26 PM.

  1. BurningOrca

    BurningOrca Villager Member

    Messages:
    15
    Likes Received:
    5
    First Language:
    German
    Primarily Uses:
    RMMV
    When I was playtesting my game I recognized that it is possible to use healing items and skills on
    fully healed allies during battle.
    For me this just doesn't make any sense and I do not know why this is the default.
    I tried to go around this problem by using Yanflys Selection Control, by adding the following notetag:

    <Select Conditions>
    Param HP% < 100.0
    </Select Conditions>


    I also tried it with 1.0, because I do not know which value would be correct.
    But that didn't work after adding this notetag I couldn't use my item/skill at all anymore.

    I would really appreciate if someone could write me a plugin that does not need any notetags to accomplish the following new behaviour during battle:

    If Item/Skill heals MP it cannot be used on characters with full MP.
    If Item/Skill heals HP it cannot be used on characters with full HP
    If Item/Skill heals both it can only be used if one of them is not full.

    If such a plugin already exists, please feel free to tell me?
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    27,215
    Likes Received:
    6,007
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    you don't need a plugin for this because this is the default behaviour - if your project does not do this, then you already have a plugin that changed your project away from default behaviour.

    you can easily test this - just make a new project without any plugins, make an event that gives a healing potion and try to use it - as long as the player is full HP it will cause an error beep when you try to use it in menu.

    However there is one thing that will circumvent that block even in default: if a potion has more than one effect, it can be used if the other effect can be used, for example if a potion gives both HP and MP then it can be use if one of the values is below. Which is as it should be, because it should be the decision of the player to waste a partial potion if the need for the other effect is big enough.

    that said, do NOT use percentages in such formulae, it will only cause rounding errors and more.
    simply make the condition
    HP < HPM
    (current HP lower than maxHP)
     
    #2
    BurningOrca and Shaz like this.
  3. BurningOrca

    BurningOrca Villager Member

    Messages:
    15
    Likes Received:
    5
    First Language:
    German
    Primarily Uses:
    RMMV
    Yeah for the menu this is the default behaviour and this didn't change with any plugin in my project.
    I was talking about Scene_Battle. But I now understand why there it is possible to use it on a fully healed allie.
    I guess it is because if an enemy is faster and drains HP or MP you might want to heal it, even at the beginning of your turn
    this allie has full HP/MP.
    Thanks.
     
    #3
    caethyril likes this.

Share This Page