WIP: char stat adjusted skeleton actions
This commit is contained in:
parent
a86525324e
commit
6df8cb461c
|
@ -0,0 +1,17 @@
|
||||||
|
def narrow_challenge(difficulty_level: int, stat: int):
|
||||||
|
offset = 6 - difficulty_level
|
||||||
|
stat += offset
|
||||||
|
|
||||||
|
if stat > 9:
|
||||||
|
return 1
|
||||||
|
elif stat < 2:
|
||||||
|
return .1
|
||||||
|
else:
|
||||||
|
return stat/10
|
||||||
|
|
||||||
|
def mean_outcome(success: int, failure: int, chance: float):
|
||||||
|
mean_success = success*chance
|
||||||
|
mean_failure = failure*(1-chance)
|
||||||
|
combined_mean_outcome = mean_success + mean_failure
|
||||||
|
|
||||||
|
return combined_mean_outcome
|
|
@ -5,26 +5,53 @@ from enum import Enum
|
||||||
|
|
||||||
from .costs import Cost
|
from .costs import Cost
|
||||||
from ..objects.action import Action
|
from ..objects.action import Action
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
class Adjustment(Enum):
|
class Adjustment(Enum):
|
||||||
"""An action that is taken after all parts have been added to a skeleton."""
|
"""An action that is taken after all parts have been added to a skeleton."""
|
||||||
|
|
||||||
CARVE_AWAY_AGE = Action(
|
CARVE_AWAY_AGE = Action(
|
||||||
"Carve away some evidence of age",
|
"Carve away some evidence of age",
|
||||||
cost = Cost.ACTION.value,
|
cost = Cost.ACTION.value / _narrow_challenge_6(Char.MITHRIDACY.value),
|
||||||
antiquity = -2
|
antiquity = -2,
|
||||||
|
implausibility = _implausibility(Char.MITHRIDACY.value)
|
||||||
)
|
)
|
||||||
|
|
||||||
DISGUISE_AMALGAMY = Action(
|
DISGUISE_AMALGAMY = Action(
|
||||||
"Disguise the amalgamy of this piece",
|
"Disguise the amalgamy of this piece",
|
||||||
cost = Cost.ACTION.value + 25*Cost.JADE_FRAGMENT.value,
|
cost = 25*Cost.JADE_FRAGMENT.value + Cost.ACTION.value / _narrow_challenge_6(Char.KATALEPTIC_TOXICOLOGY.value),
|
||||||
amalgamy = -2
|
amalgamy = -2,
|
||||||
|
implausibility = _implausibility(Char.KATALEPTIC_TOXICOLOGY.value)
|
||||||
)
|
)
|
||||||
|
|
||||||
MAKE_LESS_DREADFUL = Action(
|
MAKE_LESS_DREADFUL = Action(
|
||||||
"Make your skeleton less dreadful",
|
"Make your skeleton less dreadful",
|
||||||
cost = Cost.ACTION.value,
|
cost = Cost.ACTION.value / _narrow_challenge_6(Char.KATALEPTIC_TOXICOLOGY.value),
|
||||||
menace = -2
|
menace = -2,
|
||||||
|
implausibility = _implausibility(Char.KATALEPTIC_TOXICOLOGY.value)
|
||||||
)
|
)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
|
@ -5,6 +5,9 @@ from enum import Enum
|
||||||
|
|
||||||
from .costs import Cost
|
from .costs import Cost
|
||||||
from ..objects.action import Action
|
from ..objects.action import Action
|
||||||
|
from ..read_char import *
|
||||||
|
from ..challenge_functions import narrow_challenge, mean_outcome
|
||||||
|
|
||||||
|
|
||||||
class Appendage(Enum):
|
class Appendage(Enum):
|
||||||
"""An action that is taken once all skulls are added to a skeleton."""
|
"""An action that is taken once all skulls are added to a skeleton."""
|
||||||
|
@ -17,6 +20,7 @@ class Appendage(Enum):
|
||||||
amalgamy = 2
|
amalgamy = 2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# TODO: Difficulty is increased by 2 for each Fin or Tentacle on the skeleton
|
||||||
ALBATROSS_WING = Action(
|
ALBATROSS_WING = Action(
|
||||||
"Put an Albatross Wing on your (Skeleton Type)",
|
"Put an Albatross Wing on your (Skeleton Type)",
|
||||||
cost = Cost.ACTION.value + Cost.ALBATROSS_WING.value,
|
cost = Cost.ACTION.value + Cost.ALBATROSS_WING.value,
|
||||||
|
@ -26,6 +30,7 @@ class Appendage(Enum):
|
||||||
amalgamy = 1
|
amalgamy = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# TODO: Difficulty is increased by 2 for each Arm, Leg, Wing, and Tentacle that is already attached
|
||||||
AMBER_FIN = Action(
|
AMBER_FIN = Action(
|
||||||
"Attach the Amber-Crusted Fin to your (Skeleton Type)",
|
"Attach the Amber-Crusted Fin to your (Skeleton Type)",
|
||||||
cost = Cost.ACTION.value + Cost.AMBER_FIN.value,
|
cost = Cost.ACTION.value + Cost.AMBER_FIN.value,
|
||||||
|
@ -36,6 +41,7 @@ class Appendage(Enum):
|
||||||
menace = 1
|
menace = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# TODO: Difficulty is increased with Fins on the skeleton
|
||||||
BAT_WING = Action(
|
BAT_WING = Action(
|
||||||
"Add a Bat Wing to your (Skeleton Type)",
|
"Add a Bat Wing to your (Skeleton Type)",
|
||||||
cost = Cost.ACTION.value + Cost.BAT_WING.value,
|
cost = Cost.ACTION.value + Cost.BAT_WING.value,
|
||||||
|
@ -51,7 +57,7 @@ class Appendage(Enum):
|
||||||
value = 50,
|
value = 50,
|
||||||
tails_needed = -1,
|
tails_needed = -1,
|
||||||
tails = 1,
|
tails = 1,
|
||||||
menace = 2
|
menace = mean_outcome(2, 1, narrow_challenge(4, Char.MONSTROUS_ANATOMY.value))
|
||||||
)
|
)
|
||||||
|
|
||||||
CRUSTACEAN_PINCER = Action(
|
CRUSTACEAN_PINCER = Action(
|
||||||
|
@ -80,6 +86,8 @@ class Appendage(Enum):
|
||||||
legs = 1
|
legs = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# TODO: Base challenge: Narrow, Monstrous Anatomy 1
|
||||||
|
# The difficulty is increased by 2 for each Arm, Leg, Wing, and Tentacle already attached to your skeleton.
|
||||||
FIN_BONES = Action(
|
FIN_BONES = Action(
|
||||||
"Put Fins on your (Skeleton Type)",
|
"Put Fins on your (Skeleton Type)",
|
||||||
cost = Cost.ACTION.value + Cost.FIN_BONES.value,
|
cost = Cost.ACTION.value + Cost.FIN_BONES.value,
|
||||||
|
@ -94,7 +102,7 @@ class Appendage(Enum):
|
||||||
value = 2750,
|
value = 2750,
|
||||||
limbs_needed = -1,
|
limbs_needed = -1,
|
||||||
arms = 1,
|
arms = 1,
|
||||||
antiquity = 2
|
antiquity = mean_outcome(2, 1, narrow_challenge(11, Char.MONSTROUS_ANATOMY.value))
|
||||||
)
|
)
|
||||||
|
|
||||||
HELICAL_THIGH = Action(
|
HELICAL_THIGH = Action(
|
||||||
|
@ -103,7 +111,7 @@ class Appendage(Enum):
|
||||||
value = 300,
|
value = 300,
|
||||||
limbs_needed = -1,
|
limbs_needed = -1,
|
||||||
legs = 1,
|
legs = 1,
|
||||||
amalgamy = 2
|
amalgamy = mean_outcome(2, 1, narrow_challenge(6, Char.SHAPELING_ARTS.value))
|
||||||
)
|
)
|
||||||
|
|
||||||
HUMAN_ARM = Action(
|
HUMAN_ARM = Action(
|
||||||
|
|
|
@ -5,6 +5,21 @@ from enum import Enum
|
||||||
|
|
||||||
from .costs import Cost
|
from .costs import Cost
|
||||||
from ..objects.action import Action
|
from ..objects.action import Action
|
||||||
|
from ..read_char import *
|
||||||
|
from ..challenge_functions import narrow_challenge
|
||||||
|
|
||||||
|
|
||||||
|
def _convincing_history_cost():
|
||||||
|
chance = narrow_challenge(6, Char.KATALEPTIC_TOXICOLOGY.value)
|
||||||
|
|
||||||
|
if chance == 1:
|
||||||
|
cost = 3*Cost.REVISIONIST_NARRATIVE.value + Cost.ACTION.value
|
||||||
|
else:
|
||||||
|
actions = 1 / chance
|
||||||
|
cost = actions * Cost.ACTION.value
|
||||||
|
cost += Cost.REVISIONIST_NARRATIVE.value * (3 + actions - 1)
|
||||||
|
return cost
|
||||||
|
|
||||||
|
|
||||||
class Embellishment(Enum):
|
class Embellishment(Enum):
|
||||||
"""An action is taken after a declaration has been made for a skeleton."""
|
"""An action is taken after a declaration has been made for a skeleton."""
|
||||||
|
@ -17,7 +32,7 @@ class Embellishment(Enum):
|
||||||
|
|
||||||
CONVINCING_HISTORY = Action(
|
CONVINCING_HISTORY = Action(
|
||||||
"Invest great time and skill in coming up with a convincing history",
|
"Invest great time and skill in coming up with a convincing history",
|
||||||
cost = Cost.ACTION.value + 3*Cost.REVISIONIST_NARRATIVE.value,
|
cost = _convincing_history_cost(),
|
||||||
implausibility = -5
|
implausibility = -5
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue