示例#1
0
def fix_status(status: Status):
    if status.currentDurability != currentDurability():
        log("Fix status current durability {} -> {}".format(
            status.currentDurability, currentDurability()))
        status.currentDurability = currentDurability()
    if status.currentProgress != currentProgress():
        log("Fix status current progress {} -> {}".format(
            status.currentProgress, currentProgress()))
        status.currentProgress = currentProgress()
    if status.currentQuality != currentQuality():
        log("Fix status current quality {} -> {}".format(
            status.currentQuality, currentQuality()))
        status.currentQuality = currentQuality()
    if status.ball != ball():
        log("Fix status ball {} -> {}".format(status.ball.name, ball().name))
        status.ball = ball()
    if status.currentCp != currentCp():
        log("Fix status current cp {} -> {}".format(status.currentCp,
                                                    currentCp()))
        status.currentCp = currentCp()
示例#2
0
Crafter([lv],[craft],[control],[maxCp])

Target: the formula object
Target([rlv], [maxDurability], [maxProgress], [maxQuality])
'''
player = Crafter(
    int(config['player']['lv']),
    int(config['player']['craft']),
    int(config['player']['control']),
    int(config['player']['cp']),
)
target = Target(int(config['target']['rlv']),
                int(config['target']['Durability']),
                int(config['target']['Progress']),
                int(config['target']['Quality']))
'''
Status: object store the craft state
Status([Crafter], [Target], [the ball state])
'''
status = None
memFix = config['MemoryFixStatus']['open'] == 'True'
terminator = config['AutoTerminator']['open'] == 'True'
log_name = "log.txt"

Logger.hideTag("Math")
CraftSolver.init(player, target)
Logger.showTag("Math")
data_queue = []
if memFix: from core.Utils.FFxivCraftMem import fix_status, fix_crafter
if terminator: from solver.stages.Terminator import Terminator
terminate = False
示例#3
0
def InnerQuietLv(status: Status):
    return 0 if not status.has_buff(_('内静')) else status.get_buff(
        _('内静')).data["lv"]
示例#4
0
    print("progress:\t{}/{}".format(status.currentProgress,
                                    status.target.maxProgress))
    print("quality:\t{}/{}".format(status.currentQuality,
                                   status.target.maxQuality))
    if status.buffs:
        print("buffs:",
              " ".join([str(buff) for buff in status.buffs.values()]))
    print("CP:\t{}/{}".format(status.currentCp, status.player.maxCp))


#创建角色,对象实体
player = Crafter(80, 2758, 2917, 657)
target = Target(511, 50, 11126, 82400)

#创建status开局
status = Status(player, target, BallManager.defaultBall)

#一些直接修改局面属性的api
#注意:为了避免循环加载,或缺漏注入等情况,请不要直接import skills.py ball.py 等文件
#请使用manager相关
status.ball = BallManager.PurpleBall
status.get_buff(BuffManager.InnerQuiet)
status.execute_buff_change()
if status.has_buff('內静'):
    status.get_buff('內静').data['lv'] = 11

#使用use skill 创建下一回合的局面
next_status = status.use_skill(SkillManager['俭约'])

#格式化输出
print_status(next_status)
示例#5
0
def init(player: Crafter, target: Target):
    global SynthesisPush
    SynthesisPush = Status(player, target, BallManager.WhiteBall).use_skill(
        SkillManager[names["BasicSynthesis"]]).currentProgress