def applied(match, action): bodypart = match.group(1) if bodypart == "skin": assert "bodypart" not in action.args or not action.args["bodypart"] else: assert action.args["bodypart"] == bodypart lose_balance("salve") p.raise_event("SalveApplied", salve=action.args["salve"], bodypart=action.args.get("bodypart", None))
def cast_successfully(match, action): target = match.group(1) if target == 'yourself': assert action.args['target'] == 'me' lose_balance('equilibrium') set_status('reflection', True) else: assert action.args['target'].lower() == match.group(1).lower() lose_balance('equlibrium')
def harvested(match, action): lose_balance('balance')
def deactivated(match, action): lose_balance('equilibrium') set_status('selfishness', False)
def gathered(match, action): lose_balance('balance')
def already_active(match, action): assert action.first_activation_line_captured lose_balance('equilibrium') if action.args['target'] is None: set_status('vigour', True)
def hit(action, match): lose_balance('balance')
def deactivated(match, action): assert not action.args['activate'] set_status('dragon', False) lose_balance('balance') lose_balance('equilibrium')
def focused(action, match): lose_balance('focus')
def activated(action, match, event_args): assert match.group(1) == action.args['element'] assert event_args['element'] == action.args['element'] lose_balance('equilibrium') set_status('%s_channel' % action.args['element'], True)
def water_activated(match, action): for element in ['earth', 'air', 'fire', 'water']: set_status('%s_channel' % element, True) lose_balance('equilibrium')
def writhing(action, match): lose_balance('balance') set_status('entangled', False)
def started_writhing_off_transfixation(action, match): lose_balance('balance')
def started_writhing_free(action, match): lose_balance('balance')
def ate_balance_herb(match, action): herb = match.group(1) assert action.args.item == herb lose_balance('herb') p.raise_event('HerbEaten', herb=herb)
def ate_irid_moss(match, action): assert action.args.item in ('irid', 'moss') lose_balance('irid') p.raise_event('HerbEaten', herb='irid')
def first_line_captured(action, match): lose_balance('balance') action.first_line_captured = True
def activated_on_someone_else(match, action): assert action.first_activation_line_captured assert action.args['target'].lower() == match.group(1).lower() lose_balance('equilibrium')
def cast(action, match): lose_balance('equilibrium') set_status('swiftcurse', True)
def activated_on_oneself(match, action): assert action.first_activation_line_captured lose_balance('equilibrium') set_status('vigour', True)
def stage1(match, action): assert action.args['activate'] lose_balance('balance') lose_balance('equilibrium') action.transformation_stage = 1
def off_balance(action, match): lose_balance('focus')
def activated(match, action): lose_balance('equilibrium') set_status('panacea', True)
def cast_at_oneself(match, action): assert action.args['target'] == 'me' lose_balance('equilibrium') set_status('chargeshield', True)
def activated_on_someone_else(match, action): assert action.first_activation_line_captured lose_balance('equilibrium')
def cast_at_someone_else(match, action): assert action.args['target'].lower() == match.group(1).lower() lose_balance('equlibrium')
def activated(match, action): assert action.first_activation_line_captured lose_balance('equilibrium') set_status('wildgrowth', True)
def activated(match, action): lose_balance('equilibrium') set_status('barkskin', True)
def hit(match, action): lose_balance('equilibrium')
def opening_line(action, match): lose_balance('equilibrium') action.defences = []