Пример #1
0
Файл: albert.py Проект: pfleg/dl
class Albert(Adv):
    a1 = ('fs', 0.5)
    conf = {}
    conf['acl'] = """
        `dragon, fsc
        `s2, s1.charged>=s1.sp-330
        `fs, s=2 and not self.afflics.paralysis.get()
        `s1, fsc
        `s3, fsc
        `s4
        `fs, seq=2
        """
    coab = ['Blade', 'Dagger', 'Peony']
    share = ['Ranzal']
    conf['afflict_res.paralysis'] = 0

    def fs_proc_alt(self, e):
        self.afflics.paralysis('fs', 100, 0.803)

    def prerun(self):
        conf_fs_alt = {
            'fs.dmg': 1.02,
            'fs.sp': 330,
            'fs.recovery': 26 / 60.0,
        }
        self.fs_alt = Fs_alt(self, Conf(conf_fs_alt), self.fs_proc_alt)
        self.s2.autocharge_init(self.s2autocharge).on()
        self.s2buff = Selfbuff("s2_shapshift", 1, 20, 'ss', 'ss')
        self.a3 = Selfbuff('a2_str_passive', 0.25, 20, 'att', 'passive')

        self.fs_alt_timer = Timer(self.fs_alt_end)
        self.s1_hits = 6 if self.condition('big hitbox') else 4

    @staticmethod
    def prerun_skillshare(adv, dst):
        adv.s2buff = Dummy()

    def fs_alt_end(self, t):
        self.fs_alt.off()

    def s2autocharge(self, t):
        if not self.s2buff.get():
            self.s2.charge(160000.0 / 40)
            log('sp', 's2autocharge')

    def s1_proc(self, e):
        if self.s2buff.get():
            name = f'o_{e.name}_boost'
            self.dmg_make(name, 12.38 - 0.825)
            for _ in range(2, self.s1_hits + 1):
                self.dmg_make(name, 0.83)
                self.add_hits(1)
            self.s2buff.buff_end_timer.timing += 2.6
            self.a3.buff_end_timer.timing += 2.6

    def s2_proc(self, e):
        self.s2buff.on()
        self.a3.on()
        self.fs_alt.on(-1)
        self.fs_alt_timer(20)
Пример #2
0
class Ku_Hai(Adv):
    comment = 'c2+fs during s2'
    a1 = ('cd', 0.15)
    a3 = ('cd', 0.15, 'hp70')
    conf = {}
    # c1+fs_alt has higher dps and sp rate than c2+fs_alt with or without stellar show  (x)
    # c2+fs_alt fs can init quicker than c1+fs_alt
    conf['slots.a'] = The_Lurker_in_the_Woods() + The_Shining_Overlord()
    conf['slots.d'] = AC011_Garland()
    conf['acl'] = '''
        `dragon.act("c3 s c1 end")
        `s3, not self.s3_buff
        `s1, fsc
        `s2
        `s4
        `fs, seq=2 and self.fs_alt.get()
        `fs, seq=3
        '''
    coab = ['Blade', 'Dragonyule_Xainfried', 'Akasha']
    share = ['Curran']

    def prerun(self):
        self.fshit = 2
        self.alttimer = Timer(self.altend)
        conf_fs_alt = {
            'fs.dmg': 0.83 * 2,
            'fs.sp': 330,
            'fs.charge': 2 / 60.0,  # needs confirm
            'fs.startup': 31 / 60.0,
            'fs.recovery': 33 / 60.0,
            'fs.hit': 2,
            'x2fs.startup': 16 / 60.0,
            'x2fs.recovery': 33 / 60.0,
            'x3fs.startup': 16 / 60.0,
            'x3fs.recovery': 33 / 60.0,
        }
        if self.condition('big hitbox'):
            conf_fs_alt['fs.dmg'] += 0.83
            conf_fs_alt['fs.hit'] += 1
        self.fs_alt = Fs_alt(self, Conf(conf_fs_alt))

    def altend(self, t):
        self.fs_alt.off()

    def s2_proc(self, e):
        self.fs_alt.on(-1)
        self.alttimer.on(10)
Пример #3
0
class Bellina(Adv):
    a3 = ('crisisattspd', 3)

    conf = {}
    conf['slots.a'] = Twinfold_Bonds() + Howling_to_the_Heavens()
    conf['slots.poison.a'] = Twinfold_Bonds() + The_Plaguebringer()
    conf['acl'] = """
        `s2, sim_duration-now()<1.5
        `s3, not self.s3_buff
        if self.dragondrive_buff.get()
        `s1, self.dragonform.dragon_gauge>1000 and x=3
        `s4, x=3
        `fsf, x=3
        else
        `s2
        `dragon
        `fs, x=4
        end
    """
    coab = ['Ieyasu', 'Curran', 'Berserker']
    share = ['Veronica']

    def fs_proc_alt(self, e):
        with CrisisModifier(e.name, 1.00, self.hp):
            self.dmg_make('fs', 5.65)
        self.dragonform.charge_gauge(self.conf.fs.utp, utp=True)

    def l_dragondrive_x(self, e):
        xalt = self.dragondrive_x
        xseq = e.name
        dmg_coef = xalt.conf[xseq].dmg
        sp = xalt.conf[xseq].sp
        hit = xalt.conf[xseq].hit
        utp = xalt.conf[xseq].utp
        log('x', xseq, 'dragondrive')
        self.hits += hit
        with CrisisModifier('x', 1.00, self.hp):
            self.dmg_make(xseq, dmg_coef)
        self.charge(xseq, sp)
        self.dragonform.charge_gauge(utp, utp=True)

    def prerun(self):
        self.dragondrive_buff = Selfbuff('dragondrive', 0.35, -1, 's',
                                         'passive')
        self.dragonform.set_dragondrive(self.dragondrive_buff)
        Event('dragon_end').listener(self.dragondrive_on)  # cursed
        Event('dragondrive_end').listener(self.dragondrive_off)

        self.dragondrive_x = X_alt(self,
                                   'dragondrive',
                                   dragondrive_auto_conf,
                                   x_proc=self.l_dragondrive_x)
        self.fs_alt = Fs_alt(self, Conf(dragondrive_fs_conf), self.fs_proc_alt)

        self.a_s1 = self.s1.ac
        self.a_s1a = S('s1', Conf({'startup': 0.10, 'recovery': 1.10}))

        self.a_s2 = self.s2.ac
        self.a_s2a = S('s2', Conf({'startup': 0.10, 'recovery': 2.26}))

        self.fsf_a = Fs('fsf', self.conf.fsf)

    def dragondrive_on(self, e):
        self.s1.ac = self.a_s1a
        self.s2.ac = self.a_s2a
        self.fs_alt.on(-1)
        self.dragondrive_x.on()
        self.a_fsf = Fs('fsf', self.conf.fsf)

    def dragondrive_off(self, e):
        self.s1.ac = self.a_s1
        self.s2.ac = self.a_s2
        self.fs_alt.off()
        self.dragondrive_x.off()

    def s1_proc(self, e):
        if self.dragondrive_buff.get():
            with CrisisModifier(e.name, 0.50, self.hp):
                self.dmg_make(e.name, 2.02 * 5)
                self.hits += 5
            self.s1.charge(self.conf.s1.sp)
            self.dragonform.charge_gauge(-750, utp=True)
        else:
            with CrisisModifier(e.name, 0.50, self.hp):
                self.dmg_make(e.name, 8.40)
                self.hits += 1

    def s2_proc(self, e):
        if self.dragondrive_buff.get():
            with CrisisModifier(e.name, 2.00, self.hp):
                self.dmg_make(e.name, 12.12)
                self.hits += 1
            self.dragonform.charge_gauge(-3000, utp=True)
            # -3000 gauge
            # 2.7666666507720947 (?)
            # 1212 mod, 3x crisis
        else:
            self.dragonform.charge_gauge(1200, utp=True)
            # 1 hp loss = 1 gauge gain, will assume 3000 max hp here
            if self.hp > 30:
                self.dragonform.charge_gauge(3000 * (self.hp - 30) / 100,
                                             utp=True)
                self.set_hp(30)
            # regular buff duration (?)

    def s_proc(self, e):
        if self.dragondrive_buff.get():
            s = getattr(self, e.name)
            self.dragonform.add_drive_gauge_time(s.ac.getstartup() +
                                                 s.ac.getrecovery(),
                                                 skill_pause=True)
Пример #4
0
class Xander(Adv):
    comment = 'c2+fs'

    a3 = ('fs', 0.55)

    conf = {}
    conf['slots.a'] = The_Shining_Overlord() + His_Clever_Brother()
    conf['slots.d'] = Gaibhne_and_Creidhne()
    conf['acl'] = """
        if self.born_ruler_1.get() and not self.born_ruler_2.get()
        `s3 
        `s4
        `s2
        `s1
        else
        `dragon.act('c3 s end'), fsc
        `s3, fsc or s
        `s2, fsc or s
        `s1, fsc or s
        `fs, x=2
        end
    """
    coab = ['Blade', 'Yurius', 'Hunter_Sarisse']
    share = ['Gala_Elisanne', 'Hunter_Sarisse']

    def fs_proc_alt(self, e):
        if self.born_ruler_2.get():
            with KillerModifier('fs_killer', 'hit', 0.30, ['frostbite']):
                self.dmg_make('fs', 6.66)
        else:
            self.dmg_make('fs', 3.26)
        self.conf['s1'].dmg = 8.32
        self.born_ruler.off()
        self.born_ruler_1.off()
        self.born_ruler_2.off()

    def prerun(self):
        # identical to granzal FS in frames
        conf_fs_alt = {
            'fs.dmg': 0.0,
            'fs.sp': 330,
            'fs.hit': 3,
            'fs.charge': 2 / 60.0,  # needs confirm
            'fs.startup': 66 / 60.0,
            'x1fs.startup': 75 / 60.0,
            'x2fs.startup': 60 / 60.0,
            'x3fs.startup': 60 / 60.0,
            'fs.recovery': 13 / 60.0,
            'x1fs.recovery': 13 / 60.0,
            'x2fs.recovery': 13 / 60.0,
            'x3fs.recovery': 13 / 60.0,
        }
        self.fs_alt = Fs_alt(self, Conf(conf_fs_alt), self.fs_proc_alt)
        self.born_ruler = Selfbuff('born_ruler', 0.05, -1, 'att', 'buff')
        self.born_ruler_1 = Selfbuff('born_ruler_1', 1, -1, 'xunder', 'buff')
        self.born_ruler_2 = Selfbuff('born_ruler_2', 1, -1, 'xunder', 'buff')

    def s1_proc(self, e):
        boost = 0.05 * self.buffcount
        self.afflics.frostbite(e.name, 120, 0.41 * (1 + boost))
        try:
            if self.born_ruler_2.get():
                # phase 3
                self.dmg_make(f'o_{e.name}_boost',
                              self.conf[e.name].dmg * boost)
                self.conf[e.name].dmg = 8.32
                self.fs_alt.off()
                self.born_ruler.off()
                self.born_ruler_1.off()
                self.born_ruler_2.off()
            elif self.born_ruler_1.get():
                # phase 2
                self.dmg_make(f'o_{e.name}_boost',
                              self.conf[e.name].dmg * boost)
                self.conf[e.name].dmg = 8.40
                self.born_ruler_2.on()
            else:
                self.fs_alt.on()
                self.born_ruler.on()
                self.born_ruler_1.on()
                # phase 1
                self.dmg_make(f'o_{e.name}_boost',
                              self.conf[e.name].dmg * boost)
                self.conf[e.name].dmg = 8.37
        except:
            self.dmg_make(f'o_{e.name}_boost', self.conf[e.name].dmg * boost)
        log('debug', 'xander_s1_boost',
            f'x{self.buffcount} = {self.conf[e.name].dmg*(1+boost):.2%}')

    def s2_proc(self, e):
        boost = 0.05 * self.buffcount
        self.dmg_make(f'o_{e.name}_boost', self.conf[e.name].dmg * boost)
        log('debug', 'xander_s2_boost',
            f'x{self.buffcount} = {self.conf[e.name].dmg*(1+boost):.2%}')
Пример #5
0
class Albert(Adv):
    a1 = ('fs',0.5)
    conf = {}
    conf['acl'] = """
        `s2, s1.charged>=s1.sp-330
        `fs, s=2 and not self.afflics.paralysis.get()
        `s1, fsc
        `s3, fsc
        `fs, seq=2
        """
    conf['slot.a'] = TSO()+SDO()
    conf['slot.d'] = C_Phoenix()
    conf['afflict_res.paralysis'] = 0

    def init(self):
        if self.condition('big hitbox'):
            self.s1_proc = self.c_s1_proc

    def fs_proc_alt(self, e):
        self.afflics.paralysis('fs',100,0.803)

    def prerun(self):
        conf_fs_alt = {
            'fs.dmg':1.02,
            'fs.sp':330,
            'fs.recovery':26/60.0,
        }
        self.fs_alt = Fs_alt(self, Conf(conf_fs_alt), self.fs_proc_alt)


        self.s2timer = Timer(self.s2autocharge,1,1).on()
        self.s2buff = Selfbuff("s2_shapshift",1, 20,'ss','ss')
        self.a3 = Selfbuff('a2_str_passive',0.25,20,'att','passive')

        self.fs_alt_timer = Timer(self.fs_alt_end)

    def fs_alt_end(self,t):
        self.fs_alt.off()

    def s2autocharge(self, t):
        if not self.s2buff.get():
            self.s2.charge(160000.0/40)
            log('sp','s2autocharge')

    def c_s1_proc(self, e):
        if self.s2buff.get():
            self.dmg_make("o_s1_s2boost",12.38-0.825)
            self.dmg_make("o_s1_hit2", 0.83)
            self.dmg_make("o_s1_hit3", 0.83)
            self.dmg_make("o_s1_hit4", 0.83)
            self.dmg_make("o_s1_hit5", 0.83)
            self.dmg_make("o_s1_hit6", 0.83)
            self.s2buff.buff_end_timer.timing += 2.6
            self.a3.buff_end_timer.timing += 2.6
            self.s2timer.timing += 2.6


    def s1_proc(self, e):
        if self.s2buff.get():
            self.dmg_make("o_s1_s2boost",12.38-0.825)
            self.dmg_make("o_s1_hit2", 0.83)
            self.dmg_make("o_s1_hit3", 0.83)
            self.dmg_make("o_s1_hit4", 0.83)
            self.s2buff.buff_end_timer.timing += 2.6
            self.a3.buff_end_timer.timing += 2.6
            self.s2timer.timing += 2.6

    def s2_proc(self, e):
        self.s2timer.on()
        self.s2buff.on()
        self.a3.on()
        self.fs_alt.on(-1)
        self.fs_alt_timer(20)
Пример #6
0
class Ku_Hai(Adv):
    comment = 'c2+fs during s2'
    a1 = ('cd', 0.15)
    a3 = ('cd', 0.15, 'hp70')
    conf = {}
    # c1+fs_alt has higher dps and sp rate than c2+fs_alt with or without stellar show  (x)
    # c2+fs_alt fs can init quicker than c1+fs_alt
    conf['slots.a'] = The_Lurker_in_the_Woods() + The_Shining_Overlord()
    conf['slot.d'] = AC011_Garland()
    conf['acl'] = '''
        `dragon.act("c3 s c1 end")
        `s1, fsc
        `s2
        `s3, fsc
        `fs, seq=2 and self.fs_alt.get()
        `fs, seq=3
        '''
    coab = ['Blade', 'Dragonyule_Xainfried', 'Akasha']

    def init(self):
        if self.condition('huge hitbox eneny'):
            self.o_prerun = self.prerun
            self.prerun = self.c_prerun
        else:
            self.missc1 = self.c_missc1
            self.backc1 = self.c_backc1

    def pre2(self):
        pass

    def c_prerun(self):
        self.o_prerun()
        self.fshit = 3
        self.fs_alt.conf_alt['fs.dmg'] = 0

    def missc1(self):
        pass

    def backc1(self):
        pass

    def c_missc1(self):
        self.x1dmgb = self.conf['x1.dmg']
        self.x1spb = self.conf['x1.sp']
        self.conf['x1.dmg'] = 0
        self.conf['x1.sp'] = 0

    def c_backc1(self):
        self.conf['x1.dmg'] = self.x1dmgb
        self.conf['x1.sp'] = self.x1spb

    def fs_proc_alt(self, e):
        self.dmg_make('o_fs_alt_hit1', 0.83)
        if self.fshit >= 2:
            self.dmg_make('o_fs_alt_hit2', 0.83)
        if self.fshit >= 3:
            self.dmg_make('o_fs_alt_hit3', 0.83)

    def prerun(self):
        self.fshit = 2
        self.alttimer = Timer(self.altend)
        conf_fs_alt = {
            'fs.dmg': 0,
            'fs.sp': 330,
            'fs.charge': 2 / 60.0,  # needs confirm
            'fs.startup': 31 / 60.0,
            'fs.recovery': 33 / 60.0,
            'x2fs.startup': 16 / 60.0,
            'x2fs.recovery': 33 / 60.0,
            'x3fs.startup': 16 / 60.0,
            'x3fs.recovery': 33 / 60.0,
        }
        self.fs_alt = Fs_alt(self, Conf(conf_fs_alt), self.fs_proc_alt)

    def altend(self, t):
        self.fs_alt.off()
        self.backc1()

    def s2_proc(self, e):
        self.fs_alt.on(-1)
        self.alttimer.on(10)
        self.missc1()
Пример #7
0
class Bellina(Adv):
    conf = {}
    conf['slot.a'] = Twinfold_Bonds()+Howling_to_the_Heavens()
    conf['slot.d'] = Fatalis()
    conf['acl'] = """
        `s2, sim_duration-now()<1.5
        `s3, not self.s3_buff
        if self.dragondrive_buff.get()
        `s1, self.dragonform.dragon_gauge>850 and x=3
        `fsf, x=3
        else
        `s2
        `dragon
        `fs, x=4
        end
    """

    def fs_proc_alt(self, e):
        with CrisisModifier('s1', 1.00, self.hp):
            self.dmg_make('fs', 5.65)
        self.dragonform.charge_gauge(self.conf.fs.utp, percent=False)

    def l_dragondrive_x(self, e):
        xalt = self.dragondrive_x
        xseq = e.name
        dmg_coef = xalt.conf[xseq].dmg
        sp = xalt.conf[xseq].sp
        hit = xalt.conf[xseq].hit
        utp = xalt.conf[xseq].utp
        log('x', xseq, 'dragondrive')
        self.hits += hit
        with CrisisModifier('x', 1.00, self.hp):
            self.dmg_make(xseq, dmg_coef)
        self.charge(xseq, sp)
        self.dragonform.charge_gauge(utp, percent=False)

    def prerun(self):
        self.dragondrive_buff = Selfbuff('dragondrive', 0.35, -1, 's', 'passive')
        self.dragonform.set_dragondrive(self.dragondrive_buff)
        Event('dragon_end').listener(self.dragondrive_on) # cursed
        Event('dragondrive_end').listener(self.dragondrive_off)

        self.dragondrive_x = X_alt(self, 'dragondrive', dragondrive_auto_conf, x_proc=self.l_dragondrive_x)
        self.fs_alt = Fs_alt(self, Conf(dragondrive_fs_conf), self.fs_proc_alt)

        self.a3_str = Modifier('a3', 'att', 'passive', 0.20)
        self.a3_spd = Spdbuff('a3',0.10,-1)
        
        self.hp = 100

        self.a_s1 = self.s1.ac
        self.a_s1a = S('s1', Conf({'startup': 0.10, 'recovery': 1.10}))

        self.a_s2 = self.s2.ac
        self.a_s2a = S('s2', Conf({'startup': 0.10, 'recovery': 2.70}))

        self.fsf_a = Fs('fsf', self.conf.fsf)

    def dragondrive_on(self, e):
        self.s1.ac = self.a_s1a
        self.s2.ac = self.a_s2a
        self.fs_alt.on(-1)
        self.dragondrive_x.on()
        self.a_fsf = Fs('fsf', self.conf.fsf)

    def dragondrive_off(self, e):
        self.s1.ac = self.a_s1
        self.s2.ac = self.a_s2
        self.fs_alt.off()
        self.dragondrive_x.off()

    def s1_proc(self, e):
        if self.dragondrive_buff.get():
            with CrisisModifier('s1', 0.50, self.hp):
                self.dmg_make('s1', 2.02 * 5)
                self.hits += 5
            self.s1.charge(self.conf.s1.sp)
            self.dragonform.charge_gauge(-750, percent=False)
            # 2.02 mod 1.5x crisis
            # 0.2666666805744171 + 0.18000000715255737 * 5
            # 1.1666666269302368 (?)
            # -750 gauge
            # +100% skill
        else:
            with CrisisModifier('s1', 0.50, self.hp):
                self.dmg_make('s1', 8.40)
                self.hits += 1
            # 840 mod, 1.5x crisis
            # 1.399999976158142 (?)

    def s2_proc(self, e):
        if self.dragondrive_buff.get():
            with CrisisModifier('s2', 2.00, self.hp):
                self.dmg_make('s2', 12.12)
                self.hits += 1
            self.dragonform.charge_gauge(-3000, percent=False)
            # -3000 gauge
            # 2.7666666507720947 (?)
            # 1212 mod, 3x crisis
        else:
            self.dragonform.charge_gauge(1200, percent=False)
            # 1 hp loss = 1 gauge gain, will assume 3000 max hp here
            if self.hp > 30:
                self.dragonform.charge_gauge(3000 * (self.hp-30)/100, percent=False)
                self.hp = 30
                self.a3_str.on()
                self.a3_spd.on()