Skip to content

Instantly share code, notes, and snippets.

@jm
Created June 21, 2019 14:25
Show Gist options
  • Save jm/124d5486f95db2253a69076a47361f11 to your computer and use it in GitHub Desktop.
Save jm/124d5486f95db2253a69076a47361f11 to your computer and use it in GitHub Desktop.
damageDealt = 0
armor -= dmg
if armor <= 0
{
damageDealt = -armor
armor = 0
}
hp -= damageDealt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment