var Tired: logic = false
var SchoolTomorrow: logic = true
var WhatToWatch: string = “nothing”
if (Tired?):
set WhatToWatch = “your eyelids”
else:
set WhatToWatch = “cartoons”
CalculateDamage(PlayerHealth : float, DesiredDamageAmount : float, MinHealth : float) : float =
# If the damage amount would not eliminate the player, do that amount of damage
if (PlayerHealth > DesiredDamageAmount):
return DesiredDamageAmount
else if (PlayerHealth > MinHealth):
# Give player one more chance if their health is low
return PlayerHealth - MinHealth
else:
# Eliminate player
return PlayerHealth
コメント