Hey,
i am working on a project for teaching purposes. The idea is, that the player needs to do exact the HP of the enemies as damage in order to win battles. The Attacks must always deal damage in decimals (for example a tenth of the max hp or a triple of the current hp).
My Problem ist that the HP are not decimals, so i run into problems if i, say, want to subtract a third of the HP twice. The game rounds the Enemy HP, if they got 100 max HP, to 32. Now a third attack, dealing again a third of the max HP, wont kill, because it deals 33.3 damage, not 32.
Is there any way to change the HP into a decimal or a other way to bypass this problem?
i am working on a project for teaching purposes. The idea is, that the player needs to do exact the HP of the enemies as damage in order to win battles. The Attacks must always deal damage in decimals (for example a tenth of the max hp or a triple of the current hp).
My Problem ist that the HP are not decimals, so i run into problems if i, say, want to subtract a third of the HP twice. The game rounds the Enemy HP, if they got 100 max HP, to 32. Now a third attack, dealing again a third of the max HP, wont kill, because it deals 33.3 damage, not 32.
Is there any way to change the HP into a decimal or a other way to bypass this problem?