Continue with tutorial writing

This commit is contained in:
Griatch 2022-08-06 01:23:07 +02:00
parent e84933d452
commit fe9157da16
7 changed files with 589 additions and 12 deletions

View file

@ -31,9 +31,6 @@ class Ability(Enum):
CHA = "charisma"
ARMOR = "armor"
HP = "hp"
LEVEL = "level"
XP = "xp"
CRITICAL_FAILURE = "critical_failure"
CRITICAL_SUCCESS = "critical_success"

View file

@ -346,13 +346,12 @@ class EvAdventureRollEngine:
character.at_death()
else:
# refresh health, but get permanent ability loss
new_hp = max(character.hp_max, self.roll("1d4"))
self.heal(character, self.roll("1d4"))
setattr(character, abi, current_abi)
character.hp = new_hp
character.msg(
"~" * 78 + "\n|yYou survive your brush with death, "
f"but are |r{result.upper()}|y and permenently |rlose {loss} {abi}|y.|n\n"
f"but are |r{result.upper()}|y and permanently |rlose {loss} {abi}|y.|n\n"
f"|GYou recover |g{new_hp}|G health|.\n" + "~" * 78
)
@ -532,7 +531,7 @@ class EvAdventureCharacterGeneration:
for item in self.backpack:
# TODO create here
character.equipment.add(item)
character.equipment.store(item)
# character improvement