Actor NewArtiHealingRadius : CustomInventory Replaces ArtiHealingRadius
{
	+COUNTITEM
	+FLOATBOB
	+INVENTORY.INVBAR
	+INVENTORY.PICKUPFLASH
	+INVENTORY.FANCYPICKUPSOUND
	+INVENTORY.BIGPOWERUP
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	Tag "Mystic Ambit Incant"
	Inventory.Icon "ARTIHRAD"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.PickupMessage "Mystic Ambit Incant" // "MYSTIC AMBIT INCANT"
	
	ConversationID 184, 178, 182 //Replaces EnergyPack
	States
	{
	Spawn:
		HRAD ABCDEFGHIJKLMNOP 4 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiHealingRadius", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 ACS_NamedExecuteAlways("WOC MYSTIC AMBIT INCANT",0,0,0,0)
		stop
	}
}

Actor NewArtiHealingRadiusHealth : CustomInventory
{
	+FLOATBOB
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Inventory.PickupSound "pickup/health"
	Inventory.PickupMessage "Healing Radius Health"
	States
	{
	Spawn:
		AVPT ABC 4
		Loop
	Use:
		TNT1 A 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(553,0,0,0),"Pickedup")
		Stop
	Pickedup:
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(553,0,0,0)/3,0,0)
		stop
	}
}

ACTOR ArtiHealingRadiusFearPowerup : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	Inventory.MaxAmount 0
	Powerup.Type NecroFrightener
	Powerup.Duration -30
	States
	{
	Spawn:
		PINV ABCD 6 Bright
		Loop
	}
}

ACTOR PowerNecroFrightener : PowerFrightener
{
	Powerup.Duration -30
	Inventory.Icon "HRADICNP"
	+INVENTORY.PERSISTENTPOWER
}

ACTOR NewArtiBoostArmor : CustomInventory
{
	+FLOATBOB
	+AUTOACTIVATE
	Inventory.MaxAmount 0
	Inventory.PickupMessage "Mesh Armor"
	Inventory.PickupSound "pickup/armor"
	States 
	{ 
	Spawn: 
		AMR1 A 1 
		Stop
	Use:
		AMR3 A 0 ACS_ExecuteAlways (WOC_ARMORITEM, 0, 9)
		Stop
	}
}

Actor HunterSpeedBuff : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type HunterSpeedBuff
}

Actor PowerHunterSpeedBuff : PowerSpeed
{
	Speed 1.15
	Powerup.Duration -30
	Inventory.Icon "HRADICHP"
	+INVENTORY.PERSISTENTPOWER
}

Actor AssassinIncantBuff : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type AssassinIncantBuff
}

Actor PowerAssassinIncantBuff : PowerGhost
{
	Powerup.Duration -30
	Inventory.Icon "HRADICAP"
	+INVENTORY.PERSISTENTPOWER
	+CANTSEEK
}


//Actor replacements

Actor NewArtiInvisibility : CustomInventory
{
	+INVENTORY.BIGPOWERUP
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	+COUNTITEM
	+FLOATBOB
	+INVENTORY.PICKUPFLASH
	+INVENTORY.INVBAR
	RenderStyle Translucent
	Alpha 0.4
	Inventory.RespawnTics 4230
	Inventory.Icon ARTIINVS
	Inventory.PickupSound "misc/p_pkup"
	Inventory.PickupMessage "Shadowsphere"
	Tag "Shadowsphere"
	
	ConversationID 160, 156, 159 //Replaces ShadowArmor
	States
	{
	Spawn:
		INVS A 350 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiInvisibility", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_GiveInventory("UseArtiInvisibility")
		Stop
	}
}

Actor UseArtiInvisibility : ArtiInvisibility
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type "NewGhost"
}

Actor PowerNewGhost : PowerGhost
{
	+CANTSEEK
	+INVENTORY.PERSISTENTPOWER
	Inventory.Icon "POWRINVS"
}

Actor NewArtiEgg : ArtiEgg replaces ArtiEgg
{
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	-NOGRAVITY
	+INVENTORY.BIGPOWERUP
	Inventory.UseSound "Chicken/Sight"
	Tag "Morph Ovum"
	Inventory.PickupMessage "Morph Ovum"
	States
	{
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiEgg", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	}
}

Actor NewEggFX : EggFX replaces EggFX
{
	+MTHRUSPECIES
	MorphProjectile.PlayerClass ""
	MorphProjectile.MorphStyle MRF_UNDOBYTOMEOFPOWER|MRF_UNDOBYCHAOSDEVICE
}

Actor NewArtiBlastRadius : ArtiBlastRadius replaces ArtiBlastRadius
{
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	+INVENTORY.BIGPOWERUP
	Tag "Disc of Repulsion"
	Inventory.PickupMessage "Disc of Repulsion"
	
	ConversationID 186, 180, 184 //Replaces ElectricBolts
	States
	{
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiBlastRadius", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Spawn:
		DSCR ABCDEFGH 4 Bright
		Loop
	Use:
		TNT1 A 0 A_Blast(BF_NOIMPACTDAMAGE)
		Stop
	}
}

Actor NewBackPackSpot : RandomSpawner replaces BackPack
{
	Game Doom
	SpawnID 144
	Dropitem "NewArtiBoostMana"
}

Actor NewArtiBoostMana : ArtiBoostMana replaces ArtiBoostMana
{
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	-NOGRAVITY
	+INVENTORY.BIGPOWERUP
	Tag "Krater of Might"
	Inventory.PickupMessage "Krater of Might"
	
	ConversationID 187, 181, 184 //Replaces AmmoSatchel
	States
	{
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiBoostMana", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_GiveInventory("Mana1", 200000)
		TNT1 A 0 A_GiveInventory("Mana2", 200000)
		TNT1 A 0 A_GiveInventory("MP", 200000)
		Stop
	}
}

Actor NewArtiDarkServant : CustomInventory replaces ArtiDarkServant
{
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	+COUNTITEM
	+FLOATBOB
	Inventory.RespawnTics 4230
	Inventory.PickupFlash "PickupFlash"
	+INVBAR
	+FANCYPICKUPSOUND
	-NOGRAVITY
	+INVENTORY.BIGPOWERUP
	Inventory.Icon "ARTISUMN"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.PickupMessage "Dark Servant" // "DARK SERVANT"
	Tag "Dark Servant"
	
	ConversationID 556 //Custom
	States
	{
	Spawn:
		SUMN A 350 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiDarkServant", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_GiveInventory("UseArtiDarkServant")
		Stop
	}
}

Actor UseArtiDarkServant : ArtiDarkServant
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor NewInvulnerabilitySphereSpot : RandomSpawner replaces InvulnerabilitySphere
{
	Game Doom
	SpawnID 133
	Dropitem "NewArtiInvulnerability2"
}

Actor NewArtiInvulnerability2 : CustomInventory replaces ArtiInvulnerability2
{
	-NOGRAVITY
	+COUNTITEM
	+FLOATBOB
	+INVENTORY.PICKUPFLASH
	+INVENTORY.INVBAR
	+INVENTORY.BIGPOWERUP
	Inventory.RespawnTics 4230
	Inventory.Icon ARTIDEFN
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	Inventory.PickupSound "misc/p_pkup"
	Inventory.PickupMessage "Icon of the Defender" // "ICON OF THE DEFENDER"
	Tag "Icon of the Defender"
	
	ConversationID 555 //Custom
	States
	{
	Spawn:
		DEFN ABCD 3
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiInvulnerability2", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_GiveInventory("UseArtiInvulnerability2")
		Stop
	}
}

Actor UseArtiInvulnerability2 : ArtiInvulnerability2
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor NewInfraredSphereSpot : RandomSpawner replaces Infrared
{
	Game Doom
	SpawnID 138
	Dropitem "NewArtiTorch"
}

Actor NewArtiTorch : CustomInventory replaces ArtiTorch
{
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	+COUNTITEM
	+FLOATBOB
	+INVENTORY.PICKUPFLASH
	+INVENTORY.INVBAR
	+INVENTORY.BIGPOWERUP
	Inventory.Icon ARTITRCH
	Inventory.PickupSound "misc/p_pkup"
	Inventory.PickupMessage "Torch" // "TORCH"
	Tag "Torch"
	
	ConversationID 167, 169, 173 //Replaces Targetter
	States
	{
	Spawn:
		TRCH ABC 3 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiTorch", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_GiveInventory("UseArtiTorch")
		Stop
	}
}

Actor UseArtiTorch : ArtiTorch
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type "NewTorch"
}

Actor PowerNewTorch : PowerTorch
{
	+INVENTORY.PERSISTENTPOWER
}

Actor NewArtiPorkSpot : RandomSpawner replaces ArtiPork 30
{
	Game Hexen
    SpawnID 14
	DropItem "StreetMerchantSpawner" 255 3
	DropItem "SupplyChestSpawner" 255 3
	DropItem "NewArtiPork" 255 5
}

Actor NewArtiPork : ArtiPork// replaces ArtiPork
{
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	-NOGRAVITY
	+INVENTORY.BIGPOWERUP
	Tag "Porkalator"
	Inventory.PickupMessage "Porkalator"
	Inventory.UseSound "PigActive1"
	
	ConversationID 185, 179, 183 //Replaces PoisonBolts
	States
	{
	Spawn:
		PORK ABCDEFGH 5
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiPork", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_FireCustomMissile("NewPorkFX", -15, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("NewPorkFX", -7.5, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("NewPorkFX", 0, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("NewPorkFX", 7.5, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("NewPorkFX", 15, 0, 0, 0, 1)
		Stop
	}
}

Actor NewPorkFX : PorkFX
{
	+MTHRUSPECIES
	MorphProjectile.PlayerClass ""
	MorphProjectile.MonsterClass "NewPig"
	MorphProjectile.MorphStyle MRF_UNDOBYTOMEOFPOWER|MRF_UNDOBYCHAOSDEVICE
}

ACTOR NewPig : MorphedMonster
{
	Health 25
	PainChance 128
	Speed 10
	Radius 12
	Height 22
	Mass 60
	Monster
	-COUNTKILL
	+WINDTHRUST
	+DONTMORPH
	+NODAMAGETHRUST +DONTBLAST
	SeeSound "PigActive1"
	PainSound "PigPain"
	DeathSound "PigDeath"
	ActiveSound "PigActive1"
	States
	{
	Spawn:
		PIGY B 10 A_Look
		Loop
	See:
		PIGY ABCD 3 A_Chase
		Loop
	Pain:
		PIGY D 4 A_PigPain
		Goto See
	Melee:
		PIGY A 5 A_FaceTarget
		PIGY A 10 A_CustomMeleeAttack(random[PigAttack](2, 3), "PigAttack")
		Goto See
	Death:
		PIGY E 4 A_Scream
		PIGY F 3 A_NoBlocking
		PIGY G 4 A_QueueCorpse
		PIGY H 3
		PIGY IJK 4
		PIGY L -1
		Stop
	}
}

Actor PolymorphPorkFX : PorkFX
{
	+MTHRUSPECIES
	MorphProjectile.PlayerClass ""
	MorphProjectile.MonsterClass "NewPig"
	MorphProjectile.MorphStyle MRF_UNDOBYTOMEOFPOWER|MRF_UNDOBYCHAOSDEVICE|MRF_UNDOBYDEATH|MRF_UNDOBYDEATHSAVES
}

Actor NewArtiSpeedBootsSpot : RandomSpawner replaces ArtiSpeedBoots 8002
{
	Game Hexen
    SpawnID 13
	DropItem "StreetMerchantSpawner" 255 3
	DropItem "SupplyChestSpawner" 255 3
	DropItem "NewArtiSpeedBoots" 255 5
}

Actor NewArtiSpeedBoots : CustomInventory// replaces ArtiSpeedBoots
{
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	+FLOATBOB
	+COUNTITEM
	+INVENTORY.PICKUPFLASH
	+INVENTORY.INVBAR
	Inventory.Icon ARTISPED
	Inventory.PickupSound "misc/p_pkup"
	Inventory.PickupMessage "Boots of Speed" // "BOOTS OF SPEED"
	Tag "Boots of Speed"
	-NOGRAVITY
	+INVENTORY.BIGPOWERUP
	
	ConversationID 554 //Custom ID
	States
	{
	Spawn:
		SPED ABCDEFGH 3 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiSpeedBoots", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_GiveInventory("UseArtiSpeedBoots")
		Stop
	}
}

Actor UseArtiSpeedBoots : ArtiSpeedBoots
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type NewSpeedBoot
}

Actor PowerNewSpeedBoot : PowerSpeed
{
	Inventory.Icon SPBOTZ0
	+INVENTORY.PERSISTENTPOWER
}

Actor NewArtiTeleport : CustomInventory replaces ArtiTeleport
{
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	+COUNTITEM
	+FLOATBOB
	+INVENTORY.INVBAR
	+INVENTORY.PICKUPFLASH
	+INVENTORY.FANCYPICKUPSOUND
	+INVENTORY.BIGPOWERUP
	Inventory.Icon "ARTIATLP"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.PickupMessage "Chaos Device" // "CHAOS DEVICE"
	Tag "Chaos Device"
	
	ConversationID 177, 170, 174 //Replaces HEGrenadeRounds
	States
	{
	Spawn:
		ATLP ABCB 4
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiTeleport", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_GiveInventory("UseArtiTeleport")
		Stop
	}
}

Actor UseArtiTeleport : ArtiTeleport
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor NewArtiTeleportOther : CustomInventory// replaces ArtiTeleportOther
{
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	+COUNTITEM
	+FLOATBOB
	+INVENTORY.INVBAR
	+INVENTORY.PICKUPFLASH
	+INVENTORY.FANCYPICKUPSOUND
	+INVENTORY.BIGPOWERUP
	Inventory.Icon "ARTITELO"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.PickupMessage "Banishment Device" // "BANISHMENT DEVICE"
	Tag "Banishment Device"
	States
	{
	Spawn:
		TELO ABCD 5
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiTeleportOther", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_GiveInventory("UseArtiTeleportOther")
		Stop
	}
}

Actor UseArtiTeleportOther : ArtiTeleportOther
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor NewArtiTeleportOtherSpot : RandomSpawner replaces ArtiTeleportOther 10040
{
	Game Hexen
    SpawnID 17
	DropItem "StreetMerchantSpawner" 255 3
	DropItem "SupplyChestSpawner" 255 3
	DropItem "ForceCube" 255 5
}

ACTOR ForceCube : CustomInventory// replaces ArtiTeleportOther 10040
{
    +FLOATBOB
    +COUNTITEM
    +INVENTORY.FANCYPICKUPSOUND
    +INVENTORY.INVBAR
    +INVENTORY.PICKUPFLASH
	+INVENTORY.BIGPOWERUP
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
    Inventory.PickupSound "misc/p_pkup"
    Inventory.PickupMessage "Force Cube"
    Inventory.Icon "ARTIFCBE"
	Tag "Force Cube"
    Scale 0.6
	
	ConversationID 178, 171, 175 //Replaces PhosphorousGrenadeRounds
    States
    {
    Spawn:
		FCB1 ABCDEFGHIJKLMNOP 4 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("ForceCube", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
    Use:
		TNT1 A 0 A_JumpIfInventory("ForceCubeTimerRight",1,3)
		TNT1 A 0 A_GiveInventory("ForceCubeTimerRight",1)
		TNT1 A 0 A_SpawnItemEx("ForceCube1Right",0,0,0,0,0,0,0,32,0)
		Stop
		TNT1 A 0 A_JumpIfInventory("ForceCubeTimerLeft",1,3)
		TNT1 A 0 A_GiveInventory("ForceCubeTimerLeft",1)
		TNT1 A 0 A_SpawnItemEx("ForceCube1Left",0,0,0,0,0,0,0,32,0)
		Stop
		TNT1 A 0
		Fail
    }
}

ACTOR ForceCube1Right
{
    Radius 0
    Height 0
	PROJECTILE
	+NOCLIP
	+NOINTERACTION
	+RIPPER
	+BLOODLESSIMPACT
	+PAINLESS
    +NOTIMEFREEZE
    //+NOFEAR
    States
    {
    Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("ForceCubeGiverRight",0,0,0,0,0,0,0,32,0)
		Stop
    }
}

ACTOR ForceCube1Left
{
    Radius 0
    Height 0
	PROJECTILE
	+NOCLIP
	+NOINTERACTION
	+RIPPER
	+BLOODLESSIMPACT
	+PAINLESS
    +NOTIMEFREEZE
    //+NOFEAR
    States
    {
    Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("ForceCubeGiverLeft",0,0,0,0,0,0,0,32,0)
		Stop
    }
}

ACTOR ForceCube2Right : CustomInventory
{
    +AUTOACTIVATE
    +NOTIMEFREEZE
    States
    {
    Pickup:
		TNT1 A 0 A_SpawnItemEx("RightCube",20,12,36,0,0,0,0,32,0,PET5TID+ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM))
		Stop
    }
}

ACTOR ForceCube2Left : CustomInventory
{
	+AUTOACTIVATE
    +NOTIMEFREEZE
    States
    {
    Pickup:
		TNT1 A 0 A_SpawnItemEx("LeftCube",20,-12,36,0,0,0,0,32,0,PET5TID+ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM))
		Stop
    }
}

ACTOR ForceCubeTimerRight : PowerProtection
{
    DamageFactor "Normal", 1.0
	Inventory.Icon "FOCEICON"
    Powerup.Duration 2100
}

ACTOR ForceCubeTimerLeft : PowerProtection
{
    DamageFactor "Normal", 1.0
	Inventory.Icon "FOCEICON"
    Powerup.Duration 2100
}

ACTOR ForceCubeTimer2 : Inventory
{
    +NOTIMEFREEZE
    Inventory.Amount 1
    Inventory.MaxAmount 2100
    States
    {
    Spawn:
		TNT1 A 0
		Stop
    }
}

ACTOR ForceCubeGiverRight
{
    Health 1000000000
    Radius 0
    Height 0
    Speed 0
	PROJECTILE
	+NOCLIP
	+DONTBLAST
	+NOINTERACTION
	+RIPPER
	+BLOODLESSIMPACT
	+PAINLESS
    +NONSHOOTABLE
    +MISSILEMORE
    +MISSILEEVENMORE
    +NOTIMEFREEZE
    //+NOFEAR
    MinMissileChance 0
    States
    {
    Spawn:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInTargetInventory("ForceCubeTimerRight",1,2)
		TNT1 A 0 A_Jump(256,"Death")
		TNT1 A 0 A_JumpIfInventory("ForceCubeTimer2",2100,"Death")
		TNT1 A 0 A_GiveInventory("ForceCubeTimer2",1)
		TNT1 A 1 A_GiveToTarget("ForceCube2Right",1)
		Loop
    Death:
		TNT1 A 0 A_TakeFromTarget("ForceCubeTimerRight",1)
		Stop
    }
}

ACTOR ForceCubeGiverLeft
{
    Health 1000000000
    Radius 0
    Height 0
    Speed 0
    PROJECTILE
	+NOCLIP
	+DONTBLAST
	+NOINTERACTION
	+RIPPER
	+BLOODLESSIMPACT
	+PAINLESS
    +NONSHOOTABLE
    +MISSILEMORE
    +MISSILEEVENMORE
    +NOTIMEFREEZE
    //+NOFEAR
    MinMissileChance 0
    States
    {
    Spawn:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInTargetInventory("ForceCubeTimerLeft",1,2)
		TNT1 A 0 A_Jump(256,"Death")
		TNT1 A 0 A_JumpIfInventory("ForceCubeTimer2",2100,"Death")
		TNT1 A 0 A_GiveInventory("ForceCubeTimer2",1)
		TNT1 A 1 A_GiveToTarget("ForceCube2Left",1)
		Loop
    Death:
		TNT1 A 0 A_TakeFromTarget("ForceCubeTimerLeft",1)
		Stop
    }
}

ACTOR RightCube
{
    Radius 0
    Height 0
    Speed 0
    Scale 0.1
	+ISMONSTER
	-COUNTKILL
    +FRIENDLY
    +NOGRAVITY
    +NOTIMEFREEZE
    +MISSILEMORE
    +MISSILEEVENMORE
    //+NOFEAR
	+NOTARGET
	Species "Player"
	+DONTHURTSPECIES
    MinMissileChance 0
    States
    {
    Spawn:
		FCB2 A 0
		FCB2 A 0 A_AlertMonsters
		FCB2 A 1 A_LookEx(2,0,800,0,135,"See")
		Stop
    See:
		FCB2 A 0 A_Jump(240,"Vanish")
		FCB2 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,HITPOINTS,WOCTARGET) <= 0, "Vanish")
		FCB2 A 0 A_JumpIfTargetInLOS(1)
		Goto Vanish
		FCB2 A 1 A_CustomMissile("ForceCubeLaser",12,16,0,CMF_CHECKTARGETDEAD)
		FCB2 A 0 A_PlaySound("forcecube/fire")
	Looper:
		TNT1 A 1 A_JumpIfInventory("LaserVanish",1,"VanishInvis")
		Loop
	Vanish:
		FCB2 A 1
		Stop
	VanishInvis:
		FCB2 A 0
		Stop
    }
}

ACTOR LeftCube
{
    Radius 0
    Height 0
    Speed 0
    Scale 0.1
	+ISMONSTER
	-COUNTKILL
    +FRIENDLY
    +NOGRAVITY
    +NOTIMEFREEZE
    +MISSILEMORE
    +MISSILEEVENMORE
    //+NOFEAR
	+NOTARGET
	Species "Player"
	+DONTHURTSPECIES
    MinMissileChance 0
    States
    {
    Spawn:
		FCB2 A 0
		FCB2 A 0 A_AlertMonsters
		FCB2 A 1 A_LookEx(2,0,800,0,135,"See")
		Stop
    See:
		FCB2 A 0 A_Jump(240,"Vanish")
		FCB2 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,HITPOINTS,WOCTARGET) <= 0, "Vanish")
		FCB2 A 0 A_JumpIfTargetInLOS(1)
		Goto Vanish
		FCB2 A 1 A_CustomMissile("ForceCubeLaser",12,-16,0,CMF_CHECKTARGETDEAD)
		FCB2 A 0 A_PlaySound("forcecube/fire")
	Looper:
		TNT1 A 1 A_JumpIfInventory("LaserVanish",1,"VanishInvis")
		Loop
	Vanish:
		FCB2 A 1
		Stop
	VanishInvis:
		FCB2 A 0
		Stop
    }
}

ACTOR ForceCubePuff
{
    +NOGRAVITY
    +PUFFONACTORS
    +ALWAYSPUFF
    +BLOODLESSIMPACT
    DamageType "Player"
    States
    {
    Spawn:
		TNT1 A 1
		Stop
    }
}

ACTOR ForceCubeLaser
{
    Speed 40
    Radius 6
    Height 8
    Damage (random(26,46)*0.025*(40+acs_executewithresult(WOC_DECORATE,STATS,CURRENTLEVEL,TARGETMASTERPLAYER)))
	PROJECTILE
    +CANNOTPUSH
    +NODAMAGETHRUST +DONTBLAST
    +BLOODLESSIMPACT
	+THRUSPECIES
	+DONTREFLECT
    Species "Player"
	Damagetype "Arcane"
    RenderStyle Add
	SeeSound "weapons/jadewand"
	DeathSound "ForceCubeImpact"
	Scale 0.4
    States
    {
    Spawn:
		TNT1 A 0
		FL7P A 1 Bright A_SpawnItemEx("ForceCubeLaserTrail",  -(MomX/1.2), -(MomY/1.2), (MomZ/1.2*-1), (MomX/1.2), (MomY/1.2), (MomZ/1.2), 0, 138)
		Loop
	Death:
		FL7P C 1 Bright
		FL7P C 2 Bright A_GiveToTarget("LaserVanish")
		FL7P DE 3 Bright
		Stop
    }
}

Actor LaserVanish : WoC_Boolean {}

ACTOR ForceCubeLaserTrail
{
    Speed 0
    Radius 1
    Height 1
    Scale 0.3
    //Translation "0:255=%[0.0,0.2,0.2]:[0.0,0.5,0.5]"
	PROJECTILE
	+CLIENTSIDEONLY
	+DONTSPLASH
    //Alpha 0.2
    RenderStyle Add
    States
    {
    Spawn:
		FL7P A 0
		FL7P A 1 Bright A_FadeOut(0.1)
		Wait
    Death:
		TNT1 A 1
		Stop
    }
}

ACTOR AntiRadiationBoots : CustomInventory replaces RadSuit
{
	Game Doom
	SpawnID 136
	+FLOATBOB
	+COUNTITEM
	+INVENTORY.PICKUPFLASH
	+INVENTORY.INVBAR
	+INVENTORY.BIGPOWERUP
	Inventory.Icon ARADZ0
	Inventory.PickupMessage "Anti Radiation Boots"
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	Tag "Anti Radiation Boots"
	Inventory.PickupSound "misc/p_pkup"
	
	ConversationID 161, 157, 160 //Replaces EnvironmentalSuit
	States
	{
	Spawn:
		ARAD ABCDEFGH 3 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("AntiRadiationBoots", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_GiveInventory("UseAntiRadiationBoots")
		Stop
	}
}

		
ACTOR UseAntiRadiationBoots : PowerupGiver
{
	Powerup.Type AntiRadiation
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerAntiRadiation : PowerIronFeet
{
	Powerup.Duration -60
	Powerup.Color 0,0,0,0
	Inventory.Icon ARBOOT0
	+INVENTORY.PERSISTENTPOWER
}

actor NewArtiSuperHealth : CustomInventory replaces ArtiSuperHealth
{
	Game Raven
	SpawnID 25
	+INVENTORY.INVBAR
	+FLOATBOB
	+INVENTORY.PICKUPFLASH
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	+INVENTORY.FANCYPICKUPSOUND
	+INVENTORY.BIGPOWERUP
	Inventory.Icon "ARTISPHL"
	Tag "Mystic Urn"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.PickupMessage "Mystic Urn"
	
	ConversationID 127 //Replaces SurgeryKit
	States
	{
	Spawn:
		SPHL A 4
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("NewArtiSuperHealth", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(553,0,0,0),"Healing")
		stop
	Healing:
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(553,0,0,0),0,0)//Heal 100% of total health
		stop
	}
}

//Doom Weapon Replacing


ACTOR MapScroll : MapRevealer replaces Allmap
{
	Game Doom
	SpawnID 137
	+COUNTITEM
	+INVENTORY.ALWAYSPICKUP
	+FLOATBOB
	+INVENTORY.BIGPOWERUP
	Inventory.MaxAmount 0
	Inventory.PickupMessage "Map Scroll"
	Inventory.PickupSound "pickup/allmap"
	States
	{
	Spawn:
		SPMP A -1
		Stop
	}
}

Actor ScrollOfReversion : CustomInventory
{
	Game Hexen
	+COUNTITEM
	+FLOATBOB
	+INVENTORY.INVBAR
	+INVENTORY.PICKUPFLASH
	+INVENTORY.FANCYPICKUPSOUND
	Inventory.InterHubAmount 0x7FFFFFFF
	Inventory.MaxAmount 0x7FFFFFFF
	Tag "Scroll of Reversion"
	Inventory.Icon "ARTICSIG"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.PickupMessage "Scroll of Reversion" // "MYSTIC AMBIT INCANT"
	States
	{
	Spawn:
		CSIP A -1 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("ScrollOfReversion", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_JumpIfInventory("PowerReversionCheck",1,"RESPEC")
		TNT1 A 0 A_GiveInventory("PowerReversionCheck", 1)
		TNT1 A 0 A_Print("If you really want to respec, use this item again within 1 second")
		Fail
	Respec:
		TNT1 A 0 A_PlaySound("Respec/Use")
		TNT1 A 0 A_Print("Your skill and stat points are now refunded and your path unset")
		TNT1 A 0 ACS_ExecuteAlways(WOC_RESPECSCRIPT,0,0,0,0)
		stop
	}
}

Actor PowerReversionCheck : Powerup
{
	Powerup.Duration -1
}