using System; using System.Collections.Generic; using Newtonsoft.Json; using System.Linq; using System.Text; using System.Threading.Tasks; namespace PSO2SERVER.Models { public enum AttackType { Mel = 0, Rng = 1, Tec = 2 } public class LevelStats { public ulong ExpToNext { get; set; } = 0; public float Hp { get; set; } = 0; public float Pp { get; set; } = 0; public float MelPow { get; set; } = 0; public float RngPow { get; set; } = 0; public float TecPow { get; set; } = 0; public float Dex { get; set; } = 0; public float MelDef { get; set; } = 0; public float RngDef { get; set; } = 0; public float TecDef { get; set; } = 0; } public class StatMultipliers { public sbyte Hp { get; set; } = 0; public sbyte MelPow { get; set; } = 0; public sbyte RngPow { get; set; } = 0; public sbyte TecPow { get; set; } = 0; public sbyte Dex { get; set; } = 0; public sbyte MelDef { get; set; } = 0; public sbyte RngDef { get; set; } = 0; public sbyte TecDef { get; set; } = 0; } public class ClassStatsStored { public ClassType Class { get; set; } public List Stats { get; set; } = new List(); } public class PlayerStats { public List> Stats { get; set; } = new List>(); public List Modifiers { get; set; } = new List(); } public class RaceModifierStored { public StatMultipliers HumanMale { get; set; } = new StatMultipliers(); public StatMultipliers HumanFemale { get; set; } = new StatMultipliers(); public StatMultipliers NewmanMale { get; set; } = new StatMultipliers(); public StatMultipliers NewmanFemale { get; set; } = new StatMultipliers(); public StatMultipliers CastMale { get; set; } = new StatMultipliers(); public StatMultipliers CastFemale { get; set; } = new StatMultipliers(); public StatMultipliers DeumanMale { get; set; } = new StatMultipliers(); public StatMultipliers DeumanFemale { get; set; } = new StatMultipliers(); } public class EnemyLevelBaseStats { public uint Level { get; set; } = 0; public float Exp { get; set; } = 0; public float Hp { get; set; } = 0; public float MaxMelDmg { get; set; } = 0; public float MinMelDmg { get; set; } = 0; public float MaxRngDmg { get; set; } = 0; public float MinRngDmg { get; set; } = 0; public float MaxTecDmg { get; set; } = 0; public float MinTecDmg { get; set; } = 0; public float MelDef { get; set; } = 0; public float RngDef { get; set; } = 0; public float TecDef { get; set; } = 0; public float Dex { get; set; } = 0; } public class EnemyHitbox { public string Name { get; set; } = string.Empty; public uint HitboxId { get; set; } = 0; public float DamageMul { get; set; } = 1.0f; public float MelMul { get; set; } = 1.0f; public float RngMul { get; set; } = 1.0f; public float TecMul { get; set; } = 1.0f; public float FireMul { get; set; } = 1.0f; public float IceMul { get; set; } = 1.0f; public float ThunderMul { get; set; } = 1.0f; public float WindMul { get; set; } = 1.0f; public float LightMul { get; set; } = 1.0f; public float DarkMul { get; set; } = 1.0f; } public class EnemyBaseStats { public List Levels { get; set; } = new List(); } public class EnemyStats { public List Levels { get; set; } = new List(); public List Hitboxes { get; set; } = new List(); } public class NamedEnemyStats { public string Name { get; set; } = string.Empty; public EnemyStats Stats { get; set; } = new EnemyStats(); } public class AllEnemyStats { public EnemyBaseStats Base { get; set; } = new EnemyBaseStats(); public Dictionary Enemies { get; set; } = new Dictionary(); } public class AttackStatsReadable { public string AttackName { get; set; } = string.Empty; public string DamageName { get; set; } = string.Empty; public AttackType AttackType { get; set; } = AttackType.Mel; public AttackType DefenseType { get; set; } = AttackType.Mel; public DamageTypeReadable Damage { get; set; } = new DamageTypeReadable(); } public class AttackStats { public uint AttackId { get; set; } = 0; public uint DamageId { get; set; } = 0; public AttackType AttackType { get; set; } = AttackType.Mel; public AttackType DefenseType { get; set; } = AttackType.Mel; public DamageType Damage { get; set; } = new DamageType(); } public class DamageTypeReadable { public static DamageTypeReadable Default => new DamageTypeReadable { Mul = 1.0f }; public float Mul { get; set; } = 1.0f; public string Name { get; set; } = string.Empty; } public class DamageType { public float Mul { get; set; } = 1.0f; public Tuple Pa { get; set; } = new Tuple(0, 1.0f); public DamageType() { } public DamageType(float mul) { Mul = mul; } public DamageType(Tuple pa) { Pa = pa; } } public class DamageTypeConverter { public static DamageType ConvertToDamageType(DamageTypeReadable value) { return new DamageType(value.Mul); } } }