Skip to content

Instantly share code, notes, and snippets.

View sleepypikachu's full-sized avatar

Elliot sleepypikachu

  • Glasgow, UK
View GitHub Profile
if (armor < dmg) { //This is a special case where we want to take off health
health -= (dmg - armor)
armor = 0 // Zero out our armor pool
} else { // This is the normal case where we just want to decrement armor
armor -= dmg
}