Actor Teleportertest : PlayerPawn
{
	Health 200
	Mass 500
	Scale 0.9
	BloodType "jitterchip"
	Species "Ghoul"
	Player.ForwardMove 1.2
	Player.SideMove 1.1
	Player.MaxHealth 200
	maxstepheight 180
	Player.DisplayName "Teleportertest"
	Player.StartItem "IsGhoul", 1
	Player.StartItem "TeleotherVision"
	Player.StartItem "TeleotherPrimaryAmmo", 100
	Player.StartItem "TeleotherSecondaryAmmo", 100
	Player.StartItem "SpecialAbility", 1
	Player.SoundClass "Teleportertest"
	Damagefactor "Divine", 1.1
	Damagefactor "ThrottlePews", 0.7
	Damagefactor "Bluefire", 0.0
	Damagefactor "fire2", 0.8
	Damagefactor "normal", 0.7
	Damagefactor "Grenade", 1.2
	DamageFactor "CalebDynamite", 1.2
	Damagefactor "AntiAirBolt", 0.7
	Damagefactor "ice2", 1.0
	Damagefactor "Altice2", 1.0
	Damagefactor "Ice", 1.0
	Damagefactor "minion", 0.0
	Damagefactor "ZombieIce", 0.0
    Damagefactor "ZombiePoison", 0.0
	Damagefactor "ZombieSlaps", 0.0
	player.jumpz 0
	LimitedToTeam 1
	+NOSKIN
	+FLOORHUGGER
	+NOICEDEATH
	+QUICKTORETALIATE
	States
	{
	Spawn:
		SENT D 0 A_Changeflag("shootable",true)
		SENT D 0 A_JumpIfInventory("AriaInfluence",10,"Dancing")	
		SENT D 0 A_JumpIfInventory("GhoulDisableTrigger",15,"DisableTheGhoul")
		SENT D 1 Setplayerproperty(0,0,4)
		SENT D 0
		Goto Spawn+1
	See:
		SENT D 0 A_Changeflag("shootable",true)
		SENT D 0 A_JumpIfInventory("AriaInfluence",10,"Dancing")
		SENT D 0 A_JumpIfInventory("GhoulDisableTrigger",15,"DisableTheGhoul")
		SENT D 2
		Loop
	Dancing:
		SENT D 0 A_Changeflag("shootable",true)
		SENT D 0 A_TakeInventory("GhoulDisableTrigger",15)
		SENT D 0 A_TakeInventory("AriaInfluence",10)
		SENT D 0 Setplayerproperty(0,1,4)
		SENT D 0 A_TakeInventory("GhoulDisableTrigger",15)
		SENT D 0 A_TakeInventory("AriaInfluence",10)
		SENT DDDDDDDDDDDDDDD 1
		SENT D 0 ThrustThingZ(0,20,0,0)
		SENT D 0 ThrustThing(angle*random(0,224), 10, 0, 0)
		SENT D 0 A_TakeInventory("GhoulDisableTrigger",15)
		SENT D 0 A_TakeInventory("AriaInfluence",10)
		SENT DDDDDDDDDDDDDDD 1
		SENT D 0 ThrustThingZ(0,20,0,0)
		SENT D 0 ThrustThing(angle*random(0,224), 10, 0, 0)
		SENT D 0 A_TakeInventory("GhoulDisableTrigger",15)
		SENT D 0 A_TakeInventory("AriaInfluence",10)
		SENT DDDDDDDDDDDDDDD 1
		SENT D 0 ThrustThingZ(0,20,0,0)
		SENT D 0 ThrustThing(angle*random(0,224), 10, 0, 0)
		SENT D 0 A_TakeInventory("GhoulDisableTrigger",15)
		SENT D 0 A_TakeInventory("AriaInfluence",10)
		SENT DDDDDDDDDDDDDDD 1
		SENT D 0 ThrustThingZ(0,20,0,0)
		SENT D 0 ThrustThing(angle*random(0,224), 10, 0, 0)
		SENT D 0 A_TakeInventory("GhoulDisableTrigger",15)
		SENT D 0 A_TakeInventory("AriaInfluence",10)
		SENT DDDDDDDDDDDDDDD 1
		SENT D 0 ThrustThingZ(0,20,0,0)
		SENT D 0 ThrustThing(angle*random(0,224), 10, 0, 0)
		SENT D 0 A_TakeInventory("GhoulDisableTrigger",15)
		SENT D 0 A_TakeInventory("AriaInfluence",10)
		SENT DDDDDDDDDDDDDDD 1
		SENT D 0 ThrustThingZ(0,20,0,0)
		SENT D 0 ThrustThing(angle*random(0,224), 10, 0, 0)
		SENT D 1 Setplayerproperty(0,0,4)
		SENT D 0 A_TakeInventory("GhoulDisableTrigger",15)
		SENT D 0 A_TakeInventory("AriaInfluence",10)
		Goto Spawn
	DisableTheGhoul:
		SENT D 0 A_Changeflag("shootable",false)
		SENT D 0 A_Changeflag("shootable",false)
		SENT D 0 Setplayerproperty(0,1,4)
		SENT D 0 A_TakeInventory("GhoulDisableTrigger",15)
		SENT D 90 Bright
		SENT D 0 A_TakeInventory("GhoulDisableTrigger",15)
		SENT D 0 A_Changeflag("shootable",true)
		SENT D 0 A_Changeflag("shootable",true)
		SENT D 0 Setplayerproperty(0,0,4)
		SENT D 0 Setplayerproperty(0,0,4)
		SENT D 0 A_TakeInventory("GhoulDisableTrigger",15)
		Goto Spawn
	Missile:
		SENT D 0 A_ChangeFlag("SHOOTABLE", TRUE)
		SENT D 0 A_JumpIfInventory("AriaInfluence",10,"Dancing")
		SENT D 0 A_JumpIfInventory("GhoulDisableTrigger",15,"DisableTheGhoul")
		SENT EF 2 
		Goto Spawn
	Pain:
		SENT D 0 Setplayerproperty(0,0,4)
        SENT D 1
		SENT D 0 Setplayerproperty(0,0,4)
		SENT D 0 A_Pain
        Goto See
	Pain.Vivi:
	SENT D 0 A_SetPitch(pitch - 3.0)
	SENT D 0 A_SetAngle(angle + (random(-50,50)/10))
	Goto Pain
	Pain.ViviMine:
	SENT D 0 ThrustThingZ(0,70,0,0)
	Goto Pain
	Death.LoWangVampiric:
	TNT1 A 0 A_GiveToTarget("SWLoWangBloody",1)
	TNT1 A 0 A_JumpIfInventory("BloodCurseItem",1,"Death",AAPTR_TARGET)
	TNT1 A 0 A_GiveToTarget("Health",20)
	Goto Death
	Death.SkarletPistolDrain:
	TNT1 A 0 A_JumpIfInventory("BloodCurseItem",1,"Death",AAPTR_TARGET)
	TNT1 A 0 A_GiveToTarget("Health",50)
	Goto Death
	Death.SkarletVampiric:
	TNT1 A 0 A_JumpIfInventory("BloodCurseItem",1,"Death",AAPTR_TARGET)
	TNT1 A 0 A_GiveToTarget("Health",60)
	Goto Death
	Death.DoomChainSaw:
	TNT1 A 0 A_GiveToTarget("cell",50)
	TNT1 A 0 A_GiveToTarget("RocketAmmo",5)
	TNT1 A 0 A_GiveToTarget("clip1",50)
	TNT1 A 0 A_GiveToTarget("Shell",10)
	Goto Death
	Death:
	DeathAnim:
	TNT1 A 0 A_StopSound(7)
	SENT D 0 A_NoBlocking
	SENT D 0 ACS_ExecuteAlways(467,0)
	SENT D 0 A_ChangeFlag ("TELESTOMP", 0)
	SENT D 0 A_StopSoundEx("Voice")
	SENT D 0 A_TakeInventory("KilledCount",999)
	SENT D 0 A_GiveToTarget("KilledMe",1)
	SENT D 0 A_GiveToTarget("KilledJitter",1)
	SENT D 1 A_NoBlocking
	SENT D 0 A_Fall
	SENT GGGHHHIIIJJJKKK 1 A_CustomMissile("ArchvileFirex2", 2, 0, random(0,360), 2,0)
	SENT KKKKK 1 A_CustomMissile("ArchvileFirex2", 0, 0, random(0,360), 2,0)
	TNT1 A -1
	Stop
	Death.CarolineDamage:
	TNT1 A 0 A_StopSound(7)
	TNT1 A 0 A_SpawnItemEx("AdditionalGhoulDeathVFX")
	TNT1 A 0 A_TakeInventory("KilledCount",999)
	TNT1 A 0 A_GiveToTarget("KilledMe",1)
	TNT1 A 0 ACS_ExecuteAlways(467,0)
	TNT1 A 1
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 A_Gravity
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,0,2)
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,30,2)
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,60,2)
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,90,2)
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,120,2)
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,150,2)
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,180,2)
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,-30,2)
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,-60,2)
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,-90,2)
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,-120,2)
	TNT1 A 0 A_CustomMissile("ArchvileFirex",0,0,-150,2)
	NULL A 0 A_SpawnItemEx("CarolineHeart",0,0,32,random(2,3),momy,random(8,12),random(-180,180))
	NULL A 1 A_SpawnItemEx("SoulGIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	NULL A 1 A_SpawnItemEx("JitterGIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	NULL A -1
	Stop
	Death.MarineShotgun:
	SENT D 0 A_GiveToTarget("grenadeammo",1)
	SENT D 0 A_GiveToTarget("shell",3)
	SENT D 0 A_GiveToTarget("clip1",20)
	Goto DeathAnim
	Death.Marinemachinegun:
	SENT D 0 A_GiveToTarget("grenadeammo",1)
	SENT D 0 A_GiveToTarget("shell",3)
	SENT D 0 A_GiveToTarget("clip1",20)
	Goto Deathanim
	Death.Marinepistol:
	SENT D 0 A_GiveToTarget("grenadeammo",1)
	SENT D 0 A_GiveToTarget("shell",3)
	SENT D 0 A_GiveToTarget("clip1",20)
	Goto Deathanim
	Death.Grenade:
		SENT D 0 A_GiveToTarget("KilledG",1)
		Goto DeathAnim
	Death.CrapPlasma:
		SENT D 0 A_GiveToTarget("Unlock9",1)
		Goto DeathAnim
	Death.Ice2:
		SENT D 0 A_GiveToTarget("KilledIce2",1)
		Goto DeathAnim
	Death.Fire2:
		SENT D 0 A_GiveToTarget("KilledFire2",1)
		Goto DeathAnim
	Death.Railgun:
		SENT D 0 A_GiveToTarget("KilledLightning",1)
		Goto DeathAnim
	Death.GhostTrap:
		SENT D 0 A_GiveToTarget("KilledG",1)
		Goto DeathAnim
	Death.AltFire2:
		SENT D 0 A_GiveToTarget("KilledAltFire2",1)
		Goto Death.Fire2
	Death.AltIce2:
		SENT D 0 A_GiveToTarget("KilledAltIce2",1)
		Goto Death.Ice2
	Death.AltGrenade:
		SENT D 0 A_GiveToTarget("KilledAltG",1)
		Goto Death.Grenade
	Death.Fire3:
		SENT D 0 A_GiveToTarget("KilledFire3",1)
		Goto DeathAnim
	Death.Ice3:
		SENT D 0 A_GiveToTarget("KilledIce3",1)
		Goto DeathAnim
	Death.Grenade2:
		SENT D 0 A_GiveToTarget("KilledG2",1)
		Goto DeathAnim
	Pain.Drainer:
		SENT D 0 A_GiveToTarget("Health",10)
		Goto Pain
	}
}

Actor TeleotherVision : Weapon
{
	Weapon.SelectionOrder 350
	Inventory.PickupSound ""
	Weapon.SlotNumber 1
	Inventory.PickupMessage ""
	Obituary "%o couldn't hide from %k." 
	+WEAPON.NOAUTOAIM
	+WEAPON.DONTBOB
	Weapon.Kickback 0
	Weapon.YAdjust 0
	Weapon.AmmoType "TeleotherPrimaryAmmo"
	Weapon.AmmoUse1 1
	Weapon.AmmoType2 "TeleotherSecondaryAmmo"
	Weapon.AmmoUse2 50
	+INVENTORY.UNDROPPABLE
	inventory.icon "TNT1A0"
	States
	{
	Spawn:
		BPAK A 400
		Stop
	Ready:
		TNT1 A 0 A_StopSound(7)
		PUPP E 0 A_JumpIfInventory("CyborgDashCheck",1,"SpawnTeleporterCheck")
		PUPP E 0 A_GiveInventory("TeleOtherPrimaryAmmo",1)
		PUPP E 4 A_WeaponReady
		goto Ready
	Select:	
		TNT1 A 0 A_StopSound(7)
		PUPP E 1 A_Raise
		loop
	Deselect:
		TNT1 A 0 A_StopSound(7)
		PUPP E 1 A_Lower
		loop
	Fire:
	TNT1 A 0 A_PlaySound("GhoulLaser/FireStart",CHAN_WEAPON)
	Hold:
	TNT1 A 0 A_PlaySound("GhoulLaser/SpinLoop", 7, 1, 1)
	PUPP E 1 Bright A_FireCustommissile("Teleotherprojectile")
	TNT1 A 0 A_Refire
	TNT1 A 0 A_StopSound(7)
	PUPP E 2 BRIGHT A_StopSound(7)
	PUPP E 2 A_StopSound(7)
	PUPP E 60
	goto Ready
	AltFire:
		PUPP E 2 offset (0, 55)
		PUPP E 0 offset (0, 75) A_FireCustomMissile("ActivateTeleotherProjectile", 0, 1)
		PUPP E 3 offset (0, 95)
		PUPP E 3 offset (0, 90)
		PUPP E 3 offset (0, 85)
		PUPP E 3 offset (0, 80)
		PUPP E 3 offset (0, 75)
		PUPP E 3 offset (0, 70)
		PUPP E 3 offset (0, 65)
		PUPP E 3 offset (0, 60)
		PUPP E 3 offset (0, 55)
		PUPP E 3 offset (0, 50)
		PUPP E 3 offset (0, 45)
		PUPP E 3 offset (0, 40)
		PUPP E 3 offset (0, 32)
		PUPP E 15
		goto Ready
		SpawnTeleporterCheck:
		TNT1 A 0 A_TakeInventory("CyborgDashCheck",999)
		PUPP E 0 A_JumpIfInventory("ISpawnedTeleOther",1,"TeleOtherAlreadySpawned")
		PUPP E 0 A_GiveInventory("ISpawnedTeleOther",1)
		PUPP E 39 ACS_ExecuteAlways(466,0,1)
		Goto Ready
		TeleOtherAlreadySpawned:
		TNT1 A 0 A_TakeInventory("ISpawnedTeleOther",1)
		PUPP E 39 ACS_ExecuteAlways(467,0)
		Goto Ready
	}
}


Actor ActivateTeleotherProjectile : fastprojectile
{
   Speed 60
   Damage (40)
   Height 3
   Radius 3
   Damagetype "TeleOtherActivateDamage"
   Obituary "%k sent %o to another dimension." 
   Projectile
  States
  {
  Spawn:
    SSPF ABCD 1 Bright
    loop
  Death:
    SSPF ABCD 1 Bright 
    Stop
  }
} 

Actor TeleOtherspot
{
	Scale 0.1
	Alpha 0.8
	RenderStyle Add
	VisibleToTeam 1
	+FORCEXYBILLBOARD
	+NOINTERACTION
	States
	{
	Spawn:
		ORBP ABCDCB 5
		Loop
	}
}

Actor TeleotherPrimaryAmmo : Ammo
{
  Inventory.PickupMessage ""
  Inventory.Amount 100
  Inventory.MaxAmount 100
  Ammo.BackpackAmount 100
  Ammo.BackpackMaxAmount 100
  Inventory.Icon "PRSPG0"
  States
  {
  Spawn:
   PRSP G 8 Bright
    Loop
  }
}


Actor TeleotherSecondaryAmmo : Ammo
{
  Inventory.PickupMessage ""
  Inventory.Amount 100
  Inventory.MaxAmount 100
  Ammo.BackpackAmount 100
  Ammo.BackpackMaxAmount 100
  Inventory.Icon "SSPAA0"
  States
  {
  Spawn:
   SSPA A 8 Bright
    Loop
  }
}

Actor Teleotherprojectile : fastprojectile
{
   Speed 100
   Damage (10)
   Height 3
   Radius 3
   scale 0.1
   RenderStyle Add
   Damagetype "TeleOtherPlant"
   Obituary "%o lost a staring contest with %k." 
   Projectile
  States
  {
  Spawn:
    PRSP G 1 Bright
    loop
  Death:
    PRSP G 1 Bright A_Fadeout(0.2)
    Stop
  }
} 

Actor TeleOtherPlanted : Inventory
{
	inventory.amount 0
	inventory.maxamount 1
}

Actor ISpawnedTeleOther : Inventory
{
	inventory.amount 0
	inventory.maxamount 1
}

ACTOR TeleOtherFog
{
- SOLID
+NOGRAVITY
+NOCLIP
+NOBLOCKMAP
		States
		{
		Spawn:
			DFOG A 3 BRIGHT
			DFOG BCDE 3 BRIGHT
			DFOG FGHGFEDCBA 3 Bright
			Stop
		Death:
			TNT1 A 0
			Stop
		}
}

Actor VoidBeam2
{
	+NOGRAVITY
	-PUSHABLE
	+DONTREFLECT
	RenderStyle Add
	scale 0.1
	States
	{
	Spawn:
		PRSP G 1 Bright A_Fadeout(0.9)
	loop
	}
}

actor TeleOtherPlant : BulletPuff
{
+alwayspuff
+puffonactors
States
{
  Spawn:
    PUFF A 0
    PUFF A 4 bright
    PUFF B 4
    // Intentional fall-through
  Melee:
    PUFF CD 4
    stop
	XDeath:
	TNT1 A 1 Bright
	TNT1 A 1
	Stop
	

}
}