#============================================================================== # ** Enemy_Levels #------------------------------------------------------------------------------ # This class handles how enemies' statistics are affected by their # experience level. Level is set using the first variable. # # Enemy levels are controlled by enemy_level. # Enemy levels can be set using a variable via the line 'return # $game_variables[1]' where '1' represents a variable with an ID of 1. # You may change the variable ID to whatever variable you wish to use, # just remember which variable you set it to! # Alternately, you can set the enemies to grow stronger with the player # via the line 'return $game_party.max_level'. The enemies' strength # will be determined by the level of the highest leveled actor in the # party. # Note that if 'return $game_variables[1]' and 'return # $game_party.max_level' are both active that it will default to # '$game variables' because it appears first. Remember to hide the line # that you're not using with a hash (#) so that the code will work right. # 'return $game_party.max_level' is hidden by default meaning that # enemy levels are set by a variable by default. You can easily switch # methods by adding a hash to the start of line 46 and removing the hash # from line 49. # # Feel free to alter the equations below to how you see fit. By default # the equation '(stat - 400) x level + 400' is used for MaxHP & MaxSP; the # equation '(stat - 30) x level + 30' is used for STR, DEX, AGI, & INT; # the equation 'stat + level' is used for ATK, PDEF, & MDEF; the equation # '(stat - (stat / 10)) x level + (stat / 10)' is used for EXP earned; and # the equation '(stat - 5) x level + 5' is used for gold earned. These # equations work well for the default enemies in the game. I've also taken # the liberty of adjusting the default stats of most of the enemies to # lower their stats to level 1 so that common enemies such as Cobolds don't # become overpowered by the level increase. Each tier of enemies (Ghost # through Angel, Zombie through Archangel, etc) has higher base stats than # the previous tier so that you can still encounter stronger enemies at the # same level as weaker enemies. #============================================================================== class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # * Get Level Data #-------------------------------------------------------------------------- def enemy_level #Set enemy level using a variable return $game_variables[1] #Set enemy level using party level # return $game_party.max_level end #-------------------------------------------------------------------------- # * Get Basic Maximum HP #-------------------------------------------------------------------------- def base_maxhp return ($data_enemies[@enemy_id].maxhp - 400) * enemy_level + 400 end #-------------------------------------------------------------------------- # * Get Basic Maximum SP #-------------------------------------------------------------------------- def base_maxsp return ($data_enemies[@enemy_id].maxsp - 400) * enemy_level + 400 end #-------------------------------------------------------------------------- # * Get Basic Strength #-------------------------------------------------------------------------- def base_str return ($data_enemies[@enemy_id].str - 30) * enemy_level + 30 end #-------------------------------------------------------------------------- # * Get Basic Dexterity #-------------------------------------------------------------------------- def base_dex return ($data_enemies[@enemy_id].dex - 30) * enemy_level + 30 end #-------------------------------------------------------------------------- # * Get Basic Agility #-------------------------------------------------------------------------- def base_agi return ($data_enemies[@enemy_id].agi - 30) * enemy_level + 30 end #-------------------------------------------------------------------------- # * Get Basic Intelligence #-------------------------------------------------------------------------- def base_int return ($data_enemies[@enemy_id].int - 30) * enemy_level + 30 end #-------------------------------------------------------------------------- # * Get Basic Attack Power #-------------------------------------------------------------------------- def base_atk return $data_enemies[@enemy_id].atk + enemy_level end #-------------------------------------------------------------------------- # * Get Basic Physical Defense #-------------------------------------------------------------------------- def base_pdef return $data_enemies[@enemy_id].pdef + enemy_level end #-------------------------------------------------------------------------- # * Get Basic Magic Defense #-------------------------------------------------------------------------- def base_mdef return $data_enemies[@enemy_id].mdef + enemy_level end #-------------------------------------------------------------------------- # * Get EXP #-------------------------------------------------------------------------- def exp_db return $data_enemies[@enemy_id].exp end def exp return (exp_db - (exp_db / 10)) * enemy_level + (exp_db / 10) end #-------------------------------------------------------------------------- # * Get Gold #-------------------------------------------------------------------------- def gold return ($data_enemies[@enemy_id].gold - 5) * enemy_level + 5 end end