How do I make skills that never miss, and a status that causes skills to never miss?
#1
Hey, all. So I've got a twofold request for RMXP:

1. How do I make a skill that never misses regardless of the enemy's evasion rate?

2. How can I make a status effect that also grants that property for all the character's skills?

I've recently added several monsters into my game that have high to extremely high evasion values (70+) with the intent that the player would need to bring along a certain character who had a skill named Sure Shot.
Additionally that character could also gain a skill (Raise Confidence?) that gives a teammate a status effect called Sharpshooter that grants all their skills the same property for the next 2 turns. Perhaps that character can also later gain a skill that grants the entire party the status for 2 turns.  (I have kyonides' Super Skill Nerf implemented in my game, so this could be that character's single-use ultimate.)
[Image: SP1-Writer.png]
[Image: SP1-PixelArtist.png]
Reply
#2
FIRST... its 2am and I just cobbled this together.
Code:
module NoEvade
  
  # Just list the Skill IDs here
    SKILL_IDS = [1]  
  
end


#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass for the Game_Actor
#  and Game_Enemy classes.
#==============================================================================

class Game_Battler

  #--------------------------------------------------------------------------
  # * Determine [Can't Evade] States
  #--------------------------------------------------------------------------
  alias acev_derv_gbattler_noevade_cant_evade? cant_evade?
  alias acev_derv_gbattler_noevade_skill_effect skill_effect
  
  #--------------------------------------------------------------------------
  # * Determine [Can't Evade] States
  #--------------------------------------------------------------------------
  def cant_evade?
    #
    # True if a skill in use is set to prevent evasion
    return true if @evadable_skill == true
    # Return with the original state based result
    return acev_derv_gbattler_noevade_cant_evade?
    #
  end  
  
  #--------------------------------------------------------------------------
  # * Apply Skill Effects
  #     user  : the one using skills (battler)
  #     skill : skill
  #--------------------------------------------------------------------------
  def skill_effect(user, skill)
    #
    # Test the skill to see if it prevents evasion
    skill_evadable?(skill)
    # Perform the original call
    effective = acev_derv_gbattler_noevade_skill_effect(user, skill)  
    # Exit with the skill's effectiveness
    return effective
    #
  end
  
  #--------------------------------------------------------------------------
  # * Get if Skill prevents evasion
  #     skill : skill
  #--------------------------------------------------------------------------
  def skill_evadable?(skill)
    #
    # Set the flag indicating no evasion by default
    @evadable_skill = false
    # Get the skill's ID
    id = Skill.id
    # Set the flag true if the skill used prevents evasion
    @evadable_skill = true if NoEvade::SKILL_IDS.include?(id)
    #
  end
  
end
Designed so you just add the ID of your skills that should get past evasion. Examination of the script, one should see how melee weapons and items could be added for the same.

Second, the system is designed so enemies themselves are subject to not being able to evade (stats like fumble, clumsy, etc)... not the actors themselves.

CODE IN GAME_BATTLER:
Code:
def cant_evade?
    for i in @states
      if $data_states[i].cant_evade
        return true
      end
    end
    return false
  end
The above code (which my above script aliases) checks if the victim/self is subject to any status ailment that prevents them from evading.

The skill_effect method asks for the skill ID and the user/caster of the skill. As it can check the ID of a 'skill', it might be possible to check the status effect of the 'user'. Just needs a bit more code as there is no flagged status effect so an attack is evasion-proof.

But I gotta hit the sack. And I got writing tomorrow (joy).
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
   How do I make a PNG image (or animation) show up when a character dies? Ace_V 6 3,322 08-31-2025, 11:07 PM
Last Post: kyonides
   Parts of the Equip, Spells, and Status menus persist even after exiting the menu Ace_V 5 6,200 12-29-2024, 06:09 AM
Last Post: Ace_V
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 28,147 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   Refreshing original skills names Whisper 2 8,293 05-31-2020, 04:35 PM
Last Post: Whisper
   Display State Ranks in Status Screen Mel 3 11,014 04-02-2017, 12:46 AM
Last Post: marketing small business ideas
   Custom Message by Hodgeelmf, need to make it above picture LunarBerry 6 17,117 05-09-2016, 01:15 AM
Last Post: LunarBerry
   Atoa Custom Battle System: Popup when status change Noctis 6 16,776 02-01-2016, 12:52 AM
Last Post: Noctis
   Showing only specific skills in a window Mel 2 9,062 01-12-2016, 01:34 PM
Last Post: Mel
   [RMXP]Game Over and Atoa Battle Status mishaps firestalker 8 17,269 08-07-2014, 01:59 AM
Last Post: firestalker
  Make LockeZ's Sacrifice script Blizzard Compatible Steel Beast 6Beets 0 5,031 05-29-2014, 02:13 AM
Last Post: Steel Beast 6Beets



Users browsing this thread: 1 Guest(s)