Beispiel #1
0
class SigilAdv(Adv):
    def config_sigil(self, duration=300, **kwargs):
        self.unlocked = False
        self.unlocked_time = None
        self.locked_sigil = EffectBuff("locked_sigil", duration, lambda: None,
                                       self.a_sigil_unlock).no_bufftime()
        self.locked_sigil.on()
        self.sigil_mode = ModeManager(group="sigil", **kwargs)

    def a_sigil_unlock(self):
        self.unlocked = True
        self.unlocked_time = now()
        self.sigil_mode.on()

    def a_update_sigil(self, time):
        if not self.unlocked:
            duration = self.locked_sigil.buff_end_timer.add(time)
            if duration <= 0:
                self.locked_sigil.off()
                self.a_sigil_unlock()

    def post_run(self, end):
        if self.comment:
            self.comment += "; "
        if self.unlocked_time is not None:
            self.comment += f"unlock at {self.unlocked_time:.02f}s"
        else:
            self.comment += f"not unlocked"
Beispiel #2
0
class SigilAdv(Adv):
    def config_sigil(self, duration=300, **kwargs):
        self.unlocked = False
        self.locked_sigil = EffectBuff('locked_sigil', 300, lambda: None, self.sigil_unlock).no_bufftime()
        self.locked_sigil.on()
        self.sigil_mode = ModeManager(group='sigil', **kwargs)

    def sigil_unlock(self):
        self.unlocked = now()
        self.sigil_mode.on()

    def update_sigil(self, time):
        duration = self.locked_sigil.buff_end_timer.add(time)
        if duration <= 0:
            self.locked_sigil.off()
            self.sigil_unlock()