Exemplo n.º 1
0
    def setup(this, c):
        super(WeaponBase, this).setup(c)
        if type(this.ele) == list:
            for i in this.ele:
                if c.ele == i :
                    this.onele = 1
                    break

        if this.onele :
            this.att *= 1.5
            this.conf.s3 = Conf(this.s3)
        elif 'all' in this.ele :
            this.conf.s3 = Conf(this.s3)
        
        if not this.onwt :
            print('Weapon can\'t equip')
            errrrrrrrrrrrrr()
        if not this.onele and 'all' not in this.ele :
            print('!!!!!!!!!!\nwarning: weapon not onele')
            print(this.ele, c.ele)
            print('!!!!!!!!!!!\n')

        if this.wt == 'axe':
            this.mod.append(('crit','chance',0.04))
        else :
            this.mod.append(('crit','chance',0.02))
Exemplo n.º 2
0
def get_adv(name):
    conf = Conf(load_adv_json(name))

    wt = conf.c.wt
    base = baseconfs[wt]
    baseconf = Conf(base)

    if bool(conf.c.spiral):
        baseconf.update(baseconf.lv2)
    del baseconf["lv2"]

    if wt == "gun" and len(conf.c.gun) == 1:
        # move gun[n] to base combo
        target = conf.c.gun[0]
        for xn, xconf in list(baseconf.find(r"^(x\d|fsf?)_gun\d$")):
            if int(xn[-1]) == target:
                baseconf[xn.split("_")[0]] = xconf
            del baseconf[xn]
        # ban fsf on gun2
        if conf.c.gun[0] == 2:
            baseconf.cannot_fsf = True

    conf.update(baseconf, rebase=True)

    return conf
Exemplo n.º 3
0
class WeaponBase(Slot):
    stype = 'w'
    wt = 'none'
    s3 = Conf()
    ele = []  # or ''

    def setup(self, c, adv):
        super(WeaponBase, self).setup(c)
        if type(self.ele) == list:
            for i in self.ele:
                if c.ele == i:
                    self.onele = 1
                    break

        if self.onele:
            self.att *= 1.5
            if adv is not None and adv.s3.owner is None:
                self.conf.s3 = Conf(self.s3)
        elif 'all' in self.ele:
            if adv is not None and adv.s3.owner is None:
                self.conf.s3 = Conf(self.s3)

        if self.wt == 'axe':
            self.mod.append(('crit', 'chance', 0.04))
        else:
            self.mod.append(('crit', 'chance', 0.02))

    def s3_proc(self, adv, e):
        pass
Exemplo n.º 4
0
 def __init__(self):
     if not self.mod:
         self.mod = []
     if not self.conf:
         self.conf = Conf()
     if not self.a:
         self.a = []
Exemplo n.º 5
0
 def __init__(this):
     if not this.mod:
         this.mod = []
     if not this.conf:
         this.conf = Conf()
     if not this.a:
         this.a = []
Exemplo n.º 6
0
 def __init__(self):
     if not self.mod:
         self.mod = []
     if not self.conf:
         self.conf = Conf()
     if not self.a:
         self.a = []
     self.name = type(self).__name__
Exemplo n.º 7
0
def get(name):
    conf = Conf()

    json_conf = Conf(advconfs.get(name))

    conf += json_conf
    
    import wep
    wt = conf.c.wt
    weapon = getattr(wep, wt)
    wepconf = Conf(weapon.conf)
    if bool(conf.c.lv2_autos):
        wepconf += Conf(weapon.lv2)

    conf += Conf(wepconf)

    return conf
Exemplo n.º 8
0
    def setup(this, c):
        super(WeaponBase, this).setup(c)
        if type(this.ele) == list:
            for i in this.ele:
                if c.ele == i:
                    this.onele = 1
                    break

        if this.onele:
            this.att *= 1.5
            this.conf.s3 = Conf(this.s3)
        elif 'all' in this.ele:
            this.conf.s3 = Conf(this.s3)

        if this.wt == 'axe':
            this.mod.append(('crit', 'chance', 0.04))
        else:
            this.mod.append(('crit', 'chance', 0.02))
Exemplo n.º 9
0
    def setup(self, c):
        super(WeaponBase, self).setup(c)
        if type(self.ele) == list:
            for i in self.ele:
                if c.ele == i:
                    self.onele = 1
                    break

        if self.onele:
            self.att *= 1.5
            self.conf.s3 = Conf(self.s3)
        elif 'all' in self.ele:
            self.conf.s3 = Conf(self.s3)

        if self.wt == 'axe':
            self.mod.append(('crit', 'chance', 0.04))
        else:
            self.mod.append(('crit', 'chance', 0.02))
Exemplo n.º 10
0
def get_adv(name):
    conf = Conf(load_adv_json(name))

    wt = conf.c.wt
    base = baseconfs[wt]
    conf.update(Conf(base), rebase=True)
    if bool(conf.c.spiral):
        conf.update(conf.lv2)
    del conf['lv2']

    return conf
Exemplo n.º 11
0
 def oninit(self, adv):
     super().oninit(adv)
     gauge_iv = min(int(adv.duration/12), 15)
     from core.dragonform import DragonForm
     self.adv = adv
     if 'dragonform' in adv.conf:
         name = type(adv).__name__
         dconf = Conf(self.default_dragonform)
         dconf.update(adv.conf.dragonform)
         dconf.gauge_iv = gauge_iv
         self.adv.dragonform = DragonForm(name, dconf, adv, adv.ds_proc)
     else:
         name = type(self).__name__
         dconf = Conf({**self.default_dragonform, **self.dragonform})
         dconf.gauge_iv = gauge_iv
         self.adv.dragonform = DragonForm(name, dconf, adv, self.ds_proc)
Exemplo n.º 12
0
def get_adv(name):
    conf = Conf(load_adv_json(name))

    wt = conf.c.wt
    base = baseconfs[wt]
    baseconf = Conf(base)

    if bool(conf.c.spiral):
        baseconf.update(baseconf.lv2)
    del baseconf['lv2']

    if wt == 'gun' and len(conf.c.gun) == 1:
        # move gun[n] to base combo
        target = conf.c.gun[0]
        for xn, xconf in list(baseconf.find(r'^(x\d|fs)_gun\d$')):
            if int(xn[-1]) == target:
                baseconf[xn.split('_')[0]] = xconf
            del baseconf[xn]

    conf.update(baseconf, rebase=True)

    return conf
Exemplo n.º 13
0
def get(name):
    global conf

    get_skillframe(name)

    csvconf = csv2conf.get(name)

    conf += csvconf

    slots = slot.Slots()

    conf.slot_common = [slot_common.set]

    import wep
    wt = conf.c.wt
    weapon = getattr(wep, wt)
    wepconf = weapon.conf

    conf += Conf(wepconf)

    return conf
Exemplo n.º 14
0
from core import Conf

conf = Conf()

conf = {}
conf.update({
    "xtype": "ranged",
    "x1.dmg": 0.30,
    "x1.sp": 80,
    "x1.startup": 18 / 60.0,
    "x1.recovery": 33 / 60.0,
    "x2.dmg": 0.30,
    "x2.sp": 80,
    "x2.startup": 18 / 60.0,
    "x2.recovery": 33 / 60.0,
    "x3.dmg": 0.30,
    "x3.sp": 80,
    "x3.startup": 18 / 60.0,
    "x3.recovery": 33 / 60.0,
    "x4.dmg": 0.30,
    "x4.sp": 80,
    "x4.startup": 18 / 60.0,
    "x4.recovery": 33 / 60.0,
    "x5.dmg": 0.30,
    "x5.sp": 80,
    "x5.startup": 18 / 60.0,
    "x5.recovery": 33 / 60.0,
    "fs._startup": 0,
    "fs._recovery": 29 / 60.0,
    "fs.dmg": 0.90,
    "fs.sp": 400,
Exemplo n.º 15
0
import copy
import conf.skillframe
import conf.csv2conf
import conf.slot_common
import conf.forte
import slot
from core import Conf

conf = Conf()


def get_skillframe(name):
    global conf
    for i in skillframe.skills:
        sf = skillframe.skills[i]
        if name.lower() == i.lower():
            if sf[0] == '1':
                conf.s1.startup = 0.25
                conf.s1.recovery = 0.90
            else:
                conf.s1.recovery = float(sf[0])

            if sf[1] == '1':
                conf.s2.startup = 0.25
                conf.s2.recovery = 0.90
            else:
                conf.s2.recovery = float(sf[1])


def get(name):
    global conf
Exemplo n.º 16
0
from core import Conf

conf = Conf()

conf = {}
conf.update( {
        "xtype"         : "ranged" ,

        "x1.dmg"         : 0.98     ,
        "x1.sp"          : 130      ,
        "x1.startup"     : 18/60.0  ,
        "x1.recovery"    : 33/60.0  ,

        "x2.dmg"         : 0.53*2   ,
        "x2.sp"          : 200      ,
        "x2.startup"     : 0        ,
        "x2.recovery"    : 31/60.0  ,

        "x3.dmg"         : 0.36*3   ,
        "x3.sp"          : 240      ,
        "x3.startup"     : 0        ,
        "x3.recovery"    : 53/60.0  ,

        "x4.dmg"         : 0.78*2   ,
        "x4.sp"          : 430      ,
        "x4.startup"     : 0        ,
        "x4.recovery"    : 64/60.0  ,

        "x5.dmg"         : 0.3605*4+0.618 ,
        "x5.sp"          : 600      ,
        "x5.startup"     : 0        ,
Exemplo n.º 17
0
Arquivo: blade.py Projeto: roriron/dl
from core import Conf

conf = Conf()

conf.xtype = 'melee'

conf.x1.dmg = 97 / 100.0
conf.x1.sp = 130
conf.x1.startup = 10 / 60.0
conf.x1.recovery = 23 / 60.0

conf.x2.dmg = 97 / 100.0
conf.x2.sp = 130
conf.x2.startup = 0
conf.x2.recovery = 41 / 60.0

conf.x3.dmg = 63 * 2 / 100.0
conf.x3.sp = 220
conf.x3.startup = 6 / 60.0
conf.x3.recovery = 37 / 60.0

conf.x4.dmg = 129 / 100.0
conf.x4.sp = 360
conf.x4.startup = 0
conf.x4.recovery = 65 / 60.0

conf.x5.dmg = 194 / 100.0
conf.x5.sp = 660
conf.x5.startup = 0
conf.x5.recovery = 33 / 60.0
Exemplo n.º 18
0
def get(mname):
    csvname = ''
    find = '/'
    if __file__.find('/') == -1:
        find = '\\'
        if __file__.find('\\') == -1:
            find = None
            csvname = 'adv_data.csv'
    if find:
        l = __file__.rfind(find)
        csvname = __file__[:l] + find + 'adv_data.csv'

    csvconf = {}
    f = open(csvname, 'r')
    title = f.readline().strip().split(',')

    #find name
    idx = title.index('name')
    mname = mname.lower()
    for line in f:
        row = line.strip().split(',')
        if row[idx].lower() == mname:
            i = 0
            for r in row:
                csvconf[title[i]] = r
                i += 1

    if csvconf['s1_buff'] != '' and csvconf['s1_buff'] != '0':
        tmp = csvconf['s1_buff'].split(';')
        csvconf['s1_buff'] = []
        if len(tmp) >= 3:
            csvconf['s1_buff'] = [tmp[0], float(tmp[1]), float(tmp[2])]
            for i in tmp[3:]:
                csvconf['s1_buff'] += [i]
        elif len(tmp) == 2:
            csvconf['s1_buff'] = ['none', float(tmp[0]), float(tmp[1])]
    else:
        csvconf.pop('s1_buff')

    if csvconf['s2_buff'] != '' and csvconf['s2_buff'] != '0':
        tmp = csvconf['s2_buff'].split(';')
        csvconf['s2_buff'] = []
        if len(tmp) >= 3:
            csvconf['s2_buff'] = [tmp[0], float(tmp[1]), float(tmp[2])]
            for i in tmp[3:]:
                csvconf['s2_buff'] += [i]
        elif len(tmp) == 2:
            csvconf['s2_buff'] = ['none', float(tmp[0]), float(tmp[1])]
    else:
        csvconf.pop('s2_buff')

    conf = Conf()

    conf.s1.dmg = float(csvconf['s1_dmgpc']) / 100.0
    conf.s1.sp = int(csvconf['s1_sp'])
    if 's1_buff' in csvconf:
        conf.s1.buff = csvconf['s1_buff']

    conf.s2.dmg = float(csvconf['s2_dmgpc']) / 100.0
    conf.s2.sp = int(csvconf['s2_sp'])
    if 's2_buff' in csvconf:
        conf.s2.buff = csvconf['s2_buff']

    conf.c.att = int(csvconf['str_adv'])
    conf.c.ele = csvconf['element']
    conf.c.wt = csvconf['weapon']
    conf.c.stars = csvconf['stars']

    return conf
Exemplo n.º 19
0
 def __init__(self):
     super().__init__()
     # self.s3 = Conf({**self.s3_base, **self.s3_alt})
     self.s3 = Conf(self.s3_base)
     self.noele = 'all' in self.ele