actor CountBomb 11630
{
//$Category MM8BDM-Interactive Props
//$Sprite CBUPE0
//$Arg0 Respawn Time (Seconds)
//$Arg0Default 10
//$Arg1 Countdown Time (Max 9)
//$Arg1Default 3
//$Arg2 Countbomb Type
//$Arg2Enum { 1 = "MM6 Style"; 2 = "MM8 Style"; 3 = "MM10 Style"; }
//$Arg2Default 2
//$Arg2Type 11
//$NotAngled
+NOGRAVITY
-SHOOTABLE
+SOLID
+DONTBLAST
height 50
radius 32
scale 2.5
damagetype "CountBomb"
SelfObituary "$OB_COUNTBOMB"
states
{
Spawn:
TNT1 A 1
CBUP E 0 A_TakeInventory("CountbombFlag", 1)
CBUP E 0 A_TakeInventory("CutterFlag", 50)
CBUP E 0 A_JumpIf(args[0]>0, "GiveTime")
CBUP E 0 A_GiveInventory("CutterFlag", 10)
Goto Spawn2
GiveTime:
CBUP E 0 A_GiveInventory("CutterFlag", args[0])
Goto Spawn2
Spawn2:
CBUP A 0 A_SpawnItemEx("CountBombDetect", 0, 0, 64)
CBUP A 0 A_JumpIf(args[2] == 1, "StartTimer_6")
CBUP A 0 A_JumpIf(args[2] == 2, "StartTimer_8")
CBUP A 0 A_JumpIf(args[2] == 3, "StartTimer_10")
goto StartTimer_8

StartTimer_8:
CBUP K 0 A_SpawnItemEx("CountBombTop",0,0,42)
CBDP A 0 A_JumpIf(args[1]>=9,"Start9")
CBDP A 0 A_JumpIf(args[1]==8,"Start8")
CBDP A 0 A_JumpIf(args[1]==7,"Start7")
CBDP A 0 A_JumpIf(args[1]==6,"Start6")
CBDP A 0 A_JumpIf(args[1]==5,"Start5")
CBDP A 0 A_JumpIf(args[1]==4,"Start4")
CBDP A 0 A_JumpIf(args[1]==3,"Start3")
CBDP A 0 A_JumpIf(args[1]==2,"Start2")
CBDP A 0 A_JumpIf(args[1]==1,"Start1")
Goto Start3
Start9:
CBUP K 1 A_JumpIfInventory("CountBombFlag", 1, "Timer9")
loop
Start8:
CBUP J 1 A_JumpIfInventory("CountBombFlag", 1, "Timer8")
loop
Start7:
CBUP I 1 A_JumpIfInventory("CountBombFlag", 1, "Timer7")
loop
Start6:
CBUP H 1 A_JumpIfInventory("CountBombFlag", 1, "Timer6")
loop
Start5:
CBUP G 1 A_JumpIfInventory("CountBombFlag", 1, "Timer5")
loop
Start4:
CBUP F 1 A_JumpIfInventory("CountBombFlag", 1, "Timer4")
loop
Start3:
CBUP E 1 A_JumpIfInventory("CountBombFlag", 1, "Timer3")
loop
Start2:
CBUP D 1 A_JumpIfInventory("CountBombFlag", 1, "Timer2")
loop
Start1:
CBUP C 1 A_JumpIfInventory("CountBombFlag", 1, "Timer1")
loop
StartCount:
TNT1 A 0
Timer9:
CBDP K 10
CBDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer8:
CBDP J 10
CBDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer7:
CBDP I 10
CBDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer6:
CBDP H 10
CBDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer5:
CBDP G 10
CBDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer4:
CBDP F 10
CBDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer3:
CBDP E 10
CBDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer2:
CBDP D 10
CBDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer1:
CBDP C 10
CBDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer0:
CBDP L 10
CBDP A 0 A_GiveInventory("AtomicFireAmmo", 1)
CBDP ABABABAB 2
CBDP A 0 A_SpawnItemEx("CountbombExplode8", 0, 0, 24, 0, 0, 0, 0, SXF_TRANSFERPOINTERS)
TNT1 A 15 A_ChangeFlag(SOLID, false)
CBDP A 0 A_TakeInventory("AtomicFireAmmo", 999)
Goto Respawn
Respawn:
TNT1 A 0
TNT1 A 0 A_TakeInventory("CutterFlag", 1)
TNT1 A 35
TNT1 A 0 A_JumpIfInventory("CutterFlag", 1, "Respawn")
TNT1 A 0 A_TakeInventory("CountBombFlag", 999)
TNT1 A 1 A_ClearTarget
TNT1 A 1 A_FadeOut(0.5)
RespawnTry:
TNT1 A 0 A_TakeInventory("CountBombFlag", 1)
TNT1 A 0 A_SpawnItemEx("CountBombDetectRespawn")
TNT1 A 1
CBDP AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry")
TNT1 AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry")
CBDP AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry")
TNT1 AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry")
CBDP AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry")
TNT1 AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry")
CBDP AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry")
TNT1 AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry")
TNT1 A 0 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry")
TNT1 A 0 A_FadeIn(0.5)
TNT1 A 0 A_GiveInventory("CountBombFlag", 1)
TNT1 A 0 A_SpawnItemEx("CountBombRespawnFX")
TNT1 A 0 A_Changeflag("Solid", 1)
Goto Spawn

StartTimer_6:
TNT1 A 0 A_SpawnItemEx("CountBombTop6",0,0,42)
TNT1 A 0 A_JumpIf(args[1]>=9,"Start9_6")
TNT1 A 0 A_JumpIf(args[1]==8,"Start8_6")
TNT1 A 0 A_JumpIf(args[1]==7,"Start7_6")
TNT1 A 0 A_JumpIf(args[1]==6,"Start6_6")
TNT1 A 0 A_JumpIf(args[1]==5,"Start5_6")
TNT1 A 0 A_JumpIf(args[1]==4,"Start4_6")
TNT1 A 0 A_JumpIf(args[1]==3,"Start3_6")
TNT1 A 0 A_JumpIf(args[1]==2,"Start2_6")
TNT1 A 0 A_JumpIf(args[1]==1,"Start1_6")
Goto Start3_6
Start9_6:
C6UP K 1 A_JumpIfInventory("CountBombFlag", 1, "Timer9_6")
loop
Start8_6:
C6UP J 1 A_JumpIfInventory("CountBombFlag", 1, "Timer8_6")
loop
Start7_6:
C6UP I 1 A_JumpIfInventory("CountBombFlag", 1, "Timer7_6")
loop
Start6_6:
C6UP H 1 A_JumpIfInventory("CountBombFlag", 1, "Timer6_6")
loop
Start5_6:
C6UP G 1 A_JumpIfInventory("CountBombFlag", 1, "Timer5_6")
loop
Start4_6:
C6UP F 1 A_JumpIfInventory("CountBombFlag", 1, "Timer4_6")
loop
Start3_6:
C6UP E 1 A_JumpIfInventory("CountBombFlag", 1, "Timer3_6")
loop
Start2_6:
C6UP D 1 A_JumpIfInventory("CountBombFlag", 1, "Timer2_6")
loop
Start1_6:
C6UP C 1 A_JumpIfInventory("CountBombFlag", 1, "Timer1_6")
loop
StartCount_6:
TNT1 A 0
Timer9_6:
C6DP K 10
C6DP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer8_6:
C6DP J 10
C6DP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer7_6:
C6DP I 10
C6DP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer6_6:
C6DP H 10
C6DP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer5_6:
C6DP G 10
C6DP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer4_6:
C6DP F 10
C6DP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer3_6:
C6DP E 10
C6DP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer2_6:
C6DP D 10
C6DP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer1_6:
C6DP C 10
C6DP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer0_6:
C6DP L 10
C6DP A 0 A_GiveInventory("AtomicFireAmmo", 1)
C6DP ABABABAB 2
C6DP A 0 A_SpawnItemEx("CountbombExplode6", 0, 0, 24, 0, 0, 0, 0, SXF_TRANSFERPOINTERS)
TNT1 A 15 A_ChangeFlag(SOLID, false)
C6DP A 0 A_TakeInventory("AtomicFireAmmo", 999)
Goto Respawn_6
Respawn_6:
TNT1 A 0
TNT1 A 0 A_TakeInventory("CutterFlag", 1)
TNT1 A 35
TNT1 A 0 A_JumpIfInventory("CutterFlag", 1, "Respawn_6")
TNT1 A 0 A_TakeInventory("CountBombFlag", 999)
TNT1 A 1 A_ClearTarget
TNT1 A 1 A_FadeOut(0.5)
RespawnTry_6:
TNT1 A 0 A_TakeInventory("CountBombFlag", 1)
TNT1 A 0 A_SpawnItemEx("CountBombDetectRespawn")
TNT1 A 1
C6DP AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_6")
TNT1 AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_6")
C6DP AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_6")
TNT1 AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_6")
C6DP AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_6")
TNT1 AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_6")
C6DP AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_6")
TNT1 AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_6")
TNT1 A 0 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_6")
TNT1 A 0 A_FadeIn(0.5)
TNT1 A 0 A_GiveInventory("CountBombFlag", 1)
TNT1 A 0 A_SpawnItemEx("CountBombRespawnFX")
TNT1 A 0 A_Changeflag("Solid", 1)
Goto Spawn

StartTimer_10:
TNT1 A 0 A_SpawnItemEx("CountBombTop10",0,0,42)
TNT1 A 0 A_JumpIf(args[1]>=9,"Start9_10")
TNT1 A 0 A_JumpIf(args[1]==8,"Start8_10")
TNT1 A 0 A_JumpIf(args[1]==7,"Start7_10")
TNT1 A 0 A_JumpIf(args[1]==6,"Start6_10")
TNT1 A 0 A_JumpIf(args[1]==5,"Start5_10")
TNT1 A 0 A_JumpIf(args[1]==4,"Start4_10")
TNT1 A 0 A_JumpIf(args[1]==3,"Start3_10")
TNT1 A 0 A_JumpIf(args[1]==2,"Start2_10")
TNT1 A 0 A_JumpIf(args[1]==1,"Start1_10")
Goto Start3_10
Start9_10:
CXUP K 1 A_JumpIfInventory("CountBombFlag", 1, "Timer9_10")
loop
Start8_10:
CXUP J 1 A_JumpIfInventory("CountBombFlag", 1, "Timer8_10")
loop
Start7_10:
CXUP I 1 A_JumpIfInventory("CountBombFlag", 1, "Timer7_10")
loop
Start6_10:
CXUP H 1 A_JumpIfInventory("CountBombFlag", 1, "Timer6_10")
loop
Start5_10:
CXUP G 1 A_JumpIfInventory("CountBombFlag", 1, "Timer5_10")
loop
Start4_10:
CXUP F 1 A_JumpIfInventory("CountBombFlag", 1, "Timer4_10")
loop
Start3_10:
CXUP E 1 A_JumpIfInventory("CountBombFlag", 1, "Timer3_10")
loop
Start2_10:
CXUP D 1 A_JumpIfInventory("CountBombFlag", 1, "Timer2_10")
loop
Start1_10:
CXUP C 1 A_JumpIfInventory("CountBombFlag", 1, "Timer1_10")
loop
StartCount_10:
TNT1 A 0
Timer9_10:
CXDP K 10
CXDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer8_10:
CXDP J 10
CXDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer7_10:
CXDP I 10
CXDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer6_10:
CXDP H 10
CXDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer5_10:
CXDP G 10
CXDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer4_10:
CXDP F 10
CXDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer3_10:
CXDP E 10
CXDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer2_10:
CXDP D 10
CXDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer1_10:
CXDP C 10
CXDP A 2 A_PlaySoundEx("misc/BombCount","Voice")
Timer0_10:
CXDP L 10
CXDP A 0 A_GiveInventory("AtomicFireAmmo", 1)
CXDP ABABABAB 2
CXDP A 0 A_SpawnItemEx("CountbombExplodeX", 0, 0, 24, 0, 0, 0, 0, SXF_TRANSFERPOINTERS)
TNT1 A 15 A_ChangeFlag(SOLID, false)
CXDP A 0 A_TakeInventory("AtomicFireAmmo", 999)
Goto Respawn_10
Respawn_10:
TNT1 A 0
TNT1 A 0 A_TakeInventory("CutterFlag", 1)
TNT1 A 35
TNT1 A 0 A_JumpIfInventory("CutterFlag", 1, "Respawn_10")
TNT1 A 1 A_ClearTarget
TNT1 A 1 A_FadeOut(0.5)
RespawnTry_10:
TNT1 A 0 A_TakeInventory("CountBombFlag", 1)
TNT1 A 0 A_SpawnItemEx("CountBombDetectRespawn")
TNT1 A 1
CXDP AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_10")
TNT1 AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_10")
CXDP AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_10")
TNT1 AAAAAAAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_10")
CXDP AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_10")
TNT1 AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_10")
CXDP AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_10")
TNT1 AAAAA 1 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_10")
TNT1 A 0 A_JumpIfInventory("CountBombFlag", 1, "RespawnTry_10")
TNT1 A 0 A_FadeIn(0.5)
TNT1 A 0 A_GiveInventory("CountBombFlag", 1)
TNT1 A 0 A_SpawnItemEx("CountBombRespawnFX")
TNT1 A 0 A_Changeflag("Solid", 1)
Goto Spawn
}
}

actor CountBombDetect
{
PROJECTILE
+LOOKALLAROUND
+SKYEXPLODE
+DONTBLAST
+DONTREFLECT
+HITTRACER
Speed 0
Damage (0)
radius 32
height 5
scale 2.5
States
{
Spawn:
TNT1 A 2
loop
Death:
TNT1 A 0 A_TransferPointer(AAPTR_DEFAULT, AAPTR_TARGET, AAPTR_TRACER, AAPTR_TARGET)
TNT1 A 0 A_GiveToTarget("CountBombFlag", 1)
TNT1 A 20 A_PlaySoundEx("weapon/adapterreturn", "Body")
stop
}
}

actor CountBombDetectRespawn : CountBombDetect
{
	height 50
	radius 32
	-HITTRACER
	States
	{
	Spawn:
		TNT1 A 1 A_JumpIfInTargetInventory("CountBombFlag", 1, "End")
		loop
	Death:
		TNT1 A 0 A_GiveToTarget("CountBombFlag", 1)
	End:
		TNT1 A 0
		stop
	}
}

Actor CountBombFlag : Once {}

actor CountBombRespawnFX : BasicGraphicEffect
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_PlaySoundEx("misc/SpawnIn","Voice")
		TFOG A 3 
		TFOG CB 2
		stop
	}
}

actor CountBombClear
{
PROJECTILE
+LOOKALLAROUND
+SKYEXPLODE
+DONTBLAST
+THRUGHOST
Speed 0
Damage (255)
Damagetype "CountBombClear"
SelfObituary "$OB_COUNTBOMBRESPAWN"
radius 32
height 32
scale 2.5
States
{
Spawn:
TNT1 A 1
stop
Death:
TNT1 A 0
stop
}
}

actor CountBombTop
{
+NOGRAVITY
+MISSILE
scale 2.5
-SOLID
+DONTBLAST
states
{
Spawn:
CBTP A 2 A_JumpIfInTargetInventory("CountBombFlag", 1, "Pushed")
loop
Pushed:
CBTP B 1 A_JumpIfInTargetInventory("AtomicFireAmmo", 1, "Death")
loop
Death:
CBTP BCBCBCBC 2
stop
}
}

actor CountbombExplode8 : BasicHazardExplosion
{
	Obituary "$OB_COUNTBOMB8CREDIT"
	Damagetype "CountBomb"
	SelfObituary "$OB_COUNTBOMB"
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_PlaySoundEx("misc/mm3explosion","Voice")
		TNT1 E 1 A_JumpIf(true, "Explode")
		wait
	Credit:
		TNT1 A 0 A_SpawnItemEx("CountbombExplodeFX")
		TNT1 A 35 ACS_NamedExecuteWithResult("core_propexplode", 70, 96)
		stop
	NoCredit:
		TNT1 A 0 A_SpawnItemEx("CountbombExplodeFX")
		TNT1 A 35 A_Explode(70, 96, 0)
		stop
	}
}

actor HazardCredit_CountbombExplode8 : BasicACSDamager
{
	DamageType "CountBomb"
	SelfObituary "$OB_COUNTBOMB"
	Obituary "$OB_COUNTBOMB8CREDIT"
}

actor CountBombExplode6 : CountbombExplode8 {}
actor HazardCredit_CountBombExplode6 : HazardCredit_CountbombExplode8 { Obituary "$OB_COUNTBOMB6CREDIT" }

actor CountBombExplodeX : CountbombExplode8 {}
actor HazardCredit_CountBombExplodeX : HazardCredit_CountbombExplode8 { Obituary "$OB_COUNTBOMBXCREDIT" }

actor CountbombExplodeFX : ExplosionEffect2
{
	var int user_NoTranslation;
}

actor CountBombTop6 : CountBombTop
{
states
{
Spawn:
C6TP A 2 A_JumpIfInTargetInventory("CountBombFlag", 1, "Pushed")
loop
Pushed:
C6TP B 1 A_JumpIfInTargetInventory("AtomicFireAmmo", 1, "Death")
loop
Death:
C6TP BCBCBCBC 2
stop
}
}

actor CountBombTop10 : CountBombTop6
{
states
{
Spawn:
CXTP A 2 A_JumpIfInTargetInventory("CountBombFlag", 1, "Pushed")
loop
Pushed:
CXTP B 1 A_JumpIfInTargetInventory("AtomicFireAmmo", 1, "Death")
loop
Death:
CXTP BCBCBCBC 2
stop
}
}

actor Ururuun 11680
{
//$Category MM8BDM-Props
	-SOLID
	+NOGRAVITY
	+LOOKALLAROUND
	+AMBUSH
	+QUICKTORETALIATE
	+FORCEYBILLBOARD
	//+CLIENTSIDEONLY
	speed 0
	height 16
	radius 16
	scale 2.5
	States
	{
		Spawn:
		URUR ABC 2
		URUR A 0 A_Look//A_LookEx(LOF_NOSOUNDCHECK, 0, 1000, 0, 0, "Awaken")
		loop
		See:
		URUR ABC 2 A_JumpIfCloser(1000, "Open")
		Goto Spawn
		Open:
		URUR DEFDEF 2
		Awake:
		URUR GHIGHIGHI 2
		URUR G 0 A_JumpIfCloser(1000, "Awake")
		URUR GHI 2
		goto Sleep
		Sleep:
		URUR DEFDEF 2 
		goto Spawn
	}
}
