#=============================================================================== # # Yanfly Engine RD - State Resist Fix # Last Date Updated: 2009.05.14 # Level: Easy # # When RPG Maker VX checks if an enemy is resistant against a certain state for # applying states, it will always return false regardless of what probability # rate given to the enemy. This script will change the definition altogether for # enemies and returns the check as true if the state has a working chance of 10% # or lower against that particular enemy. Nothing will be considered resistant # against the death state, however. # #=============================================================================== # Updates: # ---------------------------------------------------------------------------- # o 2009.05.14 - Started script and finished. #=============================================================================== # Instructions #=============================================================================== # # Plug and play. Input it somewhere above Main. If you wish to change the # minimum success rate required, just scroll down and change it in the module. # #=============================================================================== # # Compatibility # - Overwrites: Game_Battler: state_resist? # #=============================================================================== $imported = {} if $imported == nil $imported["StateResistFix"] = true module YE module FIX # If the success rate is under this percentage, the enemy will be considered # resistant against that state. MINIMUM_STATE = 10 end end #=============================================================================== # Editting anything past this point may potentially result in causing computer # damage, incontinence, explosion of user's head, coma, death, and/or halitosis. # Therefore, edit at your own risk. #=============================================================================== #=============================================================================== # Game_Battler #=============================================================================== class Game_Battler #-------------------------------------------------------------------------- # overwrite state_resist? #-------------------------------------------------------------------------- def state_resist?(state_id) return false if state_id == 1 return false if state_probability(state_id) > YE::FIX::MINIMUM_STATE return true end end #=============================================================================== # # END OF FILE # #===============================================================================