05-21-2025, 04:35 AM 
	
	
	I ACED THIS BATTLER INVULNERABILITY
Version: 1.0
Version: 1.0
Introduction
This script makes it possible to make actors and/or enemies invulnerable to all damage, or remove such invulnerabilities. It uses simple script calls.
Script
 The Script
  			Code:
#==============================================================================
# ** I ACED THIS BATTLER INVULNERABILITY
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.0
#    05-20-2025 (mm/dd/yyyy)
#    RGSS / RPGMaker XP
#==============================================================================
#
#  INTRODUCTION:
#  =============
#  This script makes it possible to make actors and/or enemies invulnerable to
#  all damage, or remove such invulnerabilities. It uses simple script calls.
#
#    ----------------------------------------------------------------------
#
#  USAGE:
#  ======
#  You use script calls within the Troop Database.
#
#  To make an enemy indestructible, use:
#  *  $game_troop.dmg_unaffected(index, true)
#  And to remove its indestructible state, use:
#  *  $game_troop.dmg_unaffected(index, false)
#
#  Likewise, to make an actor indestructible, use:
#  *  $game_party.dmg_unaffected(index, true)
#  And to remove its indestructible state, use:
#  *  $game_party.dmg_unaffected(index, false)
#
#  Remember, it uses the index position of the enemies or actors, and the index
#  position '0' for the $game_party.actors array is the lead party member.  
#
#  The $game_troop.enemies is oddly in reverse order.   By that, the last enemy
#  you added into the troop is postition '0', not the first enemy added.
#
#    ----------------------------------------------------------------------
#
#  NON-ENGLISH ADAPTATION:
#  =======================
#  When the 'target' is invulnerable, a "MISS" damage pop will appear.  If this
#  is to be changed, go to line #158 in this script.
#
#==============================================================================
#
# COMPATABILITY:
# ==============
#
# Designed for RPGMaker XP.
#
#
#==============================================================================
#
# TERMS and CONDITIONS:
# =====================
#
# Free for use, even in commercial scripts. However, I require due credit for
# myself, and Ace_V who inspired this simple scriptette.
#
#
#==============================================================================
#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass for the Game_Actor
#  and Game_Enemy classes.
#==============================================================================
class Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :dmg_unaffected           # Unaffected by combat flag
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias ace_v_unaffected_initialize initialize
  alias ace_v_unaffected_attack_effect attack_effect
  alias ace_v_unaffected_skill_effect skill_effect
  alias ace_v_unaffected_item_effect item_effect
  alias ace_v_unaffected_slip_damage_effect slip_damage_effect
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    #
    ace_v_unaffected_initialize                       # Run the original method
    @dmg_unaffected = false                           # Add the unaffected flag
    #
  end
  #--------------------------------------------------------------------------
  # * Applying Normal Attack Effects
  #     attacker : battler
  #--------------------------------------------------------------------------
  def attack_effect(attacker)
    #
    if @dmg_unaffected == true                        # If flagged unaffected
      ace_v_unaffected_damage_pop                     # Run the damage pop
      return true                                     # Exit the method true
    end
    ace_v_unaffected_attack_effect(attacker)          # Run the original method
    #
  end
  #--------------------------------------------------------------------------
  # * Apply Skill Effects
  #     user  : the one using skills (battler)
  #     skill : skill
  #--------------------------------------------------------------------------
  def skill_effect(user, skill)
    #
    if @dmg_unaffected == true                        # If flagged unaffected
      ace_v_unaffected_damage_pop                     # Run the damage pop
      return true                                     # Exit the method true
    end
    ace_v_unaffected_skill_effect(user, skill)        # Run the original method
    #
  end
  #--------------------------------------------------------------------------
  # * Application of Item Effects
  #     item : item
  #--------------------------------------------------------------------------
  def item_effect(item)
    #
    if @dmg_unaffected == true                        # If flagged unaffected
      ace_v_unaffected_damage_pop                     # Run the damage pop
      return true                                     # Exit the method true
    end
    ace_v_unaffected_item_effect(item)                # Run the original method
    #
  end
  #--------------------------------------------------------------------------
  # * Application of Slip Damage Effects
  #--------------------------------------------------------------------------
  def slip_damage_effect
    #
    if @dmg_unaffected == true                        # If flagged unaffected
      return true                                     # Exit the method true
    end
    ace_v_unaffected_slip_damage_effect               # Run the original method
    #
  end
  #--------------------------------------------------------------------------
  # * Application of Miss damage pop
  #--------------------------------------------------------------------------
  def ace_v_unaffected_damage_pop
    #
    self.damage = "Miss"                              # This is the pop text
    #
  end
end
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
#  This class handles the party. It includes information on amount of gold 
#  and items. Refer to "$game_party" for the instance of this class.
#==============================================================================
class Game_Party
  #--------------------------------------------------------------------------
  # * Apply/remove unaffected damage flag
  #     index   : actor index in actor party array
  #     boolean : (true/false)
  #--------------------------------------------------------------------------
  def dmg_unaffected(index, boolean)
    #
    return unless boolean == true || boolean == false # Exit unless true/false
    return if @actors[index].nil?                     # Exit if non-existant
    @actors[index].dmg_unaffected   = boolean         # Set the value
    return true
    #
  end
end
#==============================================================================
# ** Game_Troop
#------------------------------------------------------------------------------
#  This class deals with troops. Refer to "$game_troop" for the instance of
#  this class.
#==============================================================================
class Game_Troop
  #--------------------------------------------------------------------------
  # * Apply/remove unaffected damage flag
  #     index   : enemy index in enemy troop array
  #     boolean : (true/false)
  #--------------------------------------------------------------------------
  def dmg_unaffected(index, boolean)
    #
    return unless boolean == true || boolean == false # Exit unless true/false
    return if @enemies[index].nil?                    # Exit if non-existant
    @enemies[index].dmg_unaffected  = boolean         # Set the value
    return true
    #
  end
endInstructions
Pretty simple instructions... in the script.
Compatibility
Designed for RPGMaker XP.
Terms and Conditions
Free for use, even in commercial scripts. However, I require due credit for myself, and Ace_V who inspired this simple scriptette.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
	  Above are clickable links

 
 
 I ACED THIS BATTLER INVULNERABILITY
 I ACED THIS BATTLER INVULNERABILITY
 
 
![[Image: QrnbKlx.jpg]](https://i.imgur.com/QrnbKlx.jpg)
![[Image: sGz1ErF.png]](https://i.imgur.com/sGz1ErF.png)
![[Image: liM4ikn.png]](https://i.imgur.com/liM4ikn.png)
![[Image: fdzKgZA.png]](https://i.imgur.com/fdzKgZA.png)
![[Image: sj0H81z.png]](https://i.imgur.com/sj0H81z.png)
![[Image: QL7oRau.png]](https://i.imgur.com/QL7oRau.png)
![[Image: uSqjY09.png]](https://i.imgur.com/uSqjY09.png)
![[Image: GAA3qE9.png]](https://i.imgur.com/GAA3qE9.png)
![[Image: 2Hmnx1G.png]](https://i.imgur.com/2Hmnx1G.png)
![[Image: BwtNdKw.png%5B]](https://i.imgur.com/BwtNdKw.png%5B)


 
 Thank you for this!!
 Thank you for this!!
	![[Image: SP1-Writer.png]](https://www.save-point.org/images/userbars/SP1-Writer.png)
![[Image: SP1-PixelArtist.png]](https://www.save-point.org/images/userbars/SP1-PixelArtist.png)