Game: which dragons each encounter can give; impossible bonds are not counted

A form row recording a Green bonded at the shadow Blue let the "eventually" objective
find a route whose only possible bond was that Green (ratio 1, near-zero chance).
game.yaml now lists the possible bonds per encounter (own colour; the two Greens also
Orange and Brown); anything else is a data-entry error and is not counted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
ekcSchiano
2026-11-10 02:36:49 +00:00
co-authored by Claude Opus 5.5
parent 64fd3af235
commit 8f1f0383fe
3 changed files with 25 additions and 4 deletions
+13
View File
@@ -67,3 +67,16 @@ class Gate(unittest.TestCase):
run.update(scream="Investigate & help", resolution="Killed the bullies yourself", post_path="Forest",
combat_first="Assess the situation", combat_second="Engage the smaller cadet")
self.assertEqual(model.OBSERVE["shadow"](model.prepare_run(run)), "no")
class PossibleBonds(unittest.TestCase):
def test_impossible_bond_is_not_counted(self):
good = meadow_run("reddit spreadsheet", "Orange")
good.update(hour="Tree", branch="Shadow (rare)", outcome="Bonded", outcome_color="Black", enc_Black="Bonded!",
enc_Orange=None, goal="Black", scream="Investigate & help", resolution="Killed the bullies yourself",
post_path="Forest", combat_first="Assess the situation", combat_second="Engage the smaller cadet")
bad = dict(good, enc_Black=None, enc_Blue="Incinerated", outcome_color="Green", goal="Any (for fun)")
T = model.count_tables([model.prepare_run(good), model.prepare_run(bad)])
self.assertEqual(T["encounter"]["shadow-Black"]["outcomes"], {"Black": 1})
self.assertEqual(T["encounter"]["shadow-Blue"]["outcomes"], {}) # a Green at the Blue: not counted
self.assertTrue(model.can_bond("tree-Greens", "Brown"))