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
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 | |
} |