Add announce and resolve templates to combat moves
This commit is contained in:
parent
2b21257d26
commit
15cc0d1ae0
4 changed files with 45 additions and 4 deletions
|
|
@ -6,9 +6,15 @@ timing_window_ms = 1800
|
||||||
damage_pct = 0.15
|
damage_pct = 0.15
|
||||||
|
|
||||||
[variants.left]
|
[variants.left]
|
||||||
telegraph = "{attacker} winds up a left hook!"
|
telegraph = "{attacker} retracts {his} left arm..."
|
||||||
|
announce = "{attacker} throw{s} a left hook at {defender}!"
|
||||||
|
resolve_hit = "{attacker} connect{s} with a left hook!"
|
||||||
|
resolve_miss = "{defender} dodge{s} {attacker}'s left hook!"
|
||||||
countered_by = ["dodge right", "parry high"]
|
countered_by = ["dodge right", "parry high"]
|
||||||
|
|
||||||
[variants.right]
|
[variants.right]
|
||||||
telegraph = "{attacker} winds up a right hook!"
|
telegraph = "{attacker} retracts {his} right arm..."
|
||||||
|
announce = "{attacker} throw{s} a right hook at {defender}!"
|
||||||
|
resolve_hit = "{attacker} connect{s} with a right hook!"
|
||||||
|
resolve_miss = "{defender} dodge{s} {attacker}'s right hook!"
|
||||||
countered_by = ["dodge left", "parry high"]
|
countered_by = ["dodge left", "parry high"]
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@ name = "roundhouse"
|
||||||
description = "a spinning kick that sacrifices speed for devastating power"
|
description = "a spinning kick that sacrifices speed for devastating power"
|
||||||
move_type = "attack"
|
move_type = "attack"
|
||||||
stamina_cost = 8.0
|
stamina_cost = 8.0
|
||||||
telegraph = "{attacker} spins into a roundhouse kick!"
|
telegraph = "{attacker} shifts {his} weight back..."
|
||||||
|
announce = "{attacker} launch{es} a roundhouse kick at {defender}!"
|
||||||
|
resolve_hit = "{attacker}'s roundhouse slams into {defender}!"
|
||||||
|
resolve_miss = "{defender} counter{s} {attacker}'s roundhouse!"
|
||||||
timing_window_ms = 2000
|
timing_window_ms = 2000
|
||||||
damage_pct = 0.25
|
damage_pct = 0.25
|
||||||
countered_by = ["duck", "parry high", "parry low"]
|
countered_by = ["duck", "parry high", "parry low"]
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@ name = "sweep"
|
||||||
description = "a low kick targeting the legs, designed to take an opponent off balance"
|
description = "a low kick targeting the legs, designed to take an opponent off balance"
|
||||||
move_type = "attack"
|
move_type = "attack"
|
||||||
stamina_cost = 6.0
|
stamina_cost = 6.0
|
||||||
telegraph = "{attacker} drops low for a leg sweep!"
|
telegraph = "{attacker} drops low..."
|
||||||
|
announce = "{attacker} sweep{s} at {defender}'s legs!"
|
||||||
|
resolve_hit = "{attacker}'s sweep catches {defender}'s legs!"
|
||||||
|
resolve_miss = "{defender} jump{s} over {attacker}'s sweep!"
|
||||||
timing_window_ms = 1800
|
timing_window_ms = 1800
|
||||||
damage_pct = 0.18
|
damage_pct = 0.18
|
||||||
countered_by = ["jump", "parry low"]
|
countered_by = ["jump", "parry low"]
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,13 @@ class CombatMove:
|
||||||
# variant key ("left", "right", "" for simple moves)
|
# variant key ("left", "right", "" for simple moves)
|
||||||
variant: str = ""
|
variant: str = ""
|
||||||
description: str = ""
|
description: str = ""
|
||||||
|
# Three-beat output templates
|
||||||
|
announce: str = "" # POV template for announce beat
|
||||||
|
resolve_hit: str = "" # POV template for hit (wrong/no defense)
|
||||||
|
resolve_miss: str = "" # POV template for successful counter
|
||||||
|
telegraph_color: str = "dim" # color tag for telegraph
|
||||||
|
announce_color: str = "" # color tag for announce (default/none)
|
||||||
|
resolve_color: str = "bold" # color tag for resolve
|
||||||
|
|
||||||
|
|
||||||
def load_move(path: Path) -> list[CombatMove]:
|
def load_move(path: Path) -> list[CombatMove]:
|
||||||
|
|
@ -85,6 +92,22 @@ def load_move(path: Path) -> list[CombatMove]:
|
||||||
command=base_name,
|
command=base_name,
|
||||||
variant=variant_key,
|
variant=variant_key,
|
||||||
description=data.get("description", ""),
|
description=data.get("description", ""),
|
||||||
|
announce=variant_data.get("announce", data.get("announce", "")),
|
||||||
|
resolve_hit=variant_data.get(
|
||||||
|
"resolve_hit", data.get("resolve_hit", "")
|
||||||
|
),
|
||||||
|
resolve_miss=variant_data.get(
|
||||||
|
"resolve_miss", data.get("resolve_miss", "")
|
||||||
|
),
|
||||||
|
telegraph_color=variant_data.get(
|
||||||
|
"telegraph_color", data.get("telegraph_color", "dim")
|
||||||
|
),
|
||||||
|
announce_color=variant_data.get(
|
||||||
|
"announce_color", data.get("announce_color", "")
|
||||||
|
),
|
||||||
|
resolve_color=variant_data.get(
|
||||||
|
"resolve_color", data.get("resolve_color", "bold")
|
||||||
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return moves
|
return moves
|
||||||
|
|
@ -104,6 +127,12 @@ def load_move(path: Path) -> list[CombatMove]:
|
||||||
command=base_name,
|
command=base_name,
|
||||||
variant="",
|
variant="",
|
||||||
description=data.get("description", ""),
|
description=data.get("description", ""),
|
||||||
|
announce=data.get("announce", ""),
|
||||||
|
resolve_hit=data.get("resolve_hit", ""),
|
||||||
|
resolve_miss=data.get("resolve_miss", ""),
|
||||||
|
telegraph_color=data.get("telegraph_color", "dim"),
|
||||||
|
announce_color=data.get("announce_color", ""),
|
||||||
|
resolve_color=data.get("resolve_color", "bold"),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue