MainHud/AI.cs

Simple AI data model class used by the game. It stores basic stats for an AI character including name, hp, defense, magic, prestige, cursed flag, and an equipped Weapon reference, and provides a constructor to initialize most fields.

Native Interop
using Sandbox;
namespace Keyboard_Warriors_.Models;

public class AI
{
	public string name { get; set; }
	public int hp { get; set; }
	public int defense { get; set; }
	public int magic { get; set; }
	public int prestige { get; set; }
	public bool cursed { get; set; }
	public Weapon equippedWeapon { get; set; }

	// Constructor to set up the AI
	public AI( string name, int hp, int defense, int magic, int prestige )
	{
		this.name = name;
		this.hp = hp;
		this.defense = defense;
		this.magic = magic;
		this.prestige = prestige;
		this.cursed = false;
	}
}