175 lines
6.5 KiB
C#
175 lines
6.5 KiB
C#
using System;
|
|||
|
|
using System.Collections.Generic;
|
||
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
||
|
|
using System.Linq;
|
||
|
|
using System.Text;
|
||
|
|
using System.Threading.Tasks;
|
||
|
|
using CommonDomain.BaseModel;
|
||
|
|
using MongoDB.Bson.Serialization.Attributes;
|
||
|
|
using MongoRepository;
|
||
|
|
using MongoRepository.Attributes;
|
||
|
|
|
||
|
|
namespace CommonDomain
|
||
|
|
{
|
||
|
|
[BsonCollection("game_config", "data_0524")]
|
||
|
|
[BsonIgnoreExtraElements]
|
||
|
|
public class GameConfig : MongoBaseEntity
|
||
|
|
{
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public List<FishTypeConfig> FishTypeConfigs { get; set; } = new List<FishTypeConfig>();
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public List<RoomConfig> RoomConfigs { get; set; } = new List<RoomConfig>();
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public List<RoomFishConfig> RoomFishConfigs { get; set; } = new List<RoomFishConfig>();
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public List<FishArrayConfig> FishArrayConfigs { get; set; } = new List<FishArrayConfig>();
|
||
|
|
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public List<UserLevelConfig> UserLevelConfigs { get; set; } = new List<UserLevelConfig>();
|
||
|
|
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public List<PropInfConfig> PropConfig { get; set; } = new List<PropInfConfig>();
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public List<PropFragmentConfig> PropFragments { get; set; } = new List<PropFragmentConfig>();
|
||
|
|
|
||
|
|
|
||
|
|
public List<ScratchCardConfig> ScratchCardConfig { get; set; } = new List<ScratchCardConfig>();
|
||
|
|
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public List<VipLevelConfig> VipLevelConfigs { get; set; } = new List<VipLevelConfig>();
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public KillConfig KillConfig { get; set; } = new KillConfig();
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public BossConfig BossConfigs { get; set; } = new BossConfig();
|
||
|
|
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public ChessConfig ChessConfig { get; set; } = new ChessConfig();
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public FishRoomConfig FishRoomConfig { get; set; } = new FishRoomConfig();
|
||
|
|
|
||
|
|
public BossDropConfig BossDropConfig { get; set; } = new BossDropConfig();
|
||
|
|
|
||
|
|
[Column(TypeName = "jsonb")]
|
||
|
|
public List<TorpedoItemConfig> TorpedoConfigs { get; set; } = new();
|
||
|
|
|
||
|
|
public RobotKillConfig RobotKillConfig { get; set; } = new RobotKillConfig();
|
||
|
|
|
||
|
|
public BotConfig BotConfig { get; set; } = new BotConfig();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class BotConfig
|
||
|
|
{
|
||
|
|
public bool Enabled { get; set; } = true;
|
||
|
|
public string AiState { get; set; } = "active";
|
||
|
|
public double LuckFactor { get; set; } = 1.0;
|
||
|
|
public double StateRefreshInterval { get; set; }
|
||
|
|
public BotSkillConfig Skills { get; set; } = new();
|
||
|
|
public BotBehaviorConfig ActiveBehavior { get; set; } = new();
|
||
|
|
public BotBehaviorConfig IdleBehavior { get; set; } = new();
|
||
|
|
public BotBehaviorConfig AggressiveBehavior { get; set; } = new();
|
||
|
|
public BotMultiplierConfig Multiplier { get; set; } = new();
|
||
|
|
public BotBossStrategyConfig BossStrategy { get; set; } = new();
|
||
|
|
public BotExitConfig ExitCondition { get; set; } = new();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class BotSkillConfig
|
||
|
|
{
|
||
|
|
public double SkillRefreshInterval { get; set; } = 10;
|
||
|
|
public double LockProb { get; set; }
|
||
|
|
public double LockMinTime { get; set; } = 5;
|
||
|
|
public double LockMaxTime { get; set; } = 20;
|
||
|
|
public double FrenzyProb { get; set; } = 0.3;
|
||
|
|
public double FrenzyMinTime { get; set; } = 3;
|
||
|
|
public double FrenzyMaxTime { get; set; } = 8;
|
||
|
|
public double TripleProb { get; set; } = 0.5;
|
||
|
|
public double TripleMinTime { get; set; } = 4;
|
||
|
|
public double TripleMaxTime { get; set; } = 12;
|
||
|
|
public double DoubleProb { get; set; }
|
||
|
|
public double DoubleMinTime { get; set; } = 3;
|
||
|
|
public double DoubleMaxTime { get; set; } = 6;
|
||
|
|
}
|
||
|
|
|
||
|
|
public class BotBehaviorConfig
|
||
|
|
{
|
||
|
|
public double FireIntervalMin { get; set; } = 0.3;
|
||
|
|
public double FireIntervalMax { get; set; } = 1.2;
|
||
|
|
public double FireProb { get; set; } = 0.9;
|
||
|
|
public double RotateSpeed { get; set; } = 80;
|
||
|
|
public double TargetHoldTimeMin { get; set; } = 2;
|
||
|
|
public double TargetHoldTimeMax { get; set; } = 5;
|
||
|
|
public double TargetSwitchChance { get; set; } = 0.7;
|
||
|
|
public double TargetPreferHighScore { get; set; }
|
||
|
|
public bool CanTargetBoss { get; set; } = true;
|
||
|
|
public bool CanTargetSpecial { get; set; } = true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public class BotMultiplierConfig
|
||
|
|
{
|
||
|
|
public int InitialLevelIndex { get; set; }
|
||
|
|
public double DecreaseThreshold { get; set; } = 0.5;
|
||
|
|
public double IncreaseThreshold { get; set; } = 1.5;
|
||
|
|
public int Step { get; set; } = 1;
|
||
|
|
public double CheckInterval { get; set; } = 3;
|
||
|
|
public int MinLevelIndex { get; set; }
|
||
|
|
public int MaxLevelIndex { get; set; } = -1;
|
||
|
|
}
|
||
|
|
|
||
|
|
public class BotBossStrategyConfig
|
||
|
|
{
|
||
|
|
public List<int> BossFishTypes { get; set; } = new() { 2, 5 };
|
||
|
|
public bool ScatterWhenNoBoss { get; set; } = true;
|
||
|
|
public double TripleShotProb { get; set; } = 0.5;
|
||
|
|
public bool PreferMaxMultiplierBoss { get; set; } = true;
|
||
|
|
public int ScatterModeThreshold { get; set; } = 3;
|
||
|
|
public double FrenzyProb { get; set; } = 0.6;
|
||
|
|
public double FrenzyMinTime { get; set; } = 3;
|
||
|
|
public double FrenzyMaxTime { get; set; } = 8;
|
||
|
|
}
|
||
|
|
|
||
|
|
public class BotExitConfig
|
||
|
|
{
|
||
|
|
public long ExitWhenGoldAbove { get; set; }
|
||
|
|
public long ExitWhenGoldBelow { get; set; } = 100;
|
||
|
|
public double CheckInterval { get; set; } = 5;
|
||
|
|
public bool SendLeaveRoom { get; set; } = true;
|
||
|
|
public bool ShowWaitingAfterExit { get; set; } = true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public class RobotKillConfig
|
||
|
|
{
|
||
|
|
public bool IsEnabled { get; set; }
|
||
|
|
public int IntervalSeconds { get; set; } = 5;
|
||
|
|
public List<RobotKillScene> Scenes { get; set; } = new();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class RobotKillScene
|
||
|
|
{
|
||
|
|
public string GameName { get; set; } = "";
|
||
|
|
public string LevelName { get; set; } = "";
|
||
|
|
public int GameType { get; set; }
|
||
|
|
public int RoomLevel { get; set; }
|
||
|
|
public int Weight { get; set; } = 1;
|
||
|
|
public string FishName { get; set; } = "";
|
||
|
|
public string FishNumber { get; set; } = "";
|
||
|
|
public int MultiplierMin { get; set; } = 500;
|
||
|
|
public int MultiplierMax { get; set; } = 2000;
|
||
|
|
public long JackpotMin { get; set; } = 5000000;
|
||
|
|
public long JackpotMax { get; set; } = 200000000;
|
||
|
|
}
|
||
|
|
}
|