WIP: char stat adjusted skeleton actions

This commit is contained in:
TheTaques 2021-08-24 13:18:20 +02:00
parent a86525324e
commit b002ca6e96
3 changed files with 75 additions and 8 deletions

View File

@ -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):

View File

@ -5,6 +5,18 @@ 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_4(stat: int):
stat += 2
if stat < 8:
chance = stat/10
else:
chance = 1
return chance
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 +29,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 +39,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 +50,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 +66,7 @@ class Appendage(Enum):
value = 50, value = 50,
tails_needed = -1, tails_needed = -1,
tails = 1, tails = 1,
menace = 2 menace = 2 * _narrow_challenge_4(Char.MONSTROUS_ANATOMY.value) + 1 * (1 - _narrow_challenge_4(Char.MONSTROUS_ANATOMY.value))
) )
CRUSTACEAN_PINCER = Action( CRUSTACEAN_PINCER = Action(

View File

@ -5,6 +5,31 @@ 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 _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 +42,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
) )