MainHud/AI.cs

Simple AI model class that represents an NPC or character. It stores name, hp, defense, magic, prestige, cursed flag and a reference to an equipped Weapon.

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;
	}
}