Use challenge functions, add further calculations
This commit is contained in:
parent
6fedd6979f
commit
515449addd
|
@ -5,29 +5,8 @@ from enum import Enum
|
|||
|
||||
from .costs import Cost
|
||||
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
|
||||
from ..read_char import Char
|
||||
from ..challenge_functions import narrow_challenge, mean_outcome
|
||||
|
||||
|
||||
class Adjustment(Enum):
|
||||
|
@ -35,23 +14,23 @@ class Adjustment(Enum):
|
|||
|
||||
CARVE_AWAY_AGE = Action(
|
||||
"Carve away some evidence of age",
|
||||
cost = Cost.ACTION.value / _narrow_challenge_6(Char.MITHRIDACY.value),
|
||||
cost = Cost.ACTION.value / narrow_challenge(6, Char.MITHRIDACY.value),
|
||||
antiquity = -2,
|
||||
implausibility = _implausibility(Char.MITHRIDACY.value)
|
||||
implausibility = mean_outcome(0, 2, narrow_challenge(6, Char.MITHRIDACY.value))
|
||||
)
|
||||
|
||||
DISGUISE_AMALGAMY = Action(
|
||||
"Disguise the amalgamy of this piece",
|
||||
cost = 25*Cost.JADE_FRAGMENT.value + Cost.ACTION.value / _narrow_challenge_6(Char.KATALEPTIC_TOXICOLOGY.value),
|
||||
cost = 25*Cost.JADE_FRAGMENT.value + Cost.ACTION.value / narrow_challenge(6, Char.KATALEPTIC_TOXICOLOGY.value),
|
||||
amalgamy = -2,
|
||||
implausibility = _implausibility(Char.KATALEPTIC_TOXICOLOGY.value)
|
||||
implausibility = mean_outcome(0, 2, narrow_challenge(6, Char.KATALEPTIC_TOXICOLOGY.value))
|
||||
)
|
||||
|
||||
MAKE_LESS_DREADFUL = Action(
|
||||
"Make your skeleton less dreadful",
|
||||
cost = Cost.ACTION.value / _narrow_challenge_6(Char.KATALEPTIC_TOXICOLOGY.value),
|
||||
cost = Cost.ACTION.value / narrow_challenge(6, Char.KATALEPTIC_TOXICOLOGY.value),
|
||||
menace = -2,
|
||||
implausibility = _implausibility(Char.KATALEPTIC_TOXICOLOGY.value)
|
||||
implausibility = mean_outcome(0, 2, narrow_challenge(6, Char.KATALEPTIC_TOXICOLOGY.value))
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
@ -5,8 +5,8 @@ from enum import Enum
|
|||
|
||||
from .costs import Cost
|
||||
from ..objects.action import Action
|
||||
from ..read_char import *
|
||||
from ..challenge_functions import narrow_challenge, mean_outcome
|
||||
from ..read_char import Char
|
||||
from ..challenge_functions import narrow_challenge, broad_challenge, mean_outcome
|
||||
|
||||
|
||||
class Appendage(Enum):
|
||||
|
@ -128,7 +128,8 @@ class Appendage(Enum):
|
|||
cost = Cost.ACTION.value + Cost.IVORY_FEMUR.value,
|
||||
value = 6500,
|
||||
limbs_needed = -1,
|
||||
legs = 1
|
||||
legs = 1,
|
||||
implausibility = mean_outcome(0, 4, narrow_challenge(7, Char.MONSTROUS_ANATOMY.value))
|
||||
)
|
||||
|
||||
IVORY_HUMERUS = Action(
|
||||
|
@ -136,9 +137,12 @@ class Appendage(Enum):
|
|||
cost = Cost.ACTION.value + Cost.IVORY_HUMERUS.value,
|
||||
value = 1500,
|
||||
limbs_needed = -1,
|
||||
arms = 1
|
||||
arms = 1,
|
||||
implausibility = mean_outcome(0, 2, narrow_challenge(6, Char.KATALEPTIC_TOXICOLOGY.value))
|
||||
)
|
||||
|
||||
# TODO: Base challenge: Narrow, Mithridacy 1
|
||||
# Difficulty increases by 2 for each Fin or Tentacle already attached to your skeleton.
|
||||
JURASSIC_THIGH = Action(
|
||||
"Apply a Jurassic Thigh Bone to your (Skeleton Type)",
|
||||
cost = Cost.ACTION.value + Cost.JURASSIC_FEMUR.value,
|
||||
|
@ -148,6 +152,8 @@ class Appendage(Enum):
|
|||
antiquity = 1
|
||||
)
|
||||
|
||||
# TODO: Base challenge: Narrow, Mithridacy 6
|
||||
# Difficulty increases by 1 for each limb that is NOT a KNOTTED_HUMERUS
|
||||
KNOTTED_HUMERUS = Action(
|
||||
"Apply a Knotted Humerus to your (Skeleton Type)",
|
||||
cost = Cost.ACTION.value + Cost.KNOTTED_HUMERUS.value,
|
||||
|
@ -157,6 +163,8 @@ class Appendage(Enum):
|
|||
amalgamy = 1
|
||||
)
|
||||
|
||||
# TODO: Base challenge: Monstrous Anatomy 4
|
||||
# No failure info on wiki
|
||||
OBSIDIAN_TAIL = Action(
|
||||
"Apply an Obsidian Chitin Tail to your (Skeleton Type)",
|
||||
cost = Cost.ACTION.value + Cost.OBSIDIAN_TAIL.value,
|
||||
|
@ -172,9 +180,11 @@ class Appendage(Enum):
|
|||
value = 250,
|
||||
tails_needed = -1,
|
||||
tails = 1,
|
||||
implausibility = 1
|
||||
implausibility = mean_outcome(1, 4, narrow_challenge(4, Char.MITHRIDACY.value))
|
||||
)
|
||||
|
||||
# TODO: Base challenge: Narrow, Monstrous Anatomy 1
|
||||
# Difficulty increases by 2 for each Fin already attached to your skeleton.
|
||||
TERROR_BIRD_WING = Action(
|
||||
"Add the Wing of a Young Terror Bird to your (Skeleton Type)",
|
||||
cost = Cost.ACTION.value + Cost.TERROR_BIRD_WING.value,
|
||||
|
@ -191,7 +201,7 @@ class Appendage(Enum):
|
|||
value = 250,
|
||||
tails_needed = -1,
|
||||
tails = 1,
|
||||
antiquity = 1
|
||||
antiquity = mean_outcome(0, 1, narrow_challenge(4, Char.MONSTROUS_ANATOMY.value))
|
||||
)
|
||||
|
||||
UNIDENTIFIED_THIGH = Action(
|
||||
|
@ -202,27 +212,19 @@ class Appendage(Enum):
|
|||
legs = 1
|
||||
)
|
||||
|
||||
WITHERED_TAIL = Action(
|
||||
"Apply a Withered Tentacle as a tail on your (Skeleton Type)",
|
||||
cost = Cost.ACTION.value + Cost.WITHERED_TENTACLE.value,
|
||||
value = 250,
|
||||
tails_needed = -1,
|
||||
tails = 1,
|
||||
antiquity = -1
|
||||
)
|
||||
|
||||
WITHERED_TENTACLE = Action(
|
||||
"Put a Withered Tentacle on your (Skeleton Type)",
|
||||
cost = Cost.ACTION.value + Cost.WITHERED_TENTACLE.value,
|
||||
value = 250,
|
||||
limbs_needed = -1,
|
||||
tentacles = 1,
|
||||
antiquity = -1
|
||||
antiquity = -1,
|
||||
implausibility = mean_outcome(0, 2, narrow_challenge(5, Char.MONSTROUS_ANATOMY.value))
|
||||
)
|
||||
|
||||
REMOVE_TAIL = Action(
|
||||
"Remove the tail from your (Skeleton Type)",
|
||||
cost = Cost.ACTION.value,
|
||||
cost = Cost.ACTION.value * 1 / broad_challenge(220, Char.DANGEROUS.value),
|
||||
tails = -1
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue