Actor NewArtiHealingRadius : CustomInventory Replaces ArtiHealingRadius
{
	Game Hexen
	+COUNTITEM
	+FLOATBOB
	Inventory.DefMaxAmount
	+INVENTORY.INVBAR 
	+INVENTORY.PICKUPFLASH
	+INVENTORY.FANCYPICKUPSOUND
	Inventory.InterHubAmount 25
	Tag "Mystic Ambit Incant"
	Inventory.Icon "ARTIHRAD"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.PickupMessage "$TXT_ARTIHEALINGRADIUS" // "MYSTIC AMBIT INCANT"
	States
	{
	Spawn:
		HRAD ABCDEFGHIJKLMNOP 4 Bright
		Loop
	Use:
		TNT1 A 0 ACS_ExecuteAlways(WOC_MYSTICAMBITINCANT,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"
}

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"
}


//Actor replacements

Actor GenericDoomRandomSpawner : RandomSpawner
{
	DropItem "AccessoryRandomSpawner" 255 3
	DropItem "SupplyChestSpawner" 255 3
	DropItem "StreetMerchantSpawner" 255 3
	DropItem "NewArtiHealingRadius" 255 3
	DropItem "NewArtiTeleport" 255 3
	DropItem "NewArtiPork" 255 3
	DropItem "NewArtiSpeedBoots" 255 3
	DropItem "ForceCube" 255 3
	DropItem "NewArtiDarkServant" 255 3
}

Actor NewBerserkSpot : GenericDoomRandomSpawner replaces Berserk
{
	Game Doom
	SpawnID 134
}

Actor NewBlurSphere : GenericDoomRandomSpawner replaces BlurSphere
{
	Game Doom
	SpawnID 135
}

Actor NewArtiInvisibility : ArtiInvisibility
{
	Powerup.Type "NewGhost"
	Inventory.InterHubAmount 25
	-NOGRAVITY
}

Actor PowerNewGhost : PowerGhost
{
	+CANTSEEK
}

Actor NewArtiEgg : ArtiEgg replaces ArtiEgg
{
	Inventory.InterHubAmount 25
	-NOGRAVITY
}

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

Actor NewChainsawSpot : GenericDoomRandomSpawner replaces Chainsaw
{
	Game Doom
	SpawnID 32
}

Actor NewStimpackSpots : RandomSpawner replaces Stimpack
{
	Game Doom
	Spawnid 23
	Dropitem "BluePotionVial" 255 4
	DropItem "BluePotionPentagon" 255 3
	DropItem "BluePotionHexagon" 255 2
	DropItem "BluePotionRound" 255 1
}

Actor NewMedikitSpots : RandomSpawner replaces Medikit
{
	Game Doom
	Spawnid 24
	Dropitem "PurplePotionVial" 255 4
	DropItem "PurplePotionPentagon" 255 3
	DropItem "PurplePotionHexagon" 255 2
	DropItem "PurplePotionRound" 255 1
}

Actor NewHealthBonusSpot : RandomSpawner replaces HealthBonus
{
	Game Doom
	SpawnID 152
	Dropitem "ArtiGreenFlask"
	DropItem "ArtiRedFlask"
	DropItem "ArtiYellowFlask"
}

Actor NewArmorBonusSpot : RandomSpawner replaces ArmorBonus
{
	Game Doom
	SpawnID 22
	Dropitem "NewArtiBlastRadius"
}

Actor NewArtiBlastRadius : ArtiBlastRadius replaces ArtiBlastRadius
{
	Inventory.InterHubAmount 25
}

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

Actor NewArtiBoostMana : ArtiBoostMana replaces ArtiBoostMana
{
	Inventory.InterHubAmount 25
	-NOGRAVITY
	States
	{
	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 : ArtiDarkServant replaces ArtiDarkServant
{
	Inventory.InterHubAmount 25
	-NOGRAVITY
}

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

Actor NewArtiInvulnerability2 : ArtiInvulnerability2 replaces ArtiInvulnerability2
{
	+INVENTORY.BIGPOWERUP
	Inventory.InterHubAmount 25
	-NOGRAVITY
}

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

Actor NewArtiTorch : ArtiTorch replaces ArtiTorch
{
	Inventory.InterHubAmount 25
}

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 25
	-NOGRAVITY
	Tag "Porkalator"
	States
	{
	Spawn:
		PORK ABCDEFGH 5
		Loop
	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
  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 : ArtiSpeedBoots// replaces ArtiSpeedBoots
{
	Inventory.InterHubAmount 25
	Powerup.Type NewSpeedBoot
	-NOGRAVITY
}

Actor PowerNewSpeedBoot : PowerSpeed
{
	Inventory.Icon SPBOTZ0
}

Actor NewArtiTeleport : ArtiTeleport replaces ArtiTeleport
{
	Inventory.InterHubAmount 25
}

Actor NewArtiTeleportOther : ArtiTeleportOther// replaces ArtiTeleportOther
{
	Inventory.InterHubAmount 25
}

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.InterHubAmount 25
    Inventory.DefMaxAmount
    Inventory.PickupSound "misc/p_pkup"
    Inventory.PickupMessage "Force Cube"
    Inventory.Icon "ARTIFCBE"
	Tag "Force Cube"
    Scale 0.6
    States
    {
    Spawn:
		FCB1 ABCDEFGHIJKLMNOP 4 Bright
		Loop
    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
    +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
    +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)
		Stop
    }
}

ACTOR ForceCube2Left : CustomInventory
{
	+AUTOACTIVATE
    +NOTIMEFREEZE
    States
    {
    Pickup:
		TNT1 A 0 A_SpawnItemEx("LeftCube",20,-12,36,0,0,0,0,32,0)
		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
    +NONSHOOTABLE
    +MISSILEMORE
    +MISSILEEVENMORE
    +NOTIMEFREEZE
    //+NOFEAR
    MinMissileChance 0
    States
    {
    Spawn:
		TNT1 A 1 A_Look
		Loop
    See:
		TNT1 A 1 A_Chase
		Loop
    Missile:
		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
    +NONSHOOTABLE
    +MISSILEMORE
    +MISSILEEVENMORE
    +NOTIMEFREEZE
    //+NOFEAR
    MinMissileChance 0
    States
    {
    Spawn:
		TNT1 A 1 A_Look
		Loop
    See:
		TNT1 A 1 A_Chase
		Loop
    Missile:
		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
    +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,3)
		FCB2 A 1 A_CustomMissile("ForceCubeLaser",12,16,0)
		FCB2 A 0 A_PlaySound("forcecube/fire")
		Stop
		FCB2 A 1
		Stop
    }
}

ACTOR LeftCube
{
    Radius 0
    Height 0
    Speed 0
    Scale 0.1
    +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,3)
		FCB2 A 1 A_CustomMissile("ForceCubeLaser",12,-16,0)
		FCB2 A 0 A_PlaySound("forcecube/fire")
		Stop
		FCB2 A 1
		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,GLOBALLEVEL,0)))
	PROJECTILE
    +CANNOTPUSH
    +NODAMAGETHRUST
    +BLOODLESSIMPACT
	+THRUSPECIES
	+DONTREFLECT
    Species "Player"
	Damagetype "Arcane"
    RenderStyle Add
	SeeSound "weapons/jadewand"
	DeathSound "DemonMissileExplode"
	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 CDE 3
		Stop
    }
}

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 ClassPack : CustomInventory
{
	+FLOATBOB
	+AUTOACTIVATE
	Inventory.MaxAmount 0
	Inventory.PickupMessage "Mesh Armor"
	Inventory.PickupSound "pickup/armor"
	States 
	{ 
	Use:
		AMR1 A 0 A_GiveInventory("Strength", 300)
		AMR1 A 0 A_JumpIfInventory("ImACleric", 1, "ClericAbilities")
		AMR1 A 0 A_JumpIfInventory("ImAMage", 1, "MageAbilities")
		AMR1 A 0 A_JumpIfInventory("ImAHunter", 1, "HunterAbilities")
		AMR1 A 0 A_JumpIfInventory("ImAFighter", 1, "FighterAbilities")
		AMR1 A 0 A_JumpIfInventory("ImACleric", 1, "ClericAbilities")
		AMR1 A 0 A_JumpIfInventory("ImAMage", 1, "MageAbilities")
		AMR1 A 0 A_JumpIfInventory("ImAHunter", 1, "HunterAbilities")
		Stop 
	} 
}

Actor FriendlyInDisguise : WoC_Boolean {}
Actor EnemyInDisguise : WoC_Boolean {}

Actor NewGreenArmorSpot : RandomSpawner replaces GreenArmor
{
	Game Doom
	Spawnid 68
	Dropitem "Armour1"
	DropItem "Armour2"
	DropItem "Armour3"
	DropItem "Armour4"
	DropItem "Armour5"
	DropItem "Armour6"
	DropItem "Armour7"
	DropItem "Armour8"
}

Actor NewBlueArmorSpot : RandomSpawner replaces BlueArmor
{
	Game Doom
	SpawnID 69
	Dropitem "Armour1"
	DropItem "Armour2"
	DropItem "Armour3"
	DropItem "Armour4"
	DropItem "Armour5"
	DropItem "Armour6"
	DropItem "Armour7"
	DropItem "Armour8"
}

Actor NewMegasphereSpot : CustomInventory replaces Megasphere
{
	Game Doom
	SpawnID 132
	Inventory.RespawnTics 0x7FFFFFFF
	+INVENTORY.QUIET
	+INVENTORY.ALWAYSPICKUP
	States
	{
	Spawn:
	TNT1 A 0
	TNT1 A 0 A_SpawnItem("NewGreenArmorSpot")
	TNT1 A 0 A_SpawnItem("NewSoulSphereSpot")
	TNT1 A -1
	Stop
	Pickup:
	TNT1 A 0 A_GiveInventory("DummiestItemEvar")
	Stop
	}
}

ACTOR AntiRadiationBoots : PowerupGiver replaces RadSuit
{
  Game Doom
  SpawnID 136
  +FLOATBOB
  +COUNTITEM
  +INVENTORY.PICKUPFLASH
  Inventory.Icon ARADZ0
  Inventory.PickupMessage "ANTI RADIATION BOOTS"
  Inventory.InterHubAmount 25
  Tag "Anti Radiation Boots"
  Powerup.Type AntiRadiation
  States
  {
  Spawn:
    ARAD ABCDEFGH 3 Bright
    Loop
  }
}

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

//Doom Weapon Replacing


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