//Weapon and Item Pickups
#include "Actors/Weapons/GMOTA_Chainsaw.txt"
#include "Actors/Weapons/GMOTA_Shotgun.txt"
#include "Actors/Weapons/GMOTA_SSG.txt"
#include "Actors/Weapons/GMOTA_Chaingun.txt"
#include "Actors/Weapons/GMOTA_RocketLauncher.txt"
#include "Actors/Weapons/GMOTA_PlasmaRifle.txt"
#include "Actors/Weapons/GMOTA_BFG.txt"

#include "Actors/Ammo/GMOTA_Shells.txt"
#include "Actors/Ammo/GMOTA_Clips.txt"
#include "Actors/Ammo/GMOTA_Cells.txt"
#include "Actors/Ammo/GMOTA_Rockets.txt"
#include "Actors/Ammo/GMOTA_ExtraAmmo.txt"


//Subweapons
#include "Actors/Subweapons/Hatchet.txt"
#include "Actors/Subweapons/WardingShield.txt"
#include "Actors/Subweapons/Lance.txt"
#include "Actors/Subweapons/Dagger.txt"
#include "Actors/Subweapons/Torch.txt"
#include "Actors/Subweapons/Bomb.txt"
#include "Actors/Subweapons/Hammer.txt"
#include "Actors/Subweapons/Boomerang.txt"
#include "Actors/Subweapons/SplitStaff.txt"

#include "Actors/Subweapons/CrushMissile.txt"
#include "Actors/Subweapons/Scattershot.txt"
#include "Actors/Subweapons/RollingBomb.txt"
#include "Actors/Subweapons/HeatBeam.txt"
#include "Actors/Subweapons/SpikeVulcan.txt"
#include "Actors/Subweapons/HeavyMacer.txt"


//Lord Blaz and weapons
//#include "actors/lordblaz/zarach.txt"
#include "actors/lordblaz/newzarach.txt"
#include "actors/lordblaz/BlazSubweapons.txt"
//#include "actors/lordblaz/blazshot.txt"
#include "actors/lordblaz/blazter.txt"
#include "actors/lordblaz/placeholder.txt"
#include "actors/lordblaz/BlazMisc.txt"

//Doomslayer and weapons
#include "actors/doomslayer/rend.txt"
#include "actors/doomslayer/sunder.txt"
#include "actors/doomslayer/morningstar.txt"
#include "actors/doomslayer/thunderbuss.txt"
#include "actors/doomslayer/HydraRepeater.txt"
#include "actors/doomslayer/WrathCaster.txt"
#include "actors/doomslayer/InfernoRifle.txt"
#include "actors/doomslayer/BerserkFists.txt"
#include "actors/doomslayer/DoomSlayerSubweapons.txt"


//Monsters
#include "actors/monsters/Knight Archer.txt"
#include "actors/monsters/Steel Duke.txt"
#include "actors/monsters/BlackViper.txt"
#include "actors/monsters/ImpSkirmisher.txt"
#include "actors/monsters/GoldSkeleton.txt"
#include "actors/monsters/GrenadierRevenant.txt"
#include "actors/monsters/magebane.txt"
#include "actors/monsters/livingarmor.txt"
#include "actors/monsters/RedWyvern.txt"
#include "actors/monsters/PaviseGuard.txt"
#include "actors/monsters/MageGunner.txt"
#include "actors/monsters/skullbat.txt"
#include "actors/monsters/bomberknight.txt"
#include "actors/monsters/hellfos.txt"
#include "actors/monsters/bonelord.txt"
#include "actors/monsters/broodslime.txt"
#include "actors/monsters/edgelord.txt"
#include "actors/monsters/Cyberdemon.txt"
#include "actors/monsters/skellytun.txt"
#include "actors/monsters/MimicSkeleton.txt"
#include "actors/monsters/MiniSkelly.txt"

#include "actors/monsters/StealthMonsters.txt"

//Gameplay mechanics (powerups, items, blood)
#include "actors/powerups.txt"
#include "actors/HealthArmor.txt"
#include "actors/core/blood.txt"
#include "actors/subitems.txt"
#include "actors/decorations.txt"
#include "playertokens.dec"

actor LordBlaz : playerpawn 
{
	Player.DisplayName "Lord Blaz"
	Health 100
	ProjectilePassHeight 40
	mass 1000
	Scale 0.85
	+notimefreeze
	+dontblast 
	+thruspecies
	+DONTGIB
	species "friendly"
	damagefactor "barrel", 0.10
	Speed 1.1
	PainChance 256
	painchance "thiefknife", 256
	painchance "thrownthiefknife", 256
	painchance "icearrow", 256
	player.portrait "BLZPIC"
	player.viewheight 38
	player.jumpz 10
	player.soundclass "braveone"
	Player.CrouchSprite "LBLZ"
	Player.ColorRange 112, 127
	//player.startitem "subweaponammo", 1
	player.startitem "Bulletgem", 15
	Player.StartItem "newzarach"
	Player.StartItem "Blazter"
	player.startitem "IamLordBlaz"
	Player.WeaponSlot 1, newZarach
	Player.WeaponSlot 2, Blazter
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0
		LBLZ A 1 A_JumpIf(momz > 0, "Jumping")	
		Loop
	See:
		TNT1 A 0
		TNT1 A 0
		LBLZ A 5 A_JumpIf(momz > 0, "Jumping")
		LBLZ D 1 a_playsoundex ("player/walk","6")
		LBLZ D 5 A_JumpIf(momz > 0, "Jumping")
		LBLZ C 5 A_JumpIf(momz > 0, "Jumping")
		LBLZ B 1 a_playsoundex ("player/walk","6")
		LBLZ B 5 A_JumpIf(momz > 0, "Jumping")
		Goto Spawn
	jumping:
		TNT1 A 0
		TNT1 A 0
		LBLZ D 1
		LBLZ D 1 A_JumpIf(momz > 0, "Jumping")
		goto spawn
	missile:
		TNT1 A 0
		TNT1 A 0
		LBLZ A 2 a_jumpifinventory ("usingsubweapon", 1, "subweapon")
		TNT1 A 0 a_jumpifinventory ("usingsubweapon", 1, "subweapon")
		TNT1 A 0 a_jumpifinventory ("usingsword", 1, "swordattack")
		TNT1 A 0 a_jumpifinventory ("wavecharge", 1, "blaztercharge")
		LBLZ G 3
		LBLZ H 6
		Goto Spawn	
	Swordattack:
		TNT1 A 0
		TNT1 A 0
		LBLZ A 2 a_jumpifinventory ("usingsubweapon", 1, "subweapon")
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "punch")
		LBLZ E 3
		LBLZ F 6
		Goto Spawn
	subweapon:
		TNT1 A 0
		TNT1 A 0
		LBLZ P 4
		LBLZ O 6 a_takeinventory ("usingsubweapon",99) 
		goto spawn
	Punch:
		TNT1 A 0
		TNT1 A 0
		LBLZ O 6
		goto spawn
	blaztercharge:
		TNT1 A 0
		TNT1 A 0
		LBLZ G 2
		TNT1 A 0 a_jumpifinventory ("wavecharge", 1, "blaztercharge")
		goto missile
	Pain:
		TNT1 A 0
		LBLZ I 0
		LBLZ I 4 a_pain
		Goto Spawn
	Pain.thiefknife:
		TNT1 A 0
		LBLZ I 0
		LBLZ I 0 a_takeinventory ("arcaneforce", random(1,5))
		TNT1 A 0 a_playsound ("hero/drained",0)
		TNT1 A 0 a_takeinventory ("bulletgem", random(1,5))
		TNT1 A 0 a_takeinventory ("subweaponammo", random(1,5))
		TNT1 A 0 a_takeinventory ("subshotammo", random(1,5))
		LBLZ I 1 
		LBLZ I 4 a_pain
		goto spawn
	pain.thrownthiefknife:
		LBLZ I 0
		TNT1 A 0 a_playsound ("hero/drained",0)
		TNT1 A 0 a_takeinventory ("arcaneforce", random(1,3))
		TNT1 A 0 a_takeinventory ("bulletgem", random(1,3))
		TNT1 A 0 a_takeinventory ("subweaponammo", random(1,3))
		TNT1 A 0 a_takeinventory ("subshotammo", random(1,3))
		LBLZ I 1 
		LBLZ I 4 a_pain
		goto spawn	
	pain.icearrow:
		LBLZ I 0
		LBLZ I 0
		TNT1 A 0 a_setblend ("000 140 225",0.25,110,0)
		TNT1 A 0 a_playsound ("hero/frozen",0)
		TNT1 A 0 a_giveinventory ("numbed",1)
		LBLZ I 1 
		LBLZ I 4 a_pain
		goto spawn
	Death:
		TNT1 A 0
		LBLZ J 4 A_playerscream
		LBLZ K 4 
		LBLZ L 4 A_NoBlocking
		LBLZ M 4
		LBLZ N -1
		Stop	
	XDeath:
		TNT1 A 0
		TNT1 A 0
		LBLZ J 4 A_playerscream
		LBLZ K 4 
		LBLZ L 4 A_NoBlocking
		LBLZ M 4
		LBLZ N -1
		Stop
	}
}


Actor DoomSlayer : PlayerPawn
{
	Player.DisplayName "Doomslayer"
	PainChance 256
	mass 1000
	painchance "thiefknife", 256
	painchance "thrownthiefknife", 256
	painchance "POWdrainer", 256
	painchance "icearrow", 256
	+notimefreeze
	+dontblast 
	+thruspecies
	+DONTGIB
	Species "Friendly"
	player.portrait "SLYRPIC"
	Speed 1.3
	damagefactor "macebomb", 0.20
    DamageFactor "Barrel", 0.10
	Player.StartItem "rend"
	player.startitem "IamDoomSlayer"
	Player.WeaponSlot 1, Sawglove
	Player.WeaponSlot 2, Rend 
	Player.WeaponSlot 3, morningstar, thunderbuss
	Player.WeaponSlot 4, HydraRepeater
	Player.WeaponSlot 5, WrathCaster
	Player.WeaponSlot 6, InfernoRifle
	Player.WeaponSlot 7, berserkfists
	States
	{
	Spawn:
		SLYR A 0
		"####" A 1
	Weaponskincheck:
		"####" A 0
		"####" A 0 a_jumpifinventory ("UsingRend",1,"SwordSkin")
		"####" A 0 a_jumpifinventory ("UsingSlayerGun",1,"GunSkin")
		"####" A 0 a_jumpifinventory ("UsingSlayerFists",1,"FistsSkin")
		Goto Spawn+1
	SwordSkin:
		SLYR A 0
		goto spawn+1
	GunSkin:
		SLYG A 0
		goto spawn+1
	FistsSkin:
		SLYF A 0
		goto spawn+1
	See:
		"####" AAAABBBBCCCCDDDD 1
		goto weaponskincheck
	Missile:
		SLYR A 0
		SLYR A 0
		"####" A 0 a_jumpifinventory ("UsingSlayerPistol",1,"PistolAttack")
		"####" A 0 a_jumpifinventory ("UsingSlayerGun",1,"GunAttack")
		"####" A 0 a_jumpifinventory ("UsingSlayerFists",1,"FistAttack")
	RendAttack:
		SLYR A 0
		SLYR A 1 a_jumpifinventory ("UsingSlayerPistol",1,"PistolAttack")
		SLYR A 0 a_jumpifinventory ("UsingSlayerPistol",1,"PistolAttack")
		SLYR E 5 
		SLYR F 3
		goto spawn+1
	RendSwipes:
		SLYR E 7 
		SLYR F 5
		SLYR E 7 
		SLYR F 4
		goto spawn+1	
	GunAttack:
		SLYG A 0
		SLYG A 2 a_jumpifinventory ("UsingRend",1,"RendSwipes")
		SLYG A 0 a_jumpifinventory ("UsingRend",1,"RendSwipes")
		SLYG E 2
		SLYG F 5 Bright
		SLYG E 6
		goto spawn+1
	FistAttack:
		SLYF E 7
		goto spawn+1
	PistolAttack:
		SLYP A 3
		SLYP B 5 bright
		SLYP A 4
		SLYR A 0
		goto spawn+1
	Pain:
		"####" G 4 
		"####" G 4 A_Pain
		Goto Spawn+1
	Pain.thiefknife:
		"####" G 0
		"####" G 0
		"####" G 0 a_takeinventory ("arcaneforce", random(1,5))
		"####" G 0 a_playsound ("hero/drained",0)
		"####" G 0 a_takeinventory ("spikes", random(3,8))
		"####" G 0 a_takeinventory ("maceorbs", random(4,10))
		"####" G 0 a_takeinventory ("firegems", random(3,9))
		"####" G 0 a_takeinventory ("wrathrockets", random(2,4))
		"####" G 1 
		"####" G 4 a_pain
		goto spawn+1
	pain.thrownthiefknife:
		"####" G 0
		"####" G 0 a_playsound ("hero/drained",0)
		"####" G 0 a_takeinventory ("spikes", random(2,4))
		"####" G 0 a_takeinventory ("maceorbs", random(3,6))
		"####" G 0 a_takeinventory ("firegems", random(2,5))
		"####" G 0 a_takeinventory ("wrathrockets", random(1,3))
		"####" G 1 
		"####" G 4 a_pain
		goto spawn+1
	pain.icearrow:
		"####" G 0
		"####" G 0
		"####" G 0 a_setblend ("000 140 225",0.25,110,0)
		"####" G 0 a_playsound ("hero/frozen",0)
		"####" G 0 a_giveinventory ("numbed",1)
		"####" G 1 
		"####" G 4 a_pain
		goto spawn+1
	Death:
		SLYR H 6
		SLYR I 10 A_PlayerScream
		SLYR J 7 A_NoBlocking
		SLYR KL 6
		SLYR M 7
		SLYR N -1
		Stop
	}
}

