> Tutorial
We saw in the previous chapter how to boost yourself, give yourself a shield and heal yourself. You have surely noticed that boosting and protecting yourself is always useful, but healing yourself is useless when our life is already at its maximum.
To avoid casting a heal and wasting TP , we will use a condition which is written:
This code will cast the Bandage only if we are injured, ie when our current life getLife() is less ` Which code(s) are valid?
if getLife() < getTotalLife() { useChip(CHIP_BANDAGE) } if (getLife() < getTotalLife() { useChip(CHIP_BANDAGE) }) if (getLife() < getTotalLife()) { useChip(CHIP_BANDAGE) } else { useChip(CHIP_HELMET) } if { getLife() < getTotalLife() } { useChip(CHIP_BANDAGE) }
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.