def action_event(): if queues.action_queue.is_empty() == False: if player.ready() \ and player.is_hindered() is False \ and player.afflictions['sleep'] is False \ and player.afflictions['amnesia'] is False: action = queues.action_queue.fire() if 'reject' in action: core.enable_trigger('cures_lust', 'cures') core.enable_trigger('failure_reject', 'failures') elif 'lose' in action: core.enable_trigger('cures_emperor', 'cures') core.enable_trigger('failure_lose', 'failures') core.enable_trigger('failure_lose_follower', 'failures') core.write(action) if player.afflictions['blackout']: player.balance = False player.equilibrium = False
def free_event(now): if queues.free_queue.is_empty() == False: if player.ready() \ and player.free_balance == 1 \ and player.afflictions['amnesia'] is False \ and player.afflictions['sleep'] is False: # Flush the entire queue, we're not waiting for any balances here while queues.free_queue.length() > 0: action = queues.free_queue.pop() if action == 'stand': if player.can_stand() is False: continue core.enable_trigger('cures_prone', 'cures') core.enable_trigger('cures_prone_redundant', 'cures') elif action == 'hold breath': core.enable_trigger('asthma_hold_breath', 'symptoms') if ";" in action: action = action.split(";") for act in action: core.write(act) else: core.write(action)