GrasscutterCommandGenerator/Source/GrasscutterTools/Game/Gacha/GachaBanner.cs
筱傑 c7898401ce Clean up all
Remvoe TextBoxXP
2022-11-27 16:51:47 +08:00

140 lines
5.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 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 <https://www.gnu.org/licenses/>.
*
**/
using System.ComponentModel;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace GrasscutterTools.Game.Gacha
{
/// <summary>
/// 使用这个只需替换掉你原来的的data/banner.json文件
/// 然后重启服务器和客户端,即可享受全卡池抽卡,卡池的选择方式是点击左右箭头进行切换
/// </summary>
public class GachaBanner
{
/// <summary>
/// 添加卡池请从400开始增加id数值进行添加这个id需要每个池子不一样
/// 如果你想添加大量卡池请按照每次增加固定数值的id进行添加比如411412413....
/// </summary>
[JsonProperty("gachaType")]
public int GachaType { get; set; }
/// <summary>
/// 这个id需要每个池子不一样如果你想添加大量卡池
/// 请按照每次增加固定数值的id进行添加,比如210022002300....
/// </summary>
[JsonProperty("scheduleId")]
public int ScheduleId { get; set; }
/// <summary>
/// 这个有3种类型standard表示常驻池event表示限时角色祈愿池
/// weapon表示限时武器祈愿池选择一种类型的卡池
/// </summary>
[JsonProperty("bannerType", DefaultValueHandling = DefaultValueHandling.Include), JsonConverter(typeof(StringEnumConverter))]
public BannerType BannerType { get; set; }
/// <summary>
/// 这个是卡池的预制路径id
/// </summary>
[JsonProperty("prefabPath")]
public string PrefabPath { get; set; }
/// <summary>
/// 这个是抽卡的预览背景路径id
/// </summary>
[JsonProperty("previewPrefabPath")]
public string PreviewPrefabPath { get; set; }
/// <summary>
/// 这个是抽卡的标题路径id有可能与之前两项的id不同
/// 一般这3项的id只需保持一致即可就是A0xxxx为同一id
/// </summary>
[JsonProperty("titlePath")]
public string TitlePath { get; set; }
/// <summary>
/// 这个表示祈愿用的道具224是相遇之缘223是纠缠之缘 - 选择一个作为该卡池的抽卡道具
/// (提示请不要随便修改祈愿道具除了蓝球和粉球有可能会引发bug比如修改成摩拉抽卡可能导致卡住)
/// </summary>
[JsonProperty("costItem")]
public int CostItem { get; set; }
/// <summary>
/// 祈愿什么时候开始默认设置为0
/// </summary>
[JsonProperty("beginTime")]
public int BeginTime { get; set; } = 0;
/// <summary>
/// 这个卡池持续多长时间(默认为这个极大的数字)
/// </summary>
[JsonProperty("endTime")]
public int EndTime { get; set; } = 1924992000;
/// <summary>
/// 暂时未搞清楚功能,可能与卡池在屏幕的左右顺序有关
/// </summary>
[JsonProperty("sortId")]
public int SortId { get; set; }
/// <summary>
/// 通常为5星的up角色或物品可修改可添加查看gm手册可修改为任意角色或者物品
/// </summary>
[JsonProperty("rateUpItems1")]
public int[] RateUpItems1 { get; set; }
/// <summary>
/// 通常为4星的up物品或者角色(可修改可添加查看gm手册可修改为任意角色或者物品)
/// </summary>
[JsonProperty("rateUpItems2")]
public int[] RateUpItems2 { get; set; }
/// <summary>
/// 5星概率(0~10000)
/// </summary>
[JsonProperty("baseYellowWeight", DefaultValueHandling = DefaultValueHandling.Ignore), DefaultValue(60)]
public int BaseYellowWeight { get; set; } = 60; // Max 10000
/// <summary>
/// 4星概率(0~10000)
/// </summary>
[JsonProperty("basePurpleWeight", DefaultValueHandling = DefaultValueHandling.Ignore), DefaultValue(510)]
public int BasePurpleWeight { get; set; } = 510; // Max 10000
/// <summary>
/// 事件概率抽中后摇1~100随机数如果大于该值则抽中up池
/// </summary>
[JsonProperty("eventChance", DefaultValueHandling = DefaultValueHandling.Ignore), DefaultValue(50)]
public int EventChance { get; set; } = 50; // Chance to win a featured event item
/// <summary>
/// 软保底失败多少次开始提升抽中概率在这之上每失败一次概率增加1%
/// </summary>
[JsonProperty("softPity", DefaultValueHandling = DefaultValueHandling.Ignore), DefaultValue(75)]
public int SoftPity { get; set; } = 75;
/// <summary>
/// 硬保底(失败多少次必出)
/// </summary>
[JsonProperty("hardPity", DefaultValueHandling = DefaultValueHandling.Ignore), DefaultValue(90)]
public int HardPity { get; set; } = 90;
}
}