Passive Ability: Bloodlust and Magic Sponge

Discussion in 'JS Plugin Requests' started by AcousticJamm, Oct 17, 2019.

Thread Status:
Not open for further replies.
  1. AcousticJamm

    AcousticJamm YouTuber Veteran

    Messages:
    133
    Likes Received:
    5
    Location:
    United States
    First Language:
    English
    Primarily Uses:
    RMMV
    So I want to make 2 passive abilities for specific actors. Here's what I want them to do:

    Bloodlust - When an enemy dies, regain [Random: 1-5]% of your maximum HP.

    Magic Sponge: When an enemy dies, regain [Random: 1-5]% of your maximum MP.

    Can I do this?

    By the way, a passive ability is something you don't have to activate yourself.
     
    #1
  2. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    12,303
    Likes Received:
    12,515
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Maybe via troop events, though it will not always work for the last enemy you KO, plus it will be tricky to do without giving the benefit to all players. You'll probably need a plug-in to pull this off.

    Moving to Plug-in Requests. If someone knows a way to do this without a plug-in still post it though.
     
    #2
  3. Oddball

    Oddball Veteran Veteran

    Messages:
    1,651
    Likes Received:
    435
    First Language:
    English
    Primarily Uses:
    N/A
    Conditiinal branches for each party member in the battle event. It would have to be sevral conditinal branches to check the state inside a conditinal branch that checks if enemy is defeated.
     
    #3
  4. Uzuki

    Uzuki Kawaii on the streets, Senpai in the sheets Veteran

    Messages:
    1,844
    Likes Received:
    1,258
    Location:
    Georgia
    First Language:
    English
    Primarily Uses:
    RMMV
    Doe's it have to be a passive ability? If it's a skill then there's a couple of things we can do in the damage formula to achieve this effect.
     
    #4
  5. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,454
    Likes Received:
    3,724
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Yeah, I would just put Troop Events in every single Troop with the Scope 'Battle' (only runs once per battle) and the Condition Enemy X is 0% HP or below. In that event, check whether the person with the appropriate passive is in the party and alive, and if so, grant them the HP or MP. To make sure that it runs even for the last member of the enemy troop, be sure to use Hime's End Phase Triggers plugin.

    You may be able to save yourself a lot of time and effort by using Yanfly's Base Troop Events as well. Just make 8 pages in the base troop, one for each slot an enemy could appear in.
     
    #5
  6. Magnus0808

    Magnus0808 Software Developer Veteran

    Messages:
    116
    Likes Received:
    109
    First Language:
    Danish
    Primarily Uses:
    RMMV
    I would probably do this using Yanflys Buffs & States Core and make it a state.

    Here is an example for the Bloodlust state:
    Code:
    <Custom Action Start Effect>
       $gameTemp.troopAliveCount = $gameTroop.aliveMembers().length;
    </Custom Action Start Effect>
    <Custom Action End Effect>
       for(var i = 0; i < $gameTemp.troopAliveCount - $gameTroop.aliveMembers().length; i++){
          var procent = Math.floor(Math.random() * 5 + 1) / 100;     
          var hpAmount = Math.floor(user.mhp * procent);
          user.startDamagePopup();
          user.gainHp(hpAmount);
       }
    </Custom Action End Effect>
    For the Magic Sponge state just modify it a bit.
    Code:
    <Custom Action Start Effect>
       $gameTemp.troopAliveCount = $gameTroop.aliveMembers().length;
    </Custom Action Start Effect>
    <Custom Action End Effect>
       for(var i = 0; i < $gameTemp.troopAliveCount - $gameTroop.aliveMembers().length; i++){
          var procent = Math.floor(Math.random() * 5 + 1) / 100;     
          var mpAmount = Math.floor(user.mmp * procent);
          user.gainMp(mpAmount);
       }
    </Custom Action End Effect>
    You can then also use Yanfly's Auto Passive States to have specific actors always have the states as appropiate :)
     
    #6
  7. AcousticJamm

    AcousticJamm YouTuber Veteran

    Messages:
    133
    Likes Received:
    5
    Location:
    United States
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks, this works.
     
    #7
  8. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,967
    Likes Received:
    10,659
    First Language:
    English
    Primarily Uses:
    RMVXA

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #8
Thread Status:
Not open for further replies.

Share This Page