def add_player(gmcp_data): # {"name": "Adrik", "fullname": "Adrik Bergson, the Crystalline Song"} player = gmcp_data["name"] echo(f"+{player}") fighting(f"+{player}") s.players_in_room = (*s.players_in_room, player) update_frenemies()
def someone_stopped_rebounding(matches): highlight_current_line(Fore.YELLOW) if matches[0].lower() == s.target.lower(): echo("TARGET STOPPED REBOUNDING!!") echo("TARGET STOPPED REBOUNDING!!") fighting(f"{s.target} STOPPED REBOUNDING!!") else: fighting(f"{matches[0]} stopped rebounding!!")
def someone_shielded(matches): highlight_current_line(Fore.YELLOW) if matches[0].lower() == s.target.lower(): echo("TARGET SHIELDED!!") echo("TARGET SHIELDED!!") fighting(f"{s.target} SHIELDED!!") else: fighting(f"{matches[0]} shielded!!")
def being_grove_summoned(matches): highlight_current_line(Fore.RED) if matches: echo(f"{matches[0].upper()} IS BEING GROVE SUMMONED!!!!") fighting(f"{matches[0].upper()} IS BEING GROVE SUMMONED!!") else: echo("YOU'RE BEING GROVE SUMMONED!!!! SHIELD!!!") fighting(f"YOU'RE BEING GROVE SUMMONED!! SHIELD!!!")
def gained_aff(gmcp_data): new_aff = gmcp_data["name"] echo(f"Gained {new_aff}!") s.new_afflictions.add(new_aff) s.current_afflictions.add(new_aff) fighting(f"Affs: {' '.join(_summarize_afflictions())}") if new_aff in shield_affs: echo(f"{Fore.YELLOW}{Style.BRIGHT}#### Gained {new_aff} ####") echo(f"### May want to Shield ###{Style.RESET_ALL}")
def remove_player(gmcp_data): # "Farrah" echo(f"-{gmcp_data}") fighting(f"-{gmcp_data}") players = set(s.players_in_room) players.discard(gmcp_data) if players: s.players_in_room = tuple(players) else: s.players_in_room = tuple() update_frenemies()
def recovered_bal(matches): # echo("Got BAL back!") fighting("You have recovered balance on all limbs.")
def recovered_eq(matches): # echo("Got EQ back!") fighting("You have recovered equilibrium")
def someone_died(matches): victim = matches[0] killer = matches[1] echo(f"{killer} killed {victim}!") fighting(f"{killer} killed {victim}!") send("queue prepend eqbal grab body")
def someone_rebounding(matches): highlight_current_line(Fore.YELLOW) if matches[0].lower() == s.target.lower(): echo("TARGET REBOUNDING!!") echo("TARGET REBOUNDING!!") fighting(f"{s.target} REBOUNDING!!")
r"exhales loudly.$", # don't need to see this! lambda m: c.delete_line(), ), ( r"inhales and begins holding (\w+) breath.$", # don't need to see this! lambda m: c.delete_line(), ), ( r"has been slain by", # don't need to see this! lambda m: someone_died, ), ( r"You begin to tumble agilely to the (.*).$", # tumbling! lambda m: fighting(f"tumbling {m[0]}"), ), ( r"The barrier around Torrid Rakia, the magma wyvern melts through the ground, and she rushes through to attack.$", # tumbling! lambda m: rakia(), ), ( r"^You are already wielding that.$", lambda m: c.delete_line(), ), ] c.add_triggers(generic_triggers)
def fighting_pann(msg): fighting(msg) party_announce(msg, "jester")
from client import c, echo, send register_announce_type("jester") def fighting_pann(msg): fighting(msg) party_announce(msg, "jester") pranks_triggers = [ ( r"^You reach out and bop (.*) on the nose with your blackjack.$", # bop'd someone! lambda m: fighting(f"BOP'D {m[0]}"), ), ( r"^You quickly slip (.*) a mickey.$", lambda m: fighting_pann(f"MICKEY'd {m[0]}"), ), ] c.add_triggers(pranks_triggers) tarot_triggers = [ ( r"^Standing the Aeon on your open palm, you blow it lightly at (.*) and watch as it seems to slow .* movement through the time stream.$", lambda m: fighting_pann(f"AEON'd {m[0]}"), ), ]
def littany(matches): fighting(f"Eek! {matches[0]} is !") echo(f"Eek! {matches[0]} is !") send("writhe;writhe;writhe;sit")
def cured_aff(gmcp_data): cured_affs = set(gmcp_data) echo(f"Cured {', '.join(cured_affs)}!") s.cured_afflictions.update(cured_affs) s.current_afflictions.difference_update(set(cured_affs)) fighting(f"Affs: {' '.join(_summarize_afflictions())}")