Effect: Reflect Damage

This script allows you to reflect a percentage of all damage received back to the attacker. The damage you actually take is the difference between the received damage and the reflected damage.



Script: download here
Required: Effects Manager


Place this script below Effects Manager and above Main


Tag effect objects with

<eff: reflect_damage x>
<eff: reflect_damage 0.3>

Where x is some percentage, as a float. The example notetag will reflect
30% of all damage taken.

You may also like...

11 Responses

  1. FreezeKirby says:

    Hello, Hime!

    This script is a natural wonder, but there is something I’d like to ask, related to what this script is about. I’ll try to summarize it in a few lines rather than just being obnoxiously long.

    I have a spell which applies a state on the caster, which does nothing by itself, but when physically attacked, the state is meant to reflect a part of the damage sustained back to the attacker. Is there any way to make the reflect apply only to physical attacks?

    • Hime says:

      If you would like to specify conditions for the effect, you can use this script: Conditional Effects.

      That script allows you to specify when the effect should occur. In your case, you would check
      whether the item/skill that’s being used on you is a “physical” attack.

      However, the exact formula you use would depend on what you define a “physical attack” to be.

      • FreezeKirby says:

        Hello again, Hime!

        I am sorry for the late reply-but after a bit of examination, I have come across a debate.

        If I am to use the Reflect Damage script in conjunction with the Conditional Effects script-How is it meant to work, in the following case?


        I have a Magic Spell that adds a state of the same name as the spell’s to the Caster, which is the one meant to Reflect a small amount of physical damage received back to the attacker. Now, currently, I have seventeen Physical Attack-based Skills, And here is a screenshot of one of them, to give you an idea of how they were constructed. (On a quick note, Yes, I am using Yanfly’s JP Manager and his Learn Skills Engine.)


        And then there is the State which is meant to Reflect Physical Damage.


        How exactly should I work with the two scripts?

        Also, thank you, and thank you so much for both of the scripts and the help! The amount of appreciation isn’t quantifiable, sadly. :C

  2. dii says:

    I have made a mistake i copy message from first error to the 2nd 😉
    In defoult setting Erroro should say

    Script ‘Skill Links’ line 129:NoMethodError occured.
    undefined method `item’ for nil:NilClass
    ( original line=> item = @subject.current_action.item)

    • Hime says:

      When a battler dies, their actions are wiped out. The script didn't take into consideration what happens if the user dies. I've added some checks for this, but there may also be the case where one of the linked skills causes recoil that kills the user, but other linked skills are still executed.

  3. dii says:

    I am getting errors every time an enemy kill itself from reflected damage. The error seems to be from Skill links script but it only happens if the enemy dies from reflect dmg. Maybe you know this error and knew what should be changed to make the scripts ( reflect and skill links) work together. I was trying to fix it like you have suggested in recoil dmg skill:
    (I'm not and expert in scripting I just figure out, I need to do sth 🙂 )
    Script ‘Skill Links’ line 129:NoMethodError occured.
    undefined method `skill_links’ for nil:NilClass
    (original line=> item.skill_links.each do |link_item| )
    (this occured when I changed in line~127 like in dmg recoil situation
    item = @subject.current_action.item
    item = @subject.current_action && @subject.current_action.item)

    In defoult skill links setting
    Script ‘Skill Links’ line 129:NoMethodError occured.
    undefined method `skill_links’ for nil:NilClass
    ( original line=> item = @subject.current_action.item)
    If you need additional information I will provide it 🙂 Otherwise great skill 🙂

  4. swebf says:

    Nevermind, I changed the position of the script to the bottom and it started working! nice script, btw

    • Tsukihime says:

      Make sure the script is below Effects Manager. There should not be any script overwriting issues I think since the stuff is unique, but I guess it’s possible someone had the same method name or something.

  5. swebf says:

    It is not working for me, I dont know exactly what the problem is, maybe the code is being overwritten by other scripts, it has no error message it simply does not reflect damage, I tried it on an equipment and enemy.

Leave a Reply

Your email address will not be published. Required fields are marked *