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)
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"
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()
def configure_divine_shift(self, shift_name, max_gauge=1800, shift_cost=560, drain=40, buffs=None): self.shift_name = shift_name self.comment = f"dragon damage does not work on {shift_name}" setattr( self, shift_name, self.dragonform.set_dragondrive( ModeManager( group="ddrive", buffs=buffs, x=True, s1=True, s2=True, ), max_gauge=max_gauge, shift_cost=shift_cost, drain=drain, ), ) Event("dragondrive").listener(self.a_dragondrive_on) Event("dragondrive_end").listener(self.a_dragondrive_off)