Skip to content

Instantly share code, notes, and snippets.

@gastrop0d

gastrop0d/crit3.cs Secret

Last active Feb 9, 2018
Embed
What would you like to do?
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
You can’t perform that action at this time.