Skip to content

Instantly share code, notes, and snippets.

@gastrop0d
Created February 9, 2018 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gastrop0d/994a096ce499f4fc15e9e0f92609f0cf to your computer and use it in GitHub Desktop.
Save gastrop0d/994a096ce499f4fc15e9e0f92609f0cf to your computer and use it in GitHub Desktop.
void ApplyDamage(Character attacker, Target target, float amount)
{
bool doCrit = attacker.HasAdvantage() || target.GrantsAdvantage();
if( doCrit )
{
amount += attacker.critDamage;
}
target.Hit(amount);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment