I've implemented a state that causes the afflicted character to take 1/3 of the damage they inflict with each attack, via playing around with the base scripts:
#-------------------------------------------------------------------------- # * Damage Processing # @result.hp_damage @result.mp_damage @result.hp_drain # @result.mp_drain must be set before call. #-------------------------------------------------------------------------- def execute_damage(user) on_damage(@result.hp_damage) if @result.hp_damage > 0 self.hp -= @result.hp_damage user.hp -= @result.hp_damage / 3 if user.state?(35) self.mp -= @result.mp_damage user.hp += @result.hp_drain user.mp += @result.mp_drain endHowever, I cannot figure out how to make the game do the "actor got dead" bit (make the sound, give the text) if the recoil damage knocks them out, as it would if they were killed by an attack or slip damage. How would I do that? (Or, alternatively, if the problem is that doing it this way is incredibly stupid, what would be a not-incredibly-stupid way of doing it?)
#-------------------------------------------------------------------------- # * Damage Processing # @result.hp_damage @result.mp_damage @result.hp_drain # @result.mp_drain must be set before call. #-------------------------------------------------------------------------- def execute_damage(user) on_damage(@result.hp_damage) if @result.hp_damage > 0 self.hp -= @result.hp_damage user.hp -= @result.hp_damage / 3 if user.state?(35) self.mp -= @result.mp_damage user.hp += @result.hp_drain user.mp += @result.mp_drain endHowever, I cannot figure out how to make the game do the "actor got dead" bit (make the sound, give the text) if the recoil damage knocks them out, as it would if they were killed by an attack or slip damage. How would I do that? (Or, alternatively, if the problem is that doing it this way is incredibly stupid, what would be a not-incredibly-stupid way of doing it?)