Ejemplo n.º 1
0
Archivo: slots.py Proyecto: Caledor/dl
class DragonBase(EquipBase):
    AUGMENTS = 50
    FAFNIR = 0.115
    DEFAULT_DCONF = Conf({
        "duration": 10,  # 10s dragon time
        "dracolith": 0.70,  # base dragon damage
        "exhilaration": 0,  # psiren aura
        "gauge_val": 100,  # gauge regen value
        "latency": 0,  # amount of delay for cancel
        "act": "c3-s",
        "dshift.startup": 1.0,
        "dshift.recovery": 0.63333,
        "dshift.attr": [{
            "dmg": 2.0
        }],
        "dodge.startup": 0.0,
        "dodge.recovery": 0.66667,
        "end.startup": 0,
        "end.recovery": 0,
        "allow_end":
        3.0,  # time before force end is allowed, not including the time needed for skill
        "allow_end_step":
        2.0,  # for each shift, add this amount of time to allow_end
    })

    def __init__(self, conf, c, qual=None):
        super().__init__(conf.d, c, qual)
        self.dragonform = conf

    def oninit(self, adv):
        from core.dragonform import DragonForm

        if adv.conf["dragonform"]:
            name = self.c.name
            self.dragonform = Conf(adv.conf["dragonform"])
        else:
            name = self.name

        for dn, dconf in self.dragonform.items():
            if isinstance(dconf, dict):
                adv.hitattr_check(dn, dconf)

        self.dragonform.update(DragonBase.DEFAULT_DCONF, rebase=True)
        adv.dragonform = DragonForm(name, self.dragonform, adv)

    @property
    def att(self):
        return super().att * (1 + DragonBase.FAFNIR)

    @property
    def hp(self):
        return super().hp * (1 + DragonBase.FAFNIR)

    @property
    def ele(self):
        return self.conf.ele

    @property
    def ab(self):
        return super().ab if self.on_ele else []
Ejemplo n.º 2
0
class DragonBase(EquipBase):
    AUGMENTS = 50
    FAFNIR = 0.115
    DEFAULT_DCONF = Conf({
        "dacl": "ds1,x=3",  # the default dacl
        "duration": 10.0,  # 10s dragon time
        "dracolith": 0.70,  # base dragon damage
        "exhilaration": 0,  # psiren aura
        "default_ds_x": 0,
        "default_x_loop": 0,
        "dshift.startup": 1.0,
        "dshift.recovery": 0.63333,
        "dshift.attr": [{
            "dmg": 2.0
        }],
        "dodge.startup": 0.0,
        "dodge.recovery": 0.66667,
        "dodge.interrupt": {
            "s": 0.0
        },
        "dodge.cancel": {
            "s": 0.0
        },
        "dend.startup": 0.0,
        "dend.recovery": 0.0,
        "allow_end":
        3.0,  # time before force end is allowed, not including the time needed for skill
        "allow_end_step":
        2.0,  # for each shift, add this amount of time to allow_end
    })

    def __init__(self, conf, c, qual=None):
        super().__init__(conf.d, c, qual)
        self.dform = conf

    def oninit(self, adv):
        unique_dform = False
        if adv.conf["dragonform"]:
            name = self.c.name
            self.dform = Conf(adv.conf["dragonform"])
            unique_dform = True
        else:
            name = self.name
        self.dform.update(DragonBase.DEFAULT_DCONF, rebase=True)

        if self.c.conf["utp"]:
            from core.dragonform import DragonFormUTP

            adv.dragonform = DragonFormUTP(name, self.dform, adv, self)
        else:
            from core.dragonform import DragonForm

            adv.dragonform = DragonForm(name,
                                        self.dform,
                                        adv,
                                        self,
                                        unique_dform=unique_dform)
        self.adv = adv
        return unique_dform

    @property
    def att(self):
        return super().att * (1 + DragonBase.FAFNIR)

    @property
    def hp(self):
        return super().hp * (1 + DragonBase.FAFNIR)

    @property
    def ele(self):
        return self.conf.ele

    @property
    def ab(self):
        return super().ab if self.on_ele else []