Bypass 100% Remove by damage states (I.e. Sleep) taken off upon hit.

Discussion in 'JS Plugin Requests' started by atoms, Jun 13, 2019.

  1. atoms

    atoms Veteran Veteran

    Messages:
    457
    Likes Received:
    276
    Location:
    United Kingdom, England
    First Language:
    English
    Primarily Uses:
    RMMV
    I hope this isn't a very complex request, but basically a plugin where if a state that usually gets taken off upon it, let's say a 100% Remove by Damage Sleep State usually gets taken off, well certain skills will bypass it and won't remove the state.

    The only condition is, I'd like the Plugin to work with Yanfly Plugins.

    I can achieve what I want through making all skills remove Sleep except the ones I want to bypass, so I don't need this plugin now, but I think a plugin like this could still be useful, and is a better method then that.

    So, for that reason, I thought, whether it happens or not, there isn't any harm in requesting it.

    Thanks for listening to the request! : )
     
    #1
  2. ShadowDragon

    ShadowDragon Veteran Veteran

    Messages:
    722
    Likes Received:
    214
    Location:
    Netherlands
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    it can be done with yanfly stateand buff plugin, but you might need state category plugin as well because if im recall correcly, it can bypass
    some states you want, but it require lunatic code :)
     
    #2
    atoms likes this.
  3. Tiamat-86

    Tiamat-86 old jrpg gamer Veteran

    Messages:
    271
    Likes Received:
    111
    First Language:
    english
    Primarily Uses:
    RMMV
    if (b.isStateAffected(X)) b.addState(X); formula
    damage formula checks if they are sleeping. if so it reapplies sleep as it hits so they stay sleeping. otherwise it just does a normal hit
     
    #3
    atoms likes this.
  4. atoms

    atoms Veteran Veteran

    Messages:
    457
    Likes Received:
    276
    Location:
    United Kingdom, England
    First Language:
    English
    Primarily Uses:
    RMMV
    @Tiamat-86

    I tried if (b.isStateAffected(10)) b.addState(10); a.atk * 4 - b.def * 2

    and
    if (b.isStateAffected(10)) b.addState(10);a.atk * 4 - b.def * 2

    in Battle Test.

    They didn't reapply the Sleep State (which was ID 0010). I'm sure there is a damage formula close to that would actually do it, however still it wouldn't really bypass the state, just take it off and on. Visually, you'd see that happen too.


    @ShadowDragon I thought that much would be true, my problem is, if it does work, I don't know the lunatic code to put in. But thanks.
     
    #4
  5. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,171
    Likes Received:
    723
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    States are removed after the damage is applied, which occurs after the damage formula has been evaluated, hence no dice with that. Also, simply reapplying the state would also reset the state's turn count unless you had some extra code to remember/reset that. :kaoswt:

    So, I wrote this li'l plugin: Cae_StateControl.
    Then let's say you have a skill that shouldn't remove state 10 on damage: just add a notetag to that skill~
    Code:
    <Ignore State Damage Remove: 10>
    Should be compatible with most stuff that doesn't entirely overhaul the flow of damage. All it does is temporarily change the remove chance to 0 for relevant states (and resets it after the "remove by damage" check has completed). :kaothx:
     
    #5
    atoms and Maliki79 like this.
  6. atoms

    atoms Veteran Veteran

    Messages:
    457
    Likes Received:
    276
    Location:
    United Kingdom, England
    First Language:
    English
    Primarily Uses:
    RMMV
    @caethyril I'm sorry I took so long to respond, but thank you for this! I hope more people can find more use for it too, thanks!
     
    #6
    caethyril likes this.

Share This Page