Commit 7f104cd7 authored by hex's avatar hex

增加支持配置动画加速;限制可展示的禁卡表为OCG和TCG最近三个;优化抽卡后有两排卡且有连锁的摄像头切换

parent bb685dd5
Pipeline #40465 failed
......@@ -434,7 +434,6 @@ public class Ocgcore : ServantWithCardDescription
gameInfo.ini();
UIHelper.InterGameObject(gameInfo.gameObject);
shiftCondition(Condition.duel);
Program.go(
1,
() =>
......@@ -3940,6 +3939,9 @@ public class Ocgcore : ServantWithCardDescription
}
var chain_condition = gameInfo.get_condition();
int handle_flag = 0;
realize();
toNearest();
if (forceCount == 0)
{
//无强制发动的卡
......@@ -7249,11 +7251,23 @@ public class Ocgcore : ServantWithCardDescription
public void Sleep(int framsIn60)
{
int illustion = (int)(Program.TimePassed() + framsIn60 * 1000f / 60f);
// 计算基础延迟时间(毫秒)
float baseDelay = framsIn60 * 1000f / 60f;
float speepUp = float.Parse(Config.Get("speedUp", "1"));
// 应用速度倍率,倍率越高,延迟越短
int finalDelay = (int)(baseDelay / speepUp);
int illustion = Program.TimePassed() + finalDelay;
if (illustion > MessageBeginTime)
{
MessageBeginTime = illustion;
}
// int illustion = (int)(Program.TimePassed() + framsIn60 * 1000f / 60f);
// if (illustion > MessageBeginTime)
// {
// MessageBeginTime = illustion;
// }
}
public bool isFirst = false;
......
......@@ -1304,7 +1304,7 @@ public class Program : MonoBehaviour
FPS = FPS.Substring(0, 5);
}
catch { }
GUI.Label(new Rect(Screen.safeArea.x + 10, 5, 200, 200), "[Ver 1.036.2-TCube] " + "FPS: " + FPS);
GUI.Label(new Rect(Screen.safeArea.x + 10, 5, 400, 200), "[Ver 1.036.2-TCube 2509] " + "FPS: " + FPS);
}
......
......@@ -239,7 +239,7 @@ public class DeckManager : ServantWithCardDescription
UIHelper.setParent(gameObjectSearch, Program.I().ui_back_ground_2d);
SetBar(Program.I().new_bar_editDeck, 0, 230);
UIPopupList_banlist = UIHelper.getByName<UIPopupList>(toolBar, "lfList_");
var banlistNames = YGOSharp.BanlistManager.getAllName();
var banlistNames = YGOSharp.BanlistManager.GetFilteredBanlistNames();
UIPopupList_banlist.items = banlistNames;
UIPopupList_banlist.value = UIPopupList_banlist.items[0];
currentBanlist = YGOSharp.BanlistManager.GetByName(UIPopupList_banlist.items[0]);
......
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace YGOSharp
{
......@@ -121,5 +122,30 @@ namespace YGOSharp
return returnValue;
}
public static List<string> GetFilteredBanlistNames()
{
if (Banlists == null || Banlists.Count == 0)
{
return new List<string>();
}
// 1. 将禁卡表分为 TCG 和 OCG (排除 "N/A")
var ocgBanlists = Banlists
.Where(b => !b.Name.Contains("TCG") && b.Name != "N/A")
.Select(b => b.Name);
var tcgBanlists = Banlists
.Where(b => b.Name.Contains("TCG"))
.Select(b => b.Name);
// 2. 获取最新的3个 (假设文件中的顺序就是从新到旧)
// .Take(3) 会安全地处理列表元素少于3个的情况
var latestTcg = tcgBanlists.Take(3);
var latestOcg = ocgBanlists.Take(3);
// 3. 合并结果并添加 "N/A"
var filteredList = new List<string>();
filteredList.AddRange(latestOcg);
filteredList.AddRange(latestTcg);
filteredList.Add("N/A"); // 总是包含 N/A 选项
return filteredList;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment