//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace cfg
{
public sealed partial class FishEatFish : Bright.Config.BeanBase
{
public JSONNode json;
public FishEatFish(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["PullingProb"].IsNumber) { throw new SerializationException(); } PullingProb = _json["PullingProb"]; }
{ if(!_json["UIEatWeight"].IsNumber) { throw new SerializationException(); } UIEatWeight = _json["UIEatWeight"]; }
{ if(!_json["EatWeight"].IsNumber) { throw new SerializationException(); } EatWeight = _json["EatWeight"]; }
{ var __json0 = _json["FirstFishQuality"]; if(!__json0.IsArray) { throw new SerializationException(); } FirstFishQuality = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FirstFishQuality.Add(__v0); } }
{ var __json0 = _json["MiddleFishQuality"]; if(!__json0.IsArray) { throw new SerializationException(); } MiddleFishQuality = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } MiddleFishQuality.Add(__v0); } }
{ var __json0 = _json["MiddleFishCount"]; if(!__json0.IsArray) { throw new SerializationException(); } MiddleFishCount = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } MiddleFishCount.Add(__v0); } }
{ var __json0 = _json["MiddleFishCountWeight"]; if(!__json0.IsArray) { throw new SerializationException(); } MiddleFishCountWeight = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } MiddleFishCountWeight.Add(__v0); } }
{ var __json0 = _json["UIEatHpPercent"]; if(!__json0.IsArray) { throw new SerializationException(); } UIEatHpPercent = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } UIEatHpPercent.Add(__v0); } }
{ if(!_json["WarningAfterEat"].IsString) { throw new SerializationException(); } WarningAfterEat = _json["WarningAfterEat"]; }
{ if(!_json["IsDarkness"].IsBoolean) { throw new SerializationException(); } IsDarkness = _json["IsDarkness"]; }
{ if(!_json["CruiseExtraScale"].IsNumber) { throw new SerializationException(); } CruiseExtraScale = _json["CruiseExtraScale"]; }
{ if(!_json["CruiseBg"].IsString) { throw new SerializationException(); } CruiseBg = _json["CruiseBg"]; }
{ if(!_json["CruiseMaxCount"].IsNumber) { throw new SerializationException(); } CruiseMaxCount = _json["CruiseMaxCount"]; }
{ var __json0 = _json["CruiseAppearForTargetFishQuality"]; if(!__json0.IsArray) { throw new SerializationException(); } CruiseAppearForTargetFishQuality = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } CruiseAppearForTargetFishQuality.Add(__v0); } }
json = _json;
PostInit();
}
public FishEatFish(int ID, float PullingProb, int UIEatWeight, int EatWeight, System.Collections.Generic.List FirstFishQuality, System.Collections.Generic.List MiddleFishQuality, System.Collections.Generic.List MiddleFishCount, System.Collections.Generic.List MiddleFishCountWeight, System.Collections.Generic.List UIEatHpPercent, string WarningAfterEat, bool IsDarkness, float CruiseExtraScale, string CruiseBg, int CruiseMaxCount, System.Collections.Generic.List CruiseAppearForTargetFishQuality )
{
this.ID = ID;
this.PullingProb = PullingProb;
this.UIEatWeight = UIEatWeight;
this.EatWeight = EatWeight;
this.FirstFishQuality = FirstFishQuality;
this.MiddleFishQuality = MiddleFishQuality;
this.MiddleFishCount = MiddleFishCount;
this.MiddleFishCountWeight = MiddleFishCountWeight;
this.UIEatHpPercent = UIEatHpPercent;
this.WarningAfterEat = WarningAfterEat;
this.IsDarkness = IsDarkness;
this.CruiseExtraScale = CruiseExtraScale;
this.CruiseBg = CruiseBg;
this.CruiseMaxCount = CruiseMaxCount;
this.CruiseAppearForTargetFishQuality = CruiseAppearForTargetFishQuality;
PostInit();
}
public static FishEatFish DeserializeFishEatFish(JSONNode _json)
{
return new FishEatFish(_json);
}
public int ID { get; private set; }
///
/// 第一步先算这个,如果直接钓起来了就没下文了
///
public float PullingProb { get; private set; }
///
/// Drawing阶段,游过去,然后播放UI吃掉鱼
///
public int UIEatWeight { get; private set; }
///
/// Pulling阶段时播放动画吃掉鱼
///
public int EatWeight { get; private set; }
///
/// 一开始钓到的鱼,在当前地图中对应品质的鱼中等概率随机
如果是特殊地图,则DropFishData中的列+4,比如配5对应第1列的鱼
///
public System.Collections.Generic.List FirstFishQuality { get; private set; }
///
/// 在起始鱼和目标鱼中间插入的连吃鱼
///
public System.Collections.Generic.List MiddleFishQuality { get; private set; }
///
/// 最后钓到的鱼,钓鱼总数其实是这个数量+2(有起始鱼和目标鱼)
注意如果有游弋鱼的特殊处理
///
public System.Collections.Generic.List MiddleFishCount { get; private set; }
///
/// MiddleFishCount的权重
///
public System.Collections.Generic.List MiddleFishCountWeight { get; private set; }
///
/// 从这个区间到0%之间随机出一个血量,血量低于这个数值就吃鱼
///
public System.Collections.Generic.List UIEatHpPercent { get; private set; }
///
/// 在UI吃鱼和动画吃鱼后出现提示warning
品质 >= 5的鱼有提示
///
public string WarningAfterEat { get; private set; }
///
/// 如果出现了游弋鱼,则读取它的这个行,看出现的提示
只有活动鱼有对应提示
///
public bool IsDarkness { get; private set; }
///
/// 鱼的Scale需要额外乘以这个数
///
public float CruiseExtraScale { get; private set; }
///
/// 如果出现了游弋鱼,则读取它的这个行,看出现的提示
只有活动鱼有对应提示
///
public string CruiseBg { get; private set; }
///
/// 无论触发了没有,钓鱼这么多次之后直接销毁游弋鱼
///
public int CruiseMaxCount { get; private set; }
///
/// 如果没有被加入到吃鱼队列里,则根据目标鱼品质,选择当前游弋鱼的游弋概率,分别对应8个品质
///
public System.Collections.Generic.List CruiseAppearForTargetFishQuality { get; private set; }
public const int __ID__ = -1527219144;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "PullingProb:" + PullingProb + ","
+ "UIEatWeight:" + UIEatWeight + ","
+ "EatWeight:" + EatWeight + ","
+ "FirstFishQuality:" + Bright.Common.StringUtil.CollectionToString(FirstFishQuality) + ","
+ "MiddleFishQuality:" + Bright.Common.StringUtil.CollectionToString(MiddleFishQuality) + ","
+ "MiddleFishCount:" + Bright.Common.StringUtil.CollectionToString(MiddleFishCount) + ","
+ "MiddleFishCountWeight:" + Bright.Common.StringUtil.CollectionToString(MiddleFishCountWeight) + ","
+ "UIEatHpPercent:" + Bright.Common.StringUtil.CollectionToString(UIEatHpPercent) + ","
+ "WarningAfterEat:" + WarningAfterEat + ","
+ "IsDarkness:" + IsDarkness + ","
+ "CruiseExtraScale:" + CruiseExtraScale + ","
+ "CruiseBg:" + CruiseBg + ","
+ "CruiseMaxCount:" + CruiseMaxCount + ","
+ "CruiseAppearForTargetFishQuality:" + Bright.Common.StringUtil.CollectionToString(CruiseAppearForTargetFishQuality) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}