If enemy has state, ignore blind using skill

Discussion in 'RPG Maker MV' started by Rabbitheart, Jun 12, 2019.

  1. Rabbitheart

    Rabbitheart Villager Member

    Messages:
    9
    Likes Received:
    5
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    I'm thinking about skills in my game. I have basic blind state. Now I want to make that someone has a skill to mark the enemy, so even blind allies can hit them like they would not be blinded.
    So, your ally has state blind. You use the skill "Mark the enemy". Now enemy has a state "marked". When a blind ally attacks and uses any skill to this enemy, it ignores the blind.

    I'm okay if the state "marked" makes that everyone will get a sure hit to them, if that's easier. Actually, this would make a lot more use for this skill.

    If even that doesn't work, maybe some skills that hits 100% when you are blinded and the target has a state "marked".

    Is this possible? Plugins are okay. I'm using some Yanfly plugins.
     
    Last edited: Jun 12, 2019
    #1
  2. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,054
    Likes Received:
    659
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    You could try adding a trait to your "Marked" state to make it reduce Evasion, e.g. Ex-Parameter: Evasion Rate -9999%. :)
     
    #2
    Engr. Adiktuzmiko likes this.
  3. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,461
    Likes Received:
    2,853
    Location:
    Philippines
    First Language:
    Tagalog
    If he is using the default hit formulas, he'd still need a 100% hit rate because the default method of the engine for hits is that it checks first for hit based on hit chance alone, then it checks for evasion after.. So even if the target has 0% or negative evasion, he can still miss..
     
    #3
    caethyril and Silva like this.
  4. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,054
    Likes Received:
    659
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    #4
    Engr. Adiktuzmiko likes this.
  5. Nilom

    Nilom Veteran Veteran

    Messages:
    178
    Likes Received:
    39
    First Language:
    German
    Primarily Uses:
    RMMV
    You could try this in the Normal Attack Skill:

    Code:
    if (b.isStateAffected(marked_ID)) {a.hit += 9999; damageFormula; a.hit -=9999} else {damageFormula}
    

    But I'm really not sure if that could work. Will the hit chance be evaluated before the damage formula is accessed? Can the a.hit value be modified this way (a.hit += x)?

    But you could try it. :LZScheeze:
     
    #5
  6. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,054
    Likes Received:
    659
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    @XZINED the damage formula is only evaluated if the skill hits. Also, no parameters should be modified like a.hit += 9999, since they're retrieved by function to account for traits. :kaoswt:
     
    #6
    Nilom likes this.
  7. Nilom

    Nilom Veteran Veteran

    Messages:
    178
    Likes Received:
    39
    First Language:
    German
    Primarily Uses:
    RMMV
    Okay. It was worth a try, haha. :LZSlol::LZSsmile:
     
    #7

Share This Page