const int CHF_DONTDODGE = 1;
const int CHF_BACKOFF = 2;
const int CHF_NOSIGHTCHECK = 4;
const int CHF_NOPLAYACTIVE = 8;

const int CMF_AIMOFFSET = 1;

const int CPF_USEAMMO = 1;
const int CPF_ALWAYSPLAYSOUND = 2;

const int WAF_NORANDOM = 1;

const int GAF_NORANDOM = 1;
const int GAF_NOAMMO = 2;

const int SXF_TRANSFERPOINTERS = 1;

const int ASP_CHASE = 3;

const int XF_HURTSOURCE = 1;

actor Actor native
{
	damage 0
	radius 20
	height 16
	health 1000
	sighttime 1
	speed 0
	points 0
	minmissilechance 200
	missilefrequency 1.0
	meleerange 44
	scale 1.0

	native angle_t angle;
	native int health;

	action native A_ActiveSound(int chance=256);
	action native A_AlertMonsters();
	action native A_BossDeath();
	action native A_CallSpecial(int special, int arg1=0, int arg2=0, int arg3=0, int arg4=0, int arg5=0);
	action native A_ChangeFlag(string flag, bool value);
	action native A_Chase(state melee="*", state ranged="*", int flags = 0);
	action native A_CustomMissile(string missiletype, float spawnheight = 32, int spawnoffset = 0, float angle = 0, int aimflags = 0);
	action native A_Dormant();
	action native A_Explode(int damage = 128, int radius = 128, int flags = XF_HURTSOURCE, bool alert = false, int fulldamageradius = 0);
	action native A_FaceTarget(float max_turn = 0, float max_pitch = 270);
	action native A_Fall();
	action native A_GiveExtraMan(int amount = 1);
	action native A_GiveInventory(string type, int amount = 0);
	action native A_Jump(int chance, state frame, ...);
	action native A_JumpIf(bool expression, state frame);
	action native A_JumpIfCloser(float distance, state frame);
	action native A_JumpIfInventory(string type, int amount, state frame);
	action native A_Look(int flags = 0, float minseedist = 0, float maxseedist = 0, float maxheardist = 0, float fov = 180);
	action native A_LookEx(int flags = 0, float minseedist = 0, float maxseedist = 0, float maxheardist = 0, float fov = 180); // Alias
	action native A_MeleeAttack(int damage, float accuracy = 0.6275);
	action native A_MonsterRefire(int chance, state abort);
	action native A_Pain();
	action native A_PlaySound(string soundname);
	action native A_Scream();
	action native A_SpawnItem(string type, float distance = 0, float zheight = 0);
	action native A_SpawnItemEx(string type, float xoffset = 0, float yoffset = 0, float zoffset = 0, float xvel = 0, float yvel = 0, float zvel = 0, float angle = 0, int flags = 0, int failchance = 0);
	action native A_Stop();
	action native A_TakeInventory(string type, int amount);
	action native A_WolfAttack(int flags = 0, string sound = "*", float snipe = 1.0, int maxdamage = 64, int blocksize = 128, int pointblank = 2, int longrange = 4, float runspeed = 160.0);

	states
	{
		Spawn:
			TNT1 A -1
			stop
	}
}

actor Inventory native
{
	inventory.amount 1
	inventory.maxamount 1
	inventory.interhubamount 1
}

actor Ammo : Inventory native
{
}

actor CustomInventory : Inventory native
{
}

actor Health : Inventory native
{
	inventory.amount 1
	inventory.maxamount 0
}

actor Key : Inventory native
{
	inventory.pickupsound "misc/k_pkup"
	inventory.interhubamount 0
}

actor KeyGiver : Inventory native
{
	inventory.pickupsound "misc/k_pkup"
}

actor ScoreItem : Inventory native
{
	+COUNTITEM
	inventory.amount 1
}

actor Weapon : Inventory native
{
	inventory.pickupsound "misc/w_pkup"
	weapon.ammotype1 "None"
	weapon.ammogive1 0
	weapon.ammouse1 0
	weapon.bobrangex 1.0
	weapon.bobrangey 1.0
	weapon.bobspeed 1.0
	weapon.bobstyle "Normal"
	weapon.yadjust 0

	action native A_CustomPunch(int damage, bool norandom=false, int flags=0, string pufftype="", float range=0, float lifesteal=0);
	action native A_FireCustomMissile(string missiletype, float angle=0, bool useammo=true, int spawnoffset=0, int spawnheight=0, bool aim=false, float pitch=0);
	action native A_GunAttack(int flags = 0, string sound = "*", float snipe = 1.0, int maxdamage = 64, int blocksize = 128, int pointblank = 2, int longrange = 4, int maxrange = 21);
	action native A_GunFlash(state frame="Flash");
	action native A_Light(int level);
	action native A_Light0();
	action native A_Light1();
	action native A_Light2();
	action native A_Lower();
	action native A_Raise();
	action native A_ReFire();
	action native A_WeaponReady();
}

actor WeaponGiver : Weapon native
{
	weapon.ammogive1 -1
}

actor PlayerPawn native
{
	speed 1
	player.viewheight 41
	player.forwardmove 1, 1
	player.sidemove 1, 1
	player.maxhealth 100
	player.movebob 1.0
	+SOLID
	+SHOOTABLE
	+PICKUP
	states
	{
		// ZDoom doesn't do this, but since invisible player classes are likely here, we need this state.
		Death:
			GARD A -1 A_Fall
			stop
	}
}

actor RandomSpawner native
{
}

actor Unknown
{
	radius 32
	states
	{
		Spawn:
			UNKN A -1
			stop
	}
}
