Is it possible to replace the default parameter of an enemy by a variable?
Thank you.
Thank you.
class Game_Enemy < Game_Battler
def mhp; enemy.note =~ /<mhpvar\s*(\d+)>/i ? $game_variables[$1.to_i] : super; end;
def mmp; enemy.note =~ /<mmpvar\s*(\d+)>/i ? $game_variables[$1.to_i] : super; end;
def atk; enemy.note =~ /<atkvar\s*(\d+)>/i ? $game_variables[$1.to_i] : super; end;
def def; enemy.note =~ /<defvar\s*(\d+)>/i ? $game_variables[$1.to_i] : super; end;
def mat; enemy.note =~ /<matvar\s*(\d+)>/i ? $game_variables[$1.to_i] : super; end;
def mdf; enemy.note =~ /<mdfvar\s*(\d+)>/i ? $game_variables[$1.to_i] : super; end;
def agi; enemy.note =~ /<agivar\s*(\d+)>/i ? $game_variables[$1.to_i] : super; end;
def luk; enemy.note =~ /<lukvar\s*(\d+)>/i ? $game_variables[$1.to_i] : super; end;
end
Original thread: https://forums.rpgmakerweb.com/threads/replacing-enemy-parameter-by-variable.83526/