ACTOR LoWang : PlayerPawn Replaces DoomPlayer
{
	Speed 1
	Health 100
	Radius 16
	Height 56
	Mass 100
	PainChance 255
	Player.ViewHeight 52
	Player.AttackZOffset 20
	DamageFactor "CloneMissileDamage", 0.0
	Damagefactor "nodamagepuf",0.0
	Damagefactor "FLAMEBALL",0.0
	Damagefactor "FlashBombDamage", 0.0
	DamageFactor "BigBallExplode", 0.0
	PainChance "GrenadeMonster", 255
	PainChance "GLauncherGrenade", 255
	PainChance "RLauncherRocket", 255
	PainChance "RailGunPlasmaDamage", 255
	PainChance "SmokeProjectile", 255
	PainChance "CaltropsDamage", 255
	PainChance "BigBallDamage", 255
	Damagefactor "CaltropsMonster",0.3
	Damagefactor "SmokeProjectile",0.6
	Damagefactor "FlameBallFire", 0.0
	DamageFactor "DemonicFlashDamage", 1.0
	Scale 0.48
	Player.JumpZ 12
	Player.DamageScreenColor "Red", 0.0, "GasBombDamage"
	player.soundclass "LWang"
	Player.DisplayName "LWang"
	Player.CrouchSprite "LWCR"
	Player.StartItem "Sword"
	Player.StartItem "Fists"
	Player.StartItem "Shurikens"
	Player.StartItem "ShurikensAmmo", 30
	Player.WeaponSlot 1, Fists, Sword
	Player.WeaponSlot 2, Shurikens
	Player.WeaponSlot 3, RiotGun
	Player.WeaponSlot 4, MicroUzi
	Player.WeaponSlot 5, RLauncher
	Player.WeaponSlot 6, GLauncher
	Player.WeaponSlot 7, StickyBomb
	Player.WeaponSlot 8, RailGunSW
	Player.WeaponSlot 9, HEART, NULLWEAPON
	-THRUSPECIES
	Species "SWPorter"
    States
	{
	Spawn:
		TNT1 A 0 Thing_ChangeTID(0,4)
		LWRN A 1
		Loop
	TranslucentOn:
	     TNT1 A 0 A_SetTranslucent(1.0, 1)
		 Goto Spawn
	TranslucentOff:
	     TNT1 A 0 A_SetTranslucent(1.0, 0)
	     Goto Spawn
	See:
		LWRN AAAAABBBBBCCCCCDDDDD 1
		Goto Spawn
	EnableSpecies:
	    TNT1 A 0 A_ChangeFlag("THRUSPECIES", True)
		Goto Spawn
	DisableSpecies:
	    TNT1 A 0 A_ChangeFlag("THRUSPECIES", False)
		Goto Spawn		
	Missile:
	    LWRN E 0 A_JumpIfInventory("SwordSelect",1,"MissileSword")
		LWRN E 0 A_JumpIfInventory("FistsSelect",1,"MissileFists")
		LWRN E 0 A_JumpIfInventory("ShurikensSelect",1,"MissileFists")
		LWRN E 0 A_JumpIfInventory("StickyBombSelect",1,"MissileFists")
		LWRN F 6 
		Goto Spawn
	MissileSword:
		LWKN ABC 3
		Goto Spawn
	MissileFists:
		LWPN AB 3
		Goto Spawn
	//Melee:
		//LWRN E 6 BRIGHT
		//Goto Spawn
	Pain:
		LWRN G 4 
		LWRN G 4 A_Pain
		Goto Spawn
	Pain.GasBombDamage:
	    TNT1 A 0 A_JumpIfInventory("GasBombPainTime", 1, "Noop")
		TNT1 A 0 A_GiveInventory("GasBombPainTime", 10)
		LWRN G 0 A_PlaySound("SWSMPAIN", 6)
		LWRN G 0 A_SetBlend("Green", 1.0, 70)
		LWRN G 3 
		Goto Spawn
		Noop:
		LWRN G 3 
		TNT1 A 0 A_TakeInventory("GasBombPainTime", 1)
		Goto Spawn
	Pain.CaltropsDamage:
	    LWRN G 4 A_PlaySound("JGB106")
		LWRN G 4 
		Goto Spawn
	Pain.DemonicFlashDamage:
	    LWRN G 4
		TNT1 A 0 A_SetBlend("99 99 99", 1.0, 75)
		LWRN G 4 A_Pain
		Goto Spawn
	Pain.MonsterExplode:
	Pain.BigBallDamage:	
	Pain.GrenadeMonster:	
	Pain.RLauncherRocket:
	Pain.GLauncherGrenade:
	    TNT1 A 0 A_Jump(64, "Says")
		LWRN G 4 
		LWRN G 4 A_Pain
		Goto Spawn
		Says:
	    LWRN G 4 A_PlaySound("LoWang/ExplodePain")
		LWRN G 4 
		Goto Spawn
    Death:
	    TNT1 A 0 A_TakeInventory("GasBombPainTime", 99)
		TNT1 A 0 A_TakeInventory("NightVisionSWCheck", 1)
		TNT1 A 0 A_TakeInventory("SmokeBombCheck", 1)
		TNT1 A 0 A_TakeInventory("SmokeBomb", 999)
        LWRN H 3
        LWRN I 3 A_Scream
        LWRN J 3 A_NoBlocking
        LWRN KLMNO 3
        LWRN P 0 A_PlaySound("BODY9")
        LWRN P -1
        Stop
	Death.GrenadeMonster:
	Death.GLauncherGrenade:
	Death.RLauncherRocket:
	Death.RailGunPlasmaDamage:
	XDeath:
	    TNT1 A 0 A_TakeInventory("GasBombPainTime", 99)
		TNT1 A 0 A_TakeInventory("NightVisionSWCheck", 1)
		TNT1 A 0 A_TakeInventory("SmokeBombCheck", 1)
		TNT1 A 0 A_TakeInventory("SmokeBomb", 999)
		TNT1 A 0 A_SkullPop("LoWangHead")
		TNT1 A 0 A_SpawnItemEx("LoWangLeg",random(-30,30), random(-30, 30), 60)
		TNT1 A 0 A_SpawnItemEx("LoWangLeg",random(-30,30), random(-30, 30), 60)
		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)
		TNT1 AAAAAA 0 A_CustomMissile ("BloodGib", 30, 0, Random(0,360), 2, 30)
		TNT1 A 4 A_XScream
	    TNT1 A 4 A_NoBlocking
		TNT1 A -1
		Stop
		}
}	


Actor GasBombPainTime : Inventory { Inventory.MaxAmount 10 } //Pain Imitation	

Actor Blending : CustomInventory
{
    -Inventory.InVbar
    -INVENTORY.AUTOACTIVATE
     States
         {
		 Pickup:
		 TNT1 A 0 A_SetBlend("99 99 99", 1.0, 75)
		 Stop
		 }
}

//--------------Taunt System---------------//

Actor LoWangTalkTimer : PowerDamage
{
	powerup.duration 115
	damagefactor "normal", 1.0
}

Actor LoWangSpecialTalk : PowerDamage
{
	powerup.duration 125
	damagefactor "normal", 1.0
}
	
Actor StandartTaunt: CustomInventory
{
    Inventory.MaxAmount 0
    +AUTOACTIVATE
    
    States
    {
       Spawn:
         TNT1 A 0
         stop

       UseStop:
         TNT1 A 0
         stop
    }
}	
		 
Actor SaySticky : StandartTaunt
{ 
  States
  {
  Pickup:
        TNT1 A 0 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
        TNT1 A 0 A_PlaySound("SaySticky", 7)
        TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
} 

Actor LoWangPunchTaunt : StandartTaunt
{ 
  States
  {
  Pickup:
        TNT1 A 0 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
		TNT1 A 0 A_JumpIfInventory("LoWangSpecialTalk", 1, "UseStop")
        TNT1 A 0 A_PlaySound("LoWang/Punch", 7)
        TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
} 


Actor LoWangGibsTaunt : StandartTaunt
{ 
  States
  {
  Pickup:
        TNT1 A 0 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
        TNT1 A 0 A_PlaySound("LoWang/GibsSay", 7)
        TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
} 

Actor LoWangFists : StandartTaunt
{ 
  States
  {
  Pickup:
        TNT1 A 3 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
        TNT1 A 0 A_PlaySound("LoWang/FistsDamage", 7)
        TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
} 

Actor LoWangSplit : StandartTaunt
{ 
  States
  {
  Pickup:
        TNT1 A 3 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
        TNT1 A 0 A_PlaySound("LoWang/Split", 7)
        TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
} 

Actor RiotGunPickupTaunt : StandartTaunt
{ 
  States
  {
  Pickup:
        TNT1 A 0 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
        TNT1 A 0 A_PlaySound("LoWang/RiotPickup", 7)
        TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
} 


Actor MicroUziPickupTaunt : StandartTaunt
{ 
  States
  {
  Pickup:
        TNT1 A 0 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
        TNT1 A 0 A_PlaySound("LoWang/UsiPickup", 7)
        TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
} 

Actor RLauncherPickupTaunt : StandartTaunt
{ 
  States
  {
  Pickup:
       TNT1 A 0 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
       TNT1 A 0 A_PlaySound("LoWang/NuklePickup", 7)
       TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
}

Actor GLauncherPickupTaunt : StandartTaunt
{ 
  States
  {
  Pickup:
       TNT1 A 0 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
       TNT1 A 0 A_PlaySound("LoWang/NuklePickup", 7)
       TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
}

Actor StickyBombsPickupTaunt : StandartTaunt
{ 
  States
  {
  Pickup:
       TNT1 A 0 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
		TNT1 A 0 A_PlaySound("LoWang/OtherPickup", 7)
       TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
}

Actor RailGunPickupTaunt : StandartTaunt
{ 
  States
  {
  Pickup:
       TNT1 A 0 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
       TNT1 A 0 A_PlaySound("LoWang/NuklePickup", 7)
       TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
}

Actor GuardianHeadPickupTaunt : StandartTaunt
{ 
  States
  {
  Pickup:
       TNT1 A 0 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
		TNT1 A 0 A_PlaySound("LoWang/OtherPickup", 7)
       TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
}

Actor HeartPickupTaunt : StandartTaunt
{ 
  States
  {
  Pickup:
       TNT1 A 0 A_JumpIfInventory("LoWangTalkTimer", 1, "UseStop")
		TNT1 A 0 A_PlaySound("LoWang/OtherPickup", 7)
       TNT1 A 0 A_GiveInventory("LoWangTalkTimer", 1)
        stop
    }
}