mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-21 09:45:48 +08:00
* 调整日志分析一些字段为0时显示为空,增加了异常情况统计(复活、重试、传送失败、战斗超时)。 * 修正一个赋值错误 * 日志分析表格,使隔行颜色样式不一样 * 增加了锄地延时,通过控制延时相对精确的显示怪物数量 * 删除不必要的输出 * 调度器任务,增加 任务倒序排列功能。调度器配置增加“不在某时执行”,当执行完一个路线后,如果时间为当前配置的时间(范围:0-23),则此路径追踪任务后续都将都跳过,适用于连续执行的兜底任务,例如想通宵挂机,并且在4点后,开始执行新的任务。
106 lines
3.3 KiB
C#
106 lines
3.3 KiB
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Text.Json.Serialization;
|
||
using BetterGenshinImpact.GameTask;
|
||
using BetterGenshinImpact.GameTask.AutoFight;
|
||
|
||
namespace BetterGenshinImpact.Core.Config;
|
||
|
||
[Serializable]
|
||
public partial class PathingPartyConfig : ObservableObject
|
||
{
|
||
// 配置是否启用,不启用会使用路径追踪内的条件配置
|
||
[ObservableProperty]
|
||
private bool _enabled = false;
|
||
|
||
// 切换到队伍的名称
|
||
[ObservableProperty]
|
||
private string _partyName = string.Empty;
|
||
|
||
// 主要行走追踪的角色编号
|
||
[ObservableProperty]
|
||
private string _mainAvatarIndex = string.Empty;
|
||
|
||
// [盾角]使用元素战技的角色编号
|
||
[ObservableProperty]
|
||
private string _guardianAvatarIndex = string.Empty;
|
||
|
||
// [盾角]使用元素战技的时间间隔(s)
|
||
[ObservableProperty]
|
||
private string _guardianElementalSkillSecondInterval = string.Empty;
|
||
|
||
// [盾角]使用元素战技的方式 长按/短按
|
||
[ObservableProperty]
|
||
private bool _guardianElementalSkillLongPress = false;
|
||
|
||
// // normal_attack 配置几号位
|
||
// [ObservableProperty]
|
||
// private string _normalAttackAvatarIndex = string.Empty;
|
||
//
|
||
// // elemental_skill 配置几号位
|
||
// [ObservableProperty]
|
||
// private string _elementalSkillAvatarIndex = string.Empty;
|
||
|
||
// // hydro_collect 配置几号位
|
||
// [ObservableProperty]
|
||
// private string _hydroCollectAvatarIndex = string.Empty;
|
||
//
|
||
// // electro_collect 配置几号位
|
||
// [ObservableProperty]
|
||
// private string _electroCollectAvatarIndex = string.Empty;
|
||
//
|
||
// // anemo_collect 配置几号位
|
||
// [ObservableProperty]
|
||
// private string _anemoCollectAvatarIndex = string.Empty;
|
||
|
||
[JsonIgnore]
|
||
public List<string> AvatarIndexList { get; } = ["", "1", "2", "3", "4"];
|
||
|
||
// 只在传送传送点时复活
|
||
[ObservableProperty]
|
||
private bool _onlyInTeleportRecover = false;
|
||
|
||
//允许在jsScript脚本中使用此路径追踪配置
|
||
[ObservableProperty]
|
||
private bool _jsScriptUseEnabled = false;
|
||
|
||
//允许在此调度器中(一般在JS脚本中)调用自动战斗任务时,采用此追踪配置里的战斗策略
|
||
[ObservableProperty]
|
||
private bool _soloTaskUseFightEnabled = false;
|
||
|
||
//不在某时执行
|
||
[ObservableProperty]
|
||
private string _skipDuring = "";
|
||
|
||
// 使用小道具的间隔时间
|
||
[ObservableProperty]
|
||
private int _useGadgetIntervalMs = 0;
|
||
|
||
// 启用进入剧情自动脱离
|
||
[ObservableProperty]
|
||
private bool _autoSkipEnabled = true;
|
||
|
||
// 自动冲刺启用
|
||
[ObservableProperty]
|
||
private bool _autoRunEnabled = true;
|
||
|
||
//启用自动战斗配置
|
||
[ObservableProperty]
|
||
private bool _autoFightEnabled = false;
|
||
|
||
[ObservableProperty]
|
||
private AutoFightConfig _autoFightConfig = new();
|
||
|
||
public static PathingPartyConfig BuildDefault()
|
||
{
|
||
// 即便是不启用的情况下也设置默认值,减少后续使用的判断
|
||
var pathingConditionConfig = TaskContext.Instance().Config.PathingConditionConfig;
|
||
return new PathingPartyConfig
|
||
{
|
||
OnlyInTeleportRecover = pathingConditionConfig.OnlyInTeleportRecover,
|
||
UseGadgetIntervalMs = pathingConditionConfig.UseGadgetIntervalMs
|
||
};
|
||
}
|
||
}
|