//I'm Using translation to differentiate monsters.
Actor WanderTimer : inventory { inventory.maxamount 30 }

 

//---This monster is the basis for the rest of the monsters of the same type--//
Actor Zilla
{
	Radius 20
	Height 56
	Mass 500
	Speed 3
	Scale 0.7
	PainChance 48
	DamageFactor "SwordDamage", 1.5
	PainChance "FistsDamage", 255
	PainChance "SwordDamage", 255
	PainChance "GrenadeMonster", 255
	PainChance "GLauncherGrenade", 255
	PainChance "RLauncherRocket", 255
	PainChance "RailGunPlasmaDamage", 255
	PainChance "FlashBombDamage", 255
	Monster
	SeeSound "ZILLALRT"
	ActiveSound "ZILLAMB"
	PainSound "ZILLPAIN"
	BloodType "SpadowWarriorBlood"
	+NEVERFAST 
	+FLOORCLIP
	+NOTARGET
	+THRUSPECIES
	Species "DropBloodSpecies"
    States
	{
	Spawn:
	    ZILL A 15 A_Look
		Loop
	See:
	    ZILL A 0 A_JumpIfInventory("WanderTimer", 1, "Wander")
		ZILL AAAAA 1 A_Wander
		ZILL BBBBB 1 A_Chase
		ZILL CCCCC 1 A_Wander
		ZILL DDDDD 1 A_Chase
		Loop
	Wander:
	    ZILL AAAAABBBBBCCCCCDDDDD 1 A_Wander
		TNT1 A 0 A_TakeInventory("WanderTimer", 1)
		Goto See
		
//-------------------------Random Pain----------------------------------------//		
	Pain:
		ZILL N 5 A_FaceTarget
		TNT1 A 0 A_Pain
		TNT1 A 0 A_Jump(48, "BrockenNeck")
		Goto See
	Pain.FlashBombDamage:
	    TNT1 A 0 A_GiveInventory("WanderTimer", 30)
	    ZILL N 5 A_Pain
		Goto Wander	
//----------------------------------------------------------------------------//
      BrockenNeck:
	   TNT1 A 0 A_SetTranslucent(1.0, 0)
	   TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
	   ZILL V 1 A_FaceTarget
	   TNT1 A 0 A_PlaySound("NINBROCK")
	   ZILL VVVWWWXXX 4 A_CustomMissile ("BloodGib", 38, 0, Random(-30, 30), 2, 30)
	   ZILL WVWXWVWXWVWXWV 9
	   TNT1 A 0 A_Die
	   Stop   
    Death.FistsDamage:
	    TNT1 A 0 A_GiveToTarget("LoWangFists", 1)	   
	Death:
	    TNT1 A 0 A_PlaySound("ZILLSCRM")
	    TNT1 AAAAAAA 0 A_CustomMissile ("BloodGib", 38, -5, Random(0,360), 2, 15)
	    ZILL OPQRS 3
		ZILL TU 3
		TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
	    ZILL U 1 A_SpawnItemEx("ZillaNormalDeath", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION|SXF_TRANSFERTRANSLATION)
	    Stop
	Death.SwordDamage:
	    TNT1 A 0 A_SetTranslucent(1.0, 0)
		TNT1 A 0 A_Stop
		TNT1 A 0 A_GiveToTarget("LoWangSplit", 1)
		ZILD A 1 A_FaceTarget
	    ZILD A 0 A_PlaySound("NINCUT3", 5)
		ZILD F 0 A_PlaySound("ZILLSCRM")
		ZILD AAAAAAAA 4 A_CustomMissile ("BloodGib", 38, -5, Random(0,360), 2, 15)
		ZILD BB 3 A_CustomMissile ("BloodGib", 38, -5, Random(0,360), 2, 15)
		ZILD B 1 A_CustomMissile ("BloodGib", 38, -5, Random(0,360), 2, 15)
		ZILD CC 3 A_CustomMissile ("BloodGib", 38, -5, Random(0,360), 2, 15) 
		ZILD DD 2 A_CustomMissile ("BloodGib", 38, -5, Random(0,360), 2, 15)  
		ZILD D 1 A_CustomMissile ("BloodGib", 38, -5, Random(0,360), 2, 15)
		ZILD EEE 2 A_CustomMissile ("BloodGib", 34, -4, Random(0,360), 2, 35)
		ZILD E 1 A_CustomMissile ("BloodGib", 38, -5, Random(0,360), 2, 15)
		ZILD FF 2 A_CustomMissile ("BloodGib", 32, -3, Random(0,360), 2, 40)  
        ZILD F 1 A_CustomMissile ("BloodGib", 38, -5, Random(0,360), 2, 15)
		ZILD G 4 
		ZILD H 5
		ZILD I 5 A_Scream
		ZILD J 1 A_NoBlocking
        TNT1 A 0 A_SpawnItemEx("ZillaSwordDeath", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION|SXF_TRANSFERTRANSLATION)
		Stop	   

//-------------------------DamageTypes----------------------------------------//		
	Death.GrenadeMonster:
	Death.GLauncherGrenade:
	Death.RLauncherRocket:
	Death.RailGunPlasmaDamage:
	   TNT1 A 0 A_GiveToTarget("LoWangGibsTaunt", 1)
	Death.MonsterExplode:
	XDeath:
	    TNT1 A 0 A_NoBlocking
		TNT1 AAAAAAAAA 0 A_CustomMissile ("BloodGib", 30, 0, Random(0,360), 2, 30)
		TNT1 A 0 A_SpawnDebris("HeartGib", False, 6.0, 1.0)
		TNT1 A 0 A_SpawnDebris("LiverGib", False, 6.0, 1.0)
		TNT1 A 0 A_SpawnDebris("SkullGib", False, 6.0, 1.0)
		TNT1 A 0 A_SpawnDebris("Skull2Gib", False, 6.0, 1.0)
		TNT1 A 0 A_SpawnDebris("HandGib", False, 6.0, 1.0)
		TNT1 A 0 A_SpawnDebris("HandGib", False, 6.0, 1.0)
		//TNT1 A 0 A_SpawnDebris("BloodGib")
		//TNT1 A 0 A_SpawnItemEx("HeartGib",random(-30,30), random(-30, 30), 60)
		//TNT1 A 0 A_SpawnItemEx("LiverGib",random(-30,30), random(-30, 30), 60)
		//TNT1 A 0 A_SpawnItemEx("SkullGib",random(-30,30), random(-30, 30), 60)
		//TNT1 A 0 A_SpawnItemEx("Skull2Gib",random(-30,30), random(-30, 30), 60)
		//TNT1 A 0 A_SpawnItemEx("HandGib",random(-30,0), random(-30, 30), 60)
		//TNT1 A 0 A_SpawnItemEx("HandGib",random(0,30), random(-30, 30), 60)
		
		Stop
//----------------------------------------------------------------------------//		
	}
}

//---------And this is the basis of different variations of the deaths.-------//
ACTOR ZillaNormalDeath : StandartDeath
{
    Scale 0.7
    States
	{
	Spawn:
	    ZILL U -1
		Stop
    }
}

ACTOR ZillaSwordDeath : StandartDeath
{
    Scale 0.7
	States
	{
	Spawn:
	    ZILD J -1
		Stop
    }
}

//--------ZillaBrown. Armed with Usi Sub-MachineGun and shirukens-------------//
Actor ZillaBrown : Zilla 20035
{
    //$Category Shadow Warrior Monsters
    Health 60
	AttackSound "NINSHOOT"
    DropItem "UziAmmo" 50
    DropItem "MicroUziPickup" 50
    DropItem "ShurikensAmmo" 50
	Translation "112:127 = [252, 236, 220]:[64,24,12]"
    States
	{
	Missile:
	    ZILL A 1 A_JumpIfInTargetInventory("SmokeBombCheck", 1, "See")
	    ZILL A 1 A_FaceTarget
	    ZILL A 1 A_Jump(256, "BulletAttack","BulletAttack","ShirukenAttack","BulletAttack")
	    Goto See
	BulletAttack:
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,1,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,1,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,1,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		TNT1 A 0 A_Jump(96, "BulletAttack")
		Goto See		
	ShirukenAttack:
	    ZILL K 16 A_FaceTarget
		ZILL L 2 A_FaceTarget
		ZILL M 0 A_Playsound("PUNCH")
		ZILL M 0 A_CustomMissile("NinjaShuriken")
		ZILL M 8
	    Goto See
//-------------------Random Death Animations----------------------------------//		

//----------------------------------------------------------------------------//
		}
}

//---------------Zilla Orange. Armed with M60 and shirukens-------------------//
ACTOR ZillaOrange : Zilla 20036
{
    //$Category Shadow Warrior Monsters
	Health 60
	AttackSound "NINJAM60"
	DropItem "UziAmmo" 50
    DropItem "MicroUziPickup" 50
    DropItem "ShurikensAmmo" 50
	Translation "112:127 = [227, 211, 89]:[64,32,8]"
	States
	{
	Missile:
	    ZILL A 1 A_JumpIfInTargetInventory("SmokeBombCheck", 1, "See")
	    ZILL A 1 A_FaceTarget
	    ZILL A 1 A_Jump(256, "BulletAttack","BulletAttack","ShirukenAttack","BulletAttack")
	    Goto See
	BulletAttack:
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,2,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,2,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,2,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		TNT1 A 0 A_Jump(96, "BulletAttack")
		Goto See		
	ShirukenAttack:
	    ZILL K 16 A_FaceTarget
		ZILL L 2 A_FaceTarget
		ZILL M 0 A_Playsound("PUNCH")
		ZILL M 0 A_CustomMissile("NinjaShuriken")
		ZILL M 8
	    Goto See
//----------------------------------------------------------------------------//			
	}
}


//--------------Zilla Red. Armed with M60 and RocketLauncher------------------//
ACTOR ZillaRed : Zilla 20037
{
    //$Category Shadow Warrior Monsters
	Health 120
	DropItem "ROCKETLAMMO" 64
	AttackSound "NINJAM60"
	Translation "112:127 = [204, 24, 24]:[48,0,0]"
	States
	{
	Missile:
	    ZILL A 1 A_JumpIfInTargetInventory("SmokeBombCheck", 1, "See")
	    ZILL A 1 A_FaceTarget
	    ZILL A 1 A_Jump(256, "BulletAttack","BulletAttack","RocketAttack","BulletAttack")
	    Goto See
	BulletAttack:
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,2,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,2,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,2,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		TNT1 A 0 A_Jump(96, "BulletAttack") 
		Goto See
	RocketAttack:
	    ZILL A 16 A_FaceTarget
		ZILL A 0 A_playsound("ROKFIRE")
		ZILL A 1 Bright A_CustomMissile("ZillaRocket")
	    Goto See		
	}
}


ACTOR ZillaRocket
{
    +FULLVOLDEATH
	Radius 9
	Height 6
	Speed 20
	Damage 30
	Projectile
	DeathSound "EXPL2"
	DamageType "MonsterExlode"
	SCALE 1.2
	States
	{
	Spawn:
		ROK2 A 1 Bright A_CustomMissile("GrenadeSmoke",0,0,0)
		Loop
	Death:
		ROK2 A 1 
		ROK2 A 0 A_Explode(185,200)
		ROK2 A 0 A_playsound("EXPL2")
		ROK2 A 0 A_SpawnItemEx("RocketExplode")//, 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
		TNT1 A 10 Radius_Quake(5,12,0,25,0)
		Stop
	}
}

//--------------Zilla Gray. Armed with M60 and GrenadeLauncher----------------//
ACTOR ZillaGray : Zilla 20038
{
    //$Category Shadow Warrior Monsters
	Health 120
	DropItem "GLauncherAmmo" 64
	AttackSound "NINJAM60"
	Translation "112:127 = [252, 252, 252]:[28,28,28]"
	States
	{
	Missile:
	    ZILL A 1 A_JumpIfInTargetInventory("SmokeBombCheck", 1, "See")
	    ZILL A 1 A_FaceTarget
	    ZILL A 1 A_Jump(256, "BulletAttack", "GrenadeAttack", "BulletAttack", "BulletAttack")
	    Goto See
	BulletAttack:
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,2,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,2,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		ZILL I 3 bright A_FaceTarget
		ZILL J 3 bright A_CustomBulletAttack(8,8,1,2,"SWPuffOne")
		ZILL J 0 A_SpawnItemEx("MicroUziCasingSpawner",0,0,32)
		TNT1 A 0 A_Jump(96, "BulletAttack")
		Goto See
	GrenadeAttack:
	    ZILL A 16 A_FaceTarget
		ZILL A 0 A_playsound("GRLFIRE")
		ZILL A 1 Bright A_CustomMissile("ZillaGrenade")
	    Goto See			
	}
}

ACTOR ZillaGrenade
{
	Radius 2
	height 2
	Speed 20
	Projectile
	Gravity 0.25
	DeathSound "EXPL1"
	SeeSound "GRLFIREB"
	Obituary "$OB_GRENADE"
	DamageType "MonsterExplode"
	-NOGRAVITY
	+RANDOMIZE
	+DEHEXPLOSION
	+DOOMBOUNCE
    States
	{
	Spawn:
		GRE1 A 1 Bright A_CustomMissile("GrenadeSmoke",0,0,0) 
		Loop
	Death:
        GRE1 A 1
        GRE1 A 0 A_Explode(200,300)
		GRE1 A 0 A_SpawnItemEx("GrenadeLittleExplode", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
	    GRE1 A 0 A_SpawnItemEx("GrenadeBigExplode", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
		TNT1 A 10 Radius_Quake(5,35,0,25,0)
		Stop
	XDeath:
        GRE1 A 1
        GRE1 A 0 A_Explode(200,300)
		GRE1 A 0 A_SpawnItemEx("GrenadeLittleExplode", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
	    GRE1 A 0 A_SpawnItemEx("GrenadeBigExplode", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
		TNT1 A 10 Radius_Quake(5,35,0,25,0)
		Stop
	}
}