feat(rules): support multi-projectile spells
SRD Magic Missile fires one missile +1 per two caster levels beyond 1st (max 5, 1d4+1 force, auto-hit); Scorching Ray fires one ray +1 per four levels beyond 3rd (max 3, 4d6 fire, ranged touch each). DamageEffect gains a ProjectileScaling spec (JSON 'projectiles'); _apply_damage_effect loops count_for(caster_level) projectiles, each rolling its own damage and (for a declared-projectile ray) its own ranged touch attack, with the target-drops-mid-sequence convention losing the rest. Updated magic_missile.json/scorching_ray.json, the golden lich transcript (CL 11 now fires 5 missiles, Tammara dies round 1: 43 damage), the scripted MM queues in test_spells/test_conformance_spellflow, added tests/test_multi_projectile.py, and the README. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -92,33 +92,24 @@ class TestGoldenCombats:
|
||||
)
|
||||
|
||||
def test_tammara_vs_lich(self):
|
||||
"""Tammara vs Lich (boss fight) — full pinned transcript."""
|
||||
"""Tammara vs Lich (boss fight) — full pinned transcript.
|
||||
|
||||
Updated (S2b): the lich is caster level 11, so Magic Missile now fires
|
||||
its SRD full five missiles (1d4+1 each) instead of a single one. Three
|
||||
missiles (16 + 11 + 16 = 43) drop Tammara below 0 hp on round 1; the
|
||||
remaining two are lost (the engine's target-drops-mid-sequence
|
||||
convention), so the lich wins in 1 round.
|
||||
"""
|
||||
result, _ = run_golden("tammara", "lich")
|
||||
assert result.winner == "monsters"
|
||||
assert result.rounds == 6
|
||||
assert result.rounds == 1
|
||||
assert result.transcript == (
|
||||
"initiative: tammara d20=15+7=22",
|
||||
"initiative: lich d20=10+6=16",
|
||||
("round 1 tammara: cast Bull's Strength vs tammara DC15 SAVED -> buff 2 mods (60r) "
|
||||
"(36->36)"),
|
||||
"round 1 lich: cast Magic Missile vs tammara DC16 NO SAVE -> 16 damage (36->20)",
|
||||
("round 2 tammara: cast Bull's Strength vs tammara DC15 SAVED -> buff 2 mods (60r) "
|
||||
"(20->20)"),
|
||||
"round 2 lich: cast Magic Missile vs tammara DC16 NO SAVE -> 16 damage (20->4)",
|
||||
"round 3 tammara: cast Cure Light Wounds vs tammara DC14 SAVED -> +16 HP (4->20)",
|
||||
"round 3 lich: cast Magic Missile vs tammara DC16 NO SAVE -> 11 damage (20->9)",
|
||||
"round 4 tammara: cast Cure Light Wounds vs tammara DC14 SAVED -> +11 HP (9->20)",
|
||||
"round 4 lich: cast Magic Missile vs tammara DC16 NO SAVE -> 16 damage (20->4)",
|
||||
"round 5 tammara: cast Cure Light Wounds vs tammara DC14 SAVED -> +16 HP (4->20)",
|
||||
"round 5 lich: move (10,10)->(9,9)->(8,8)->(7,7)->(6,6)->(5,5)->(4,4)",
|
||||
("round 6 tammara: cast Bull's Strength vs tammara DC15 SAVED -> buff 2 mods (60r) "
|
||||
"(20->20)"),
|
||||
"round 6 lich: fear aura on tammara -> SAVED",
|
||||
"round 6 lich: move (4,4)->(3,3)->(2,2)->(1,1)",
|
||||
("round 6 lich: Paralyzing Touch vs tammara d20=10+10=20 AC 16 -> HIT 25 damage "
|
||||
"(20->-5) paralyzed (11r)"),
|
||||
"round 6 lich: tammara down",
|
||||
"battle over: monsters win in 6 rounds",
|
||||
"round 1 lich: cast Magic Missile vs tammara DC16 NO SAVE -> 43 damage (36->-7)",
|
||||
"battle over: monsters win in 1 rounds",
|
||||
)
|
||||
|
||||
def _assert_deterministic_goblin(self, pc_name: str):
|
||||
|
||||
Reference in New Issue
Block a user