Files
systemrevivalserver/Game/Dungeon/PlayerInstance.cs
T
2025-12-26 16:24:12 -05:00

60 lines
1.8 KiB
C#

namespace Server.Game.Dungeon;
/// <summary>
/// Runtime instance of a player in a dungeon
/// </summary>
public class PlayerInstance
{
public ulong CharacterId { get; set; }
public string CharacterName { get; set; } = "";
public float X { get; set; }
public float Y { get; set; }
public float Rotation { get; set; }
public float Health { get; set; }
public float MaxHealth { get; set; }
public float Mana { get; set; }
public float MaxMana { get; set; }
public float Stamina { get; set; }
public float MaxStamina { get; set; }
public float MoveSpeed { get; set; } = 100f;
public float AttackSpeed { get; set; } = 1f;
public int Strength { get; set; }
public int Intelligence { get; set; }
public int Wisdom { get; set; }
public int Endurance { get; set; }
public int Dexterity { get; set; }
// Defensive stats (from gear)
public int Armor { get; set; }
/// <summary>
/// Weapon damage type key (from equipped weapon, defaults to physical for unarmed)
/// </summary>
public string WeaponDamageTypeKey { get; set; } = "physical";
/// <summary>
/// Combined resistances from innate + gear
/// </summary>
public Dictionary<string, float> Resistances { get; set; } = new();
public bool IsAlive { get; set; } = true;
public bool IsInCombat { get; set; }
// Session stats
public int XpGained { get; set; }
public int MobsKilled { get; set; }
public int PlayersKilled { get; set; }
// Tick tracking
public long LastAttackTick { get; set; }
public long LastCombatTick { get; set; }
// Input state (set by handler)
public float InputX { get; set; }
public float InputY { get; set; }
public bool WantsToAttack { get; set; }
public ulong? AttackTargetId { get; set; }
}