Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # Enemy HP SP Limit Exceed Script by Black Mage (Credit required to use)
- # Version : 1.1
- #
- # http://nazr.in/144U
- #==============================================================================
- #==============================================================================
- # This script enable you to set a new limit for enemy's Max HP and Max SP.
- # This set also enable you to set enemy's Max HP and Max SP manually.
- #
- # To use this script, put it above Main script in the script editor.
- #==============================================================================
- #==============================================================================
- # Changelog:
- #==============================================================================
- # Version 1.1 (19 April 2019)
- # – Simplifying the codes.
- # Version 1.0 (11 May 2016)
- # – Initial design.
- #==============================================================================
- module BLACK
- #==============================================================================
- # Enemy MAX HP Limit Exceed
- #==============================================================================
- #
- # First, you need to set the HP limit. The default limit is 999999.
- # Note that this limit is also applied to character's HP limit.
- HP_LIMIT = 9999999999
- # Make a hash for enemy id and their max hp.
- # enemy id enemy hp
- E_CUSTOM_HP = {1 => 20000,
- 2 => 200,
- 3 => 123456789
- }
- #==============================================================================
- #==============================================================================
- # Enemy MAX SP Limit Exceed
- #==============================================================================
- #
- # First, you need to set the SP limit. The default limit is 9999
- # Note that this limit is also applied to character's SP limit.
- SP_LIMIT = 9999999999
- # Make a hash for enemy id and their max hp.
- E_CUSTOM_SP = {6 => 20000,
- 10 => 999991,
- 12 => 123456789
- }
- #==============================================================================
- end
- #------------------------------------------------------------------------------
- # * Beyond this is the sacred land of code. You need programming qualification
- # to dwelve deeper, or it'll cause many unnecessary problems. Proceed on your
- # own risk.
- #------------------------------------------------------------------------------
- class Game_Battler
- include BLACK
- def maxhp
- n = [[base_maxhp + @maxhp_plus, 1].max, HP_LIMIT].min
- for i in @states do n *= $data_states[i].maxhp_rate / 100.0 end
- n = [[Integer(n), 1].max, HP_LIMIT].min
- return n
- end
- def maxsp
- n = [[base_maxsp + @maxsp_plus, 0].max, SP_LIMIT].min
- for i in @states do n *= $data_states[i].maxsp_rate / 100.0 end
- n = [[Integer(n), 0].max, SP_LIMIT].min
- return n
- end
- end
- class Game_Enemy < Game_Battler
- def base_maxhp
- E_CUSTOM_HP[@enemy_id.to_i] ? E_CUSTOM_HP[@enemy_id] : $data_enemies[@enemy_id].maxhp
- end
- def base_maxsp
- E_CUSTOM_SP[@enemy_id.to_i] ? E_CUSTOM_SP[@enemy_id] : $data_enemies[@enemy_id].maxsp
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement