from mudwyrm_users.admin.achaea import ScriptState
from mudwyrm_users.admin.achaea.action import Action, Outcome, EventOutcome
from mudwyrm_users.admin.achaea.trigger import Trigger, Alias, OnEvent, TriggerPack
from mudwyrm_users.admin.achaea.common import not_, traverse_scripts, AttrDict

from mudwyrm_users.admin.achaea.scripts import char
from mudwyrm_users.admin.achaea.scripts import afflictions
from mudwyrm_users.admin.achaea.scripts import defences
from mudwyrm_users.admin.achaea.scripts import autosip

p = None
s = ScriptState()

def init(processor):
    assert processor is not None
    global p
    p = processor

def think():
    if char.autocure:
        afflictions.cure_afflictions()
    if char.autodef:
        defences.apply_defences()
    if char.autosip:
        autosip.autosip()
