-
-
Save gastrop0d/b7e2d4734128b4a1ee65cacfd300a6e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ApplyDamage(Character attacker, Target target, float amount) | |
{ | |
bool doCrit = attacker.QueryBoolOr(QUERY_ADVANTAGE_HAS) | |
|| target.QueryBoolOr(QUERY_ADVANTAGE_GRANTED); | |
if( doCrit ) | |
{ | |
amount += attacker.QueryFloatSum(QUERY_DAMAGE_CRIT); | |
} | |
target.Hit(amount); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment