diff --git a/Source/GrasscutterTools/Game/Gacha/GachaBanner2.cs b/Source/GrasscutterTools/Game/Gacha/GachaBanner2.cs new file mode 100644 index 0000000..216c521 --- /dev/null +++ b/Source/GrasscutterTools/Game/Gacha/GachaBanner2.cs @@ -0,0 +1,187 @@ +/** + * Grasscutter Tools + * Copyright (C) 2022 jie65535 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + **/ +using System.ComponentModel; + +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace GrasscutterTools.Game.Gacha +{ + /// + /// 使用这个只需替换掉你原来的的data/banner.json文件, + /// 然后重启服务器和客户端,即可享受全卡池抽卡,卡池的选择方式是点击左右箭头进行切换 + /// + public class GachaBanner2 + { + /// + /// 添加卡池请从400开始增加id数值进行添加,这个id需要每个池子不一样, + /// 如果你想添加大量卡池,请按照每次增加固定数值的id进行添加,比如:411,412,413.... + /// + [JsonProperty("gachaType")] + public int GachaType { get; set; } + + /// + /// 这个id需要每个池子不一样,如果你想添加大量卡池, + /// 请按照每次增加固定数值的id进行添加,比如:2100,2200,2300.... + /// + [JsonProperty("scheduleId")] + public int ScheduleId { get; set; } + + /// + /// 这个是卡池的预制路径id + /// + [JsonProperty("prefabPath")] + public string PrefabPath { get; set; } + + /// + /// 这个是抽卡的预览背景路径id + /// + [JsonProperty("previewPrefabPath")] + public string PreviewPrefabPath { get; set; } + + /// + /// 这个是抽卡的标题路径id,有可能与之前两项的id不同 + /// (一般这3项的id只需保持一致即可,就是A0xx,xx为同一id) + /// + [JsonProperty("titlePath")] + public string TitlePath { get; set; } + + /// + /// 这个表示祈愿用的道具,224是相遇之缘,223是纠缠之缘 - 选择一个作为该卡池的抽卡道具 + /// (提示:请不要随便修改祈愿道具除了蓝球和粉球,有可能会引发bug,比如修改成摩拉抽卡可能导致卡住) + /// + [JsonProperty("costItem")] + public int CostItem { get; set; } + + /// + /// 开始时间(Unix时间戳) + /// + [JsonProperty("beginTime")] + public int BeginTime { get; set; } = 0; + + /// + /// 结束时间(Unix时间戳) + /// + [JsonProperty("endTime")] + public int EndTime { get; set; } = 1924992000; + + /// + /// 卡池顺序 + /// + [JsonProperty("sortId")] + public int SortId { get; set; } + + /// + /// 4星的up角色或物品 + /// + [JsonProperty("rateUpItems4")] + public int[] RateUpItems4 { get; set; } + + /// + /// 5星的up物品或者角色 + /// + [JsonProperty("rateUpItems5")] + public int[] RateUpItems5 { get; set; } + + /// + /// 3星普通池 + /// + [JsonProperty("fallbackItems3")] + private int[] FallbackItems3 { get; set; } = { 11301, 11302, 11306, 12301, 12302, 12305, 13303, 14301, 14302, 14304, 15301, 15302, 15304 }; + + /// + /// 4星普通角色池 + /// + [JsonProperty("fallbackItems4Pool1")] + private int[] FallbackItems4Pool1 { get; set; } = { 1014, 1020, 1023, 1024, 1025, 1027, 1031, 1032, 1034, 1036, 1039, 1043, 1044, 1045, 1048, 1053, 1055, 1056, 1064 }; + + /// + /// 4星普通武器池 + /// + [JsonProperty("fallbackItems4Pool2")] + private int[] FallbackItems4Pool2 { get; set; } = { 11401, 11402, 11403, 11405, 12401, 12402, 12403, 12405, 13401, 13407, 14401, 14402, 14403, 14409, 15401, 15402, 15403, 15405 }; + + /// + /// 5星普通角色池 + /// + [JsonProperty("fallbackItems5Pool1")] + private int[] FallbackItems5Pool1 { get; set; } = { 1003, 1016, 1042, 1035, 1041 }; + + /// + /// 5星普通角色池 + /// + [JsonProperty("fallbackItems5Pool2")] + private int[] FallbackItems5Pool2 { get; set; } = { 11501, 11502, 12501, 12502, 13502, 13505, 14501, 14502, 15501, 15502 }; + + /// + /// 是否从奖池中移除玩家星座等级6级以上的角色 + /// + [JsonProperty("removeC6FromPool")] + private bool RemoveC6FromPool { get; set; } = false; + + /// + /// 自动从普通池中移除UP池物品或角色 + /// + [JsonProperty("autoStripRateUpFromFallback")] + private bool AutoStripRateUpFromFallback { get; set; } = true; + + /// + /// 4星权重 + /// + [JsonProperty("weights4")] + private int[,] Weights4 { get; set; } = { { 1, 510 }, { 8, 510 }, { 10, 10000 } }; + + /// + /// 5星权重 + /// + [JsonProperty("weights5")] + private int[,] Weights5 { get; set; } = { { 1, 75 }, { 73, 150 }, { 90, 10000 } }; + + /// + /// 4星平衡奖池权重(即中的是武器还是角色) + /// + [JsonProperty("poolBalanceWeights4")] + private int[,] PoolBalanceWeights4 { get; set; } = { { 1, 255 }, { 17, 255 }, { 21, 10455 } }; + + /// + /// 5星平衡奖池权重(即中的是武器还是角色) + /// + [JsonProperty("poolBalanceWeights5")] + private int[,] PoolBalanceWeights5 { get; set; } = { { 1, 30 }, { 147, 150 }, { 181, 10230 } }; + + /// + /// 4星事件概率(抽中后,摇1~100随机数,如果大于该值则抽中up池) + /// + [JsonProperty("eventChance4")] + public int EventChance4 { get; set; } = 50; + + /// + /// 5星事件概率(抽中后,摇1~100随机数,如果大于该值则抽中up池) + /// + [JsonProperty("eventChance5")] + public int EventChance5 { get; set; } = 50; + + /// + /// 这个有3种类型,standard表示常驻池,event表示限时角色祈愿池, + /// weapon表示限时武器祈愿池,选择一种类型的卡池 + /// + [JsonProperty("bannerType"), JsonConverter(typeof(StringEnumConverter))] + public BannerType BannerType { get; set; } = BannerType.STANDARD; + } +} \ No newline at end of file diff --git a/Source/GrasscutterTools/GrasscutterTools.csproj b/Source/GrasscutterTools/GrasscutterTools.csproj index 3ce59b2..d16e24a 100644 --- a/Source/GrasscutterTools/GrasscutterTools.csproj +++ b/Source/GrasscutterTools/GrasscutterTools.csproj @@ -215,6 +215,7 @@ FormTextMapBrowser.cs +