So I've been working on this script (I'll reveal at the bottom). And it's running smoothly now, what it does is work with another script that makes a "Mood" gauge, and depending on the mood level this script will change your hp and mhp. However, when in battle and the hp/mhp has been changed an enemies attack adds hp to the actor for at least 2 turns and then does nothing whatsoever.
Edit: The HP changes after any action.
I've been told I should find another way to accomplish this, if you know of a way, I'm more than open to suggestions! Thanks!
class Game_Actor < Game_Battler attr_reader :mood alias euphoria_moodeffects_gameactor_initialize_5 initialize def initialize(actor_id) @mood = 50 euphoria_moodeffects_gameactor_initialize_5(actor_id) end alias euphoria_moodeffects_gameactor_mhp_5 mhp def mhp if @mood == 100 (euphoria_moodeffects_gameactor_mhp_5 * 1.25).to_i elsif @mood >= 75 (euphoria_moodeffects_gameactor_mhp_5 * 1.10).to_i elsif @mood >= 55 (euphoria_moodeffects_gameactor_mhp_5 * 1.05).to_i elsif @mood == 50 (euphoria_moodeffects_gameactor_mhp_5 * 1.00).to_i elsif @mood == 0 (euphoria_moodeffects_gameactor_mhp_5 * 0.75).to_i elsif @mood <= 25 (euphoria_moodeffects_gameactor_mhp_5 * 0.90).to_i elsif @mood <= 45 (euphoria_moodeffects_gameactor_mhp_5 * 0.95).to_i else (euphoria_moodeffects_gameactor_mhp_5 * 1.00).to_i end end alias euphoria_moodeffects_gameactor_hp_5 hp def hp if @mood == 100 (euphoria_moodeffects_gameactor_hp_5 * 1.25).to_i elsif @mood >= 75 (euphoria_moodeffects_gameactor_hp_5 * 1.10).to_i elsif @mood >= 55 (euphoria_moodeffects_gameactor_hp_5 * 1.05).to_i elsif @mood == 50 (euphoria_moodeffects_gameactor_hp_5 * 1.00).to_i elsif @mood == 0 (euphoria_moodeffects_gameactor_hp_5 * 0.75).to_i elsif @mood <= 25 (euphoria_moodeffects_gameactor_hp_5 * 0.90).to_i elsif @mood <= 45 (euphoria_moodeffects_gameactor_hp_5 * 0.95).to_i else (euphoria_moodeffects_gameactor_hp_5 * 1.00).to_i end end def hp_rate hp.to_f / mhp end endI did overwrite hp_rate, could that be what's causing this?
Edit: The HP changes after any action.
I've been told I should find another way to accomplish this, if you know of a way, I'm more than open to suggestions! Thanks!
class Game_Actor < Game_Battler attr_reader :mood alias euphoria_moodeffects_gameactor_initialize_5 initialize def initialize(actor_id) @mood = 50 euphoria_moodeffects_gameactor_initialize_5(actor_id) end alias euphoria_moodeffects_gameactor_mhp_5 mhp def mhp if @mood == 100 (euphoria_moodeffects_gameactor_mhp_5 * 1.25).to_i elsif @mood >= 75 (euphoria_moodeffects_gameactor_mhp_5 * 1.10).to_i elsif @mood >= 55 (euphoria_moodeffects_gameactor_mhp_5 * 1.05).to_i elsif @mood == 50 (euphoria_moodeffects_gameactor_mhp_5 * 1.00).to_i elsif @mood == 0 (euphoria_moodeffects_gameactor_mhp_5 * 0.75).to_i elsif @mood <= 25 (euphoria_moodeffects_gameactor_mhp_5 * 0.90).to_i elsif @mood <= 45 (euphoria_moodeffects_gameactor_mhp_5 * 0.95).to_i else (euphoria_moodeffects_gameactor_mhp_5 * 1.00).to_i end end alias euphoria_moodeffects_gameactor_hp_5 hp def hp if @mood == 100 (euphoria_moodeffects_gameactor_hp_5 * 1.25).to_i elsif @mood >= 75 (euphoria_moodeffects_gameactor_hp_5 * 1.10).to_i elsif @mood >= 55 (euphoria_moodeffects_gameactor_hp_5 * 1.05).to_i elsif @mood == 50 (euphoria_moodeffects_gameactor_hp_5 * 1.00).to_i elsif @mood == 0 (euphoria_moodeffects_gameactor_hp_5 * 0.75).to_i elsif @mood <= 25 (euphoria_moodeffects_gameactor_hp_5 * 0.90).to_i elsif @mood <= 45 (euphoria_moodeffects_gameactor_hp_5 * 0.95).to_i else (euphoria_moodeffects_gameactor_hp_5 * 1.00).to_i end end def hp_rate hp.to_f / mhp end endI did overwrite hp_rate, could that be what's causing this?