using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations; using System.Text; using Newtonsoft.Json; using Church.Net.Entity.Interface; namespace Church.Net.Entity.Games.MD2 { public enum MobType { Mob, RoamingMonster, Boss } public enum GameBundle { CoreGame, HeavenFallen, Zombiecide, } public enum MobSkillType { Attack, Defense, Combat, Passive } public enum MobSkillTarget { Random = 40, LeastHp = 50, LeastMp = 60, HighestHp = 70, HighestMp = 80, LowestLevel = 90, MostCorruption = 200, LeastCorruption = 201 } public enum MD2Icon { Attack, Defense, Mana, Shadow, EnemySkill, EnemyClaw, Reroll, Fire, Frost, OneHand, TwoHand, Helmet, Armor, Ring, Foot, Melee, Range, Magic, HP, MP, Dice, Arrow, ArrowBullseye, ArrowOverload, SoulToken, Rage, RedDice, BlueDice, YellowDice, OrangeDice, BlackDice } public class MobInfo : IEntity { [Key] public string Id { get; set; } public MobType Type { get; set; } public GameBundle From { get; set; } public string Name { get; set; } public string LeaderImgUrl { get; set; } public string MinionImgUrl { get; set; } public virtual ICollection MobLevelInfos { get; set; } public virtual ICollection Skills { get; set; } } public class MobLevelInfo : IEntity { [Key] public string Id { get; set; } [ForeignKey("MobInfo")] public string MobInfoId { get; set; } [JsonIgnore] public virtual MobInfo MobInfo { get; set; } public int RewardTokens { get; set; } public int FixedRareTreasure { get; set; } public int FixedEpicTreasure { get; set; } public int FixedLegendTreasure { get; set; } public int FixedHp { get; set; } public int HpPerHero { get; set; } public int Actions { get; set; } [ForeignKey("AttackInfo")] public string AttackInfoId { get; set; } public MD2DiceSet AttackInfo { get; set; } [ForeignKey("DefenceInfo")] public string DefenceInfoId { get; set; } public MD2DiceSet DefenceInfo { get; set; } public virtual ICollection Skills { get; set; } } public class MobSkill : IEntity { [Key] public string Id { get; set; } [ForeignKey("MobLevelInfo")] public string MobLevelInfoId { get; set; } [ForeignKey("MobInfo")] public string MobInfoId { get; set; } [JsonIgnore] public virtual MobInfo MobInfo { get; set; } [JsonIgnore] public virtual MobLevelInfo MobLevelInfo { get; set; } public MobSkillType Type { get; set; } public MobSkillTarget? SkillTarget { get; set; } public int ClawRoll { get; set; } public int SkillRoll { get; set; } public string Name { get; set; } public string Description { get; set; } } public class MD2DiceSet : IEntity { [Key] public string Id { get; set; } public int? Yellow { get; set; } public int? Orange { get; set; } public int? Red { get; set; } public int? Blue { get; set; } public int? Green { get; set; } public int? Black { get; set; } } }