Beispiel #1
0
    'FSC':
    lambda e: e.pin.startswith('fs') and e.dstat != -1 and e.dhit == 0,
    'FSCF':
    lambda e: e.pin.startswith('fs') and e.dstat != -1,
    'SP':
    lambda e: e.dname if e.pin == 'sp' else None,
    'PREP':
    lambda e: e.pin == 'prep',
    'REPEAT':
    lambda e: e.didx if e.dname.endswith('repeat') else 0
}
PIN_CMD['CANCEL'] = lambda e: PIN_CMD['X'](e) or PIN_CMD['FSC'](e)

PARAM_EVAL = {
    'DURATION': lambda adv: adv.duration,
    'NOW': lambda _: now(),
}

LITERAL_EVAL = {
    'SIGNED_INT': int,
    'SIGNED_FLOAT': float,
    'STRING': str,
    'BOOLEAN': bool,
    'NONE': lambda: None,
}


def allow_acl(f):
    f.allow_acl = True
    return f
Beispiel #2
0
 def timeleft(self):
     return -1 if self.duration == -1 else (self.buff_end_timer.timing-now())
Beispiel #3
0
 def a_sigil_unlock(self):
     self.unlocked = now()
     self.sigil_mode.on()
Beispiel #4
0
 def resume(self):
     self.pause_time = max(self.pause_time, self.refresh_time)
     if self.pause_time > 0:
         log("resume", self.name, self.pause_time, now() + self.pause_time)
         self.buff_end_timer.on(self.pause_time)
     self.pause_time = -1
Beispiel #5
0
 def resume(self, e=None):
     if self.pause_time > 0:
         self.pause_time = max(self.pause_time, self.buffs[self.level - 1].refresh_time)
         self.buffs[self.level - 1].buff_end_timer.on(self.pause_time)
         log("resume", self.pause_by, self.pause_time, now() + self.pause_time)
     self.pause_time = -1
Beispiel #6
0
    "FSC":
    lambda e: e.pin.startswith("fs") and e.dstat != -1 and e.dhit == 0,
    "FSCF":
    lambda e: e.pin.startswith("fs") and e.dstat != -1,
    "SP":
    lambda e: e.dname if e.pin == "sp" else None,
    "PREP":
    lambda e: e.pin == "prep",
    "REPEAT":
    lambda e: e.didx if e.dname.endswith("repeat") else 0,
}
PIN_CMD["CANCEL"] = lambda e: PIN_CMD["X"](e) or PIN_CMD["FSC"](e)

PARAM_EVAL = {
    "DURATION": lambda adv: adv.duration,
    "NOW": lambda _: now(),
}

LITERAL_EVAL = {
    "SIGNED_INT": int,
    "SIGNED_FLOAT": float,
    "STRING": str,
    "BOOLEAN": bool,
    "NONE": lambda: None,
}


def allow_acl(f):
    f.allow_acl = True
    return f
Beispiel #7
0
 def pause_auto_gauge(self):
     self.dragon_gauge_timer_diff = self.dragon_gauge_timer.timing - now()
     self.dragon_gauge_timer.off()