nerf: probability gates on wound and flee transitions
Healthy → wounded: 50% per clean run (avg ~2 runs, was instant) Wounded → fled: 35% per clean run (avg ~3 runs, was instant) Combined expected clean runs before auto-resolve: ~5, giving the user a realistic window to type /buddymon catch between tool calls.
This commit is contained in:
parent
85f53b1e83
commit
6632d67da4
1 changed files with 12 additions and 8 deletions
|
|
@ -432,19 +432,23 @@ def main():
|
||||||
if existing:
|
if existing:
|
||||||
# On a clean Bash run (monster patterns gone), respect catch_pending,
|
# On a clean Bash run (monster patterns gone), respect catch_pending,
|
||||||
# wound a healthy monster, or auto-resolve a wounded one.
|
# wound a healthy monster, or auto-resolve a wounded one.
|
||||||
|
# Probability gates prevent back-to-back Bash runs from instantly
|
||||||
|
# resolving encounters before the user can react.
|
||||||
if output and not encounter_still_present(existing, output, catalog):
|
if output and not encounter_still_present(existing, output, catalog):
|
||||||
if existing.get("catch_pending"):
|
if existing.get("catch_pending"):
|
||||||
# User invoked /buddymon catch — hold the monster for them
|
# User invoked /buddymon catch — hold the monster for them
|
||||||
pass
|
pass
|
||||||
elif existing.get("wounded"):
|
elif existing.get("wounded"):
|
||||||
# Already wounded on last clean run — auto-resolve (it fled)
|
# Wounded: 35% chance to flee per clean run (avg ~3 runs to escape)
|
||||||
|
if random.random() < 0.35:
|
||||||
xp, display = auto_resolve_encounter(existing, buddy_id)
|
xp, display = auto_resolve_encounter(existing, buddy_id)
|
||||||
messages.append(
|
messages.append(
|
||||||
f"\n💨 **{display} fled!** (escaped while wounded)\n"
|
f"\n💨 **{display} fled!** (escaped while wounded)\n"
|
||||||
f" {buddy_display} gets partial XP: +{xp}\n"
|
f" {buddy_display} gets partial XP: +{xp}\n"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# First clean run — wound it and re-announce so user can catch
|
# Healthy: 50% chance to wound per clean run (avg ~2 runs to wound)
|
||||||
|
if random.random() < 0.50:
|
||||||
wound_encounter()
|
wound_encounter()
|
||||||
# else: monster still present, no message — don't spam every tool call
|
# else: monster still present, no message — don't spam every tool call
|
||||||
elif output or command:
|
elif output or command:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue