2021-08-03 17:53:25 +00:00
|
|
|
__all__ = ['Adjustment']
|
|
|
|
__author__ = "Jeremy Saklad"
|
|
|
|
|
2021-08-03 17:24:53 +00:00
|
|
|
from enum import Enum
|
|
|
|
|
2021-08-03 19:48:42 +00:00
|
|
|
from .costs import Cost
|
|
|
|
from ..objects.action import Action
|
2021-08-24 11:18:20 +00:00
|
|
|
from ..read_char import *
|
|
|
|
|
|
|
|
|
|
|
|
def _narrow_challenge_6(stat: int):
|
|
|
|
if 0 < stat < 11:
|
|
|
|
chance = stat/10
|
|
|
|
elif stat < 1:
|
|
|
|
chance = .1
|
|
|
|
else:
|
|
|
|
chance = 1
|
|
|
|
|
|
|
|
return chance
|
|
|
|
|
|
|
|
|
|
|
|
def _implausibility(stat: int):
|
|
|
|
chance = _narrow_challenge_6(stat)
|
|
|
|
|
|
|
|
if chance == 1:
|
|
|
|
return 0
|
|
|
|
else:
|
|
|
|
failure_actions = (1 / chance) - 1
|
|
|
|
implausibility = 2 * failure_actions
|
|
|
|
return implausibility
|
|
|
|
|
2021-08-03 17:24:53 +00:00
|
|
|
|
|
|
|
class Adjustment(Enum):
|
|
|
|
"""An action that is taken after all parts have been added to a skeleton."""
|
|
|
|
|
|
|
|
CARVE_AWAY_AGE = Action(
|
|
|
|
"Carve away some evidence of age",
|
2021-08-24 11:18:20 +00:00
|
|
|
cost = Cost.ACTION.value / _narrow_challenge_6(Char.MITHRIDACY.value),
|
|
|
|
antiquity = -2,
|
|
|
|
implausibility = _implausibility(Char.MITHRIDACY.value)
|
2021-08-03 17:24:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
DISGUISE_AMALGAMY = Action(
|
|
|
|
"Disguise the amalgamy of this piece",
|
2021-08-24 11:18:20 +00:00
|
|
|
cost = 25*Cost.JADE_FRAGMENT.value + Cost.ACTION.value / _narrow_challenge_6(Char.KATALEPTIC_TOXICOLOGY.value),
|
|
|
|
amalgamy = -2,
|
|
|
|
implausibility = _implausibility(Char.KATALEPTIC_TOXICOLOGY.value)
|
2021-08-03 17:24:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
MAKE_LESS_DREADFUL = Action(
|
|
|
|
"Make your skeleton less dreadful",
|
2021-08-24 11:18:20 +00:00
|
|
|
cost = Cost.ACTION.value / _narrow_challenge_6(Char.KATALEPTIC_TOXICOLOGY.value),
|
|
|
|
menace = -2,
|
|
|
|
implausibility = _implausibility(Char.KATALEPTIC_TOXICOLOGY.value)
|
2021-08-03 17:24:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return str(self.value)
|