Jump to content
Sign in to follow this  
Pathos Prime

Reflect percentage of damage?

Recommended Posts

Looking for a way to reflect a portion of damage from a physical attack.  I want there to be certain enemies where you take a small percentage of the damage you deal to them.  Say you do an attack for 100 HP of damage, the character who attacked takes 10% of that, or 10 HP damage.

Share this post

Link to post
Share on other sites

Needs a script.


The way magic reflection works (like counterattacking) cannot be altered from the editor and there is no existing partial reflection mechanic. By default, the only things you are allowed to specify for reflection is the chance of reflection. If it triggers, the engine switches the target of the attack from the initial recipient to the caster and applies the effects like normal. You probably noticed this already, but there isn't any way by default to make the scope of an attack target both an enemy and ally at once, outside of manipulating damage formulas to do so. You could try and make a damage formula that scans the target for the partial reflection state and then apply a portion to the user if applicable, but you would have to replicate this formula for every single skill in the game that can be reflected. Which is both sort of impractical and will make you likely run you out of space in the box if you actually try.


You will need to find or make a script that creates a check for partial reflection (through notetags or by altering how the default reflection mechanic works or whatever) and that modifies the default code which processes how damage is applied so that it processes this new mechanic.


EDIT: Same thing for physical attacks. There is only counterattacking, which you can set the chance of and when procced will replace the initial attack on the target with an attack by the target on the attacker (which is locked to the default attacking skill, skill #001 - even monsters that don't have this skill on their list will use it to counterattack). There is no existing partial counterattack mechanic in the engine.

Edited by Traverse

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.