actor MagicCardBoss : BaseMM8BDMWep_CBM 
{
dropitem "MagicCardWepCDropped"
Weapon.AmmoUse 150
Weapon.AmmoGive 600
Weapon.SlotNumber 1
Obituary "$OB_MAGICCARD"
Inventory.Pickupmessage "Magic... away!"
weapon.ammotype "SnortSnortAmmo"
inventory.icon "MAGII"
States
{
Spawn:
C_0B F 1
loop//MCAR X 1
Ready:
MGCH A 0 ACS_ExecuteAlways(998,0,927)
MGCH A 0 //A_GunFlash
MGCH A 0 A_JumpIfInventory("MagicCardCooldown",1,"Ready1")
MGCH A 0 A_JumpIfInventory("SnortSnortAmmo",150,"Ready2")
Ready1:
MGCH A 1 A_WeaponReady(WRF_NOPRIMARY)
MGCH A 0 A_GiveInventory("SnortSnortAmmo",3)
Goto Ready+2
Ready2:
MGCH A 0 A_WeaponReady(WRF_NOSECONDARY)
MGCH A 1 A_WeaponReady
MGCH A 0 A_GiveInventory("SnortSnortAmmo",3)
goto Ready2
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
MGCH A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
MGCH A 1 A_Raise
Loop
Fire:
MCAR A 0 A_JumpIfInventory("IsBot",1,"BotFire")
MGCH A 0 A_PlaySoundEx("weapon/magiccard","Weapon")
MCAR A 0 A_GiveInventory("MagicmanMain1_CI",1)
MCAR A 0 A_GiveInventory("MagicmanMain3_CI",1)
MCAR A 0 A_GunFlash
MGCH A 0 A_GiveInventory("MagicCardCooldown",1)
goto CardNotThrow
AltFire:
MGCH A 0 A_PlaySoundEx("weapon/magiccard","Weapon")
MCAR A 0 A_GiveInventory("MagicmanMain2_CI",1)
MCAR A 0 A_GiveInventory("MagicmanMain3_CI",1)
CardNotThrow:
MGCH BBCC 1 A_GiveInventory("SnortSnortAmmo",2)
MGCH BBAAA 1 A_GiveInventory("SnortSnortAmmo",2)
MGCH A 1 A_GiveInventory("SnortSnortAmmo",2)
Goto Ready+2
NoAmmo:
MGCH A 0
Goto Ready+2
Flash:
MGCH JKLMEFFFNOPQR 1
stop

BotFire:
MCAR A 0 A_Jump(192,"Altfire")
MCAR A 0 A_GiveInventory("SnortSnortAmmo",100)
goto Fire+1
}
}

actor MagicCardBosB : BaseMM8BDMWep_CBM//MagicCardBoss
{
dropitem "MagicCardWepCDropped"
inventory.icon "MAGII2"
Weapon.AmmoUse 300
Weapon.AmmoGive 600
Weapon.AmmoUse2 300
Weapon.AmmoGive2 600
Weapon.SlotNumber 2
Obituary "$OB_MAGICCARD"
Inventory.Pickupmessage "Magic... away!"
weapon.ammotype "SnortSnortAmmo"
weapon.ammotype2 "SnortSnortAmmo"
States
{
Spawn:
C_0B F 1
loop//MGB8 X 1
Ready:
MGKH A 0 ACS_ExecuteAlways(998,0,927)
MGKH A 0 //A_GunFlash
MGKH A 0 A_JumpIfInventory("SnortSnortAmmo",300,"Ready2")
MGKH A 2 A_WeaponReady(WRF_NOFIRE)
MGKH A 0 A_GiveInventory("SnortSnortAmmo",6)
Goto Ready+2
Ready2:
MGKH A 2 A_WeaponReady
MGKH A 0 A_GiveInventory("SnortSnortAmmo",6)
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
MGKH A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
MGKH A 1 A_Raise
Loop

Fire:
MGKH A 0 A_JumpIfNoAmmo("NoAmmo")
MGKH B 0 A_JumpIfInventory("IsBot",1,"BotFire")
MGKH B 0 A_GunFlash
MGKH BB 1 A_TakeInventory("SnortSnortAmmo",40)
MGKH B 0 A_TakeInventory("FakeMagicFlag",99)
goto BallThrow

Altfire:
MGKH A 0 A_JumpIfNoAmmo("NoAmmo")
MGKH BB 1 A_TakeInventory("SnortSnortAmmo",40)
MGKH B 0 A_GiveInventory("FakeMagicFlag",1)
goto BallThrow

BallThrow:
MGKH B 0 A_TakeInventory("MagicBallEndFix",99)
MGKH B 0 A_TakeInventory("MagicBallEnd",99)
MGKH CCBB 1 A_TakeInventory("SnortSnortAmmo",40)
MGKH CC 1 A_TakeInventory("SnortSnortAmmo",30)
MGKH B 0 A_PlaySound("weapon/MagicShot",1,1.0)
MGKH B 0 A_SpawnItemEx("MagicBallEmergency",0,0,28)
MGKH B 0 A_SpawnItemEx("MagicHologram",0,0,0,0,0,0,0,1,0)
MGKH B 0 A_SpawnItemEx("MagicBall",cos(-pitch)*0,0,28+sin(-pitch),cos(-pitch)*20,0,sin(-pitch)*20,0,33,0)
MGKH B 0 A_Stop
//MGKH B 0 A_SetTranslucent(0.0,0)

MGKH B 0 A_ChangeFlag("NONSHOOTABLE",1)
MGKH B 0 A_ChangeFlag("INVULNERABLE",1)
MGKH B 0 A_GiveInventory("IsInvunFlag",1)

//MGKH B 0 A_ChangeFlag("SHOOTABLE",0)
MGKH B 0 A_ChangeFlag("NOTELEPORT",1)
//MGKH B 0 A_ChangeFlag("NONSHOOTABLE",1)
MGKH B 0 A_ChangeFlag("SOLID",0)
MGKH B 0 A_TakeInventory("UnSolid",1)
MGKH B 1 A_ChangeFlag("PICKUP",0)
goto InvisibleLoop

InvisibleLoop:
MGKH B 1// A_SetTranslucent(0.0,0)
//MGKH B 0 A_JumpIfInventory("ProjectilePorting",1,"InvisibleLoop2")
MGKH B 0 A_JumpIfInventory("MagicBallEnd",1,"InvisibleEnd")

//goto InvisibleEnd
//InvisibleLoop2:
MGKH C 1// A_SetTranslucent(0.0,0)
MGKH B 0 A_JumpIfInventory("MagicBallEnd",1,"InvisibleEnd")
//MGKH C 0 A_JumpIfInventory("ProjectilePorting",1,"InvisibleLoop")
loop

InvisibleEnd:
MGKH C 1 A_GiveInventory("MagicBallEnd",1)
MGKH C 0 //A_SetTranslucent(0.25,0)
//MGKH C 0 A_ChangeFlag("SHOOTABLE",1)

MGKH C 0 A_ChangeFlag("NONSHOOTABLE",0)
MGKH C 0 A_ChangeFlag("INVULNERABLE",0)
MGKH C 0 A_TakeInventory("IsInvunFlag",1)

//MGKH C 0 A_ChangeFlag("NONSHOOTABLE",0)
MGKH C 0 A_ChangeFlag("PICKUP",1)
MGKH C 0 A_ChangeFlag("NOTELEPORT",0)
MGKH C 0 A_SpawnItemEx("ReSolidifier")
MGKH C 0 A_JumpIfInventory("IsBot",1,"BotFire2")
goto BallEnd2
BallEnd2:
MGKH CBA 2
MGKH BA 2
MGKH A 0 A_TakeInventory("ProjectilePortDead",9)
MGKH A 12
Goto Ready+2
NoAmmo:
MGKH A 1
Goto Ready+2
Flash:
MGKH STUVWXYZ 1
stop

BotFire:
MGKH A 0 A_Jump(128,"Altfire")
goto Fire2
BotFire2:
MGKH A 0 A_SelectWeapon("MagicCardBoss")
goto Ready+2

}
}

actor SnortSnortAmmo : Ammo
{
+INVENTORY.IGNORESKILL
inventory.amount 1
inventory.maxamount 600
}

actor MagicCardCooldown : Powerup
{
Powerup.Duration 22
}

actor MagicBallEnd : OnceC{}
actor MagicBallEndFix : OnceC{}
actor FakeMagicFlag : OnceC{}

actor MagicCardB
{
translation "192:192=216:216","198:198=3:3"
PROJECTILE
Damagetype "MagicCard" 
Obituary "$OB_MAGICCARD"
+NOCLIP
+NOINTERACTION
+THRUGHOST
+NOTARGETSWITCH
+DONTREFLECT
+SEEKERMISSILE
ReactionTime 70
damage (0)
Radius 5
Height 5
speed 50
scale 2.5
States
{
Spawn:
MCAR M 0
MCAR M 0 A_RearrangePointers(0,0,2)
MCAR MM 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,momx,momy,momz,0,8)
MCAR NNOOOOOO 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,momx,momy,momz,0,8)
MCAR P 0 A_ScaleVelocity(0.5)
MCAR PP 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,momx,momy,momz,0,8)
MCAR P 0 A_ScaleVelocity(0.5)
MCAR QQ 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,momx,momy,momz,0,8)
MCAR Q 0 A_ScaleVelocity(-2.0)
MCAR RR 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,momx,momy,momz,0,8)
//MCAR R 0 A_SpawnItemEx("ReturningMagicCardB",0,0,0,0,0,0,0,1)
goto Spawn2
/*
MCAR A 0
MCAR AA 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,2,0,0)
MCAR BBCCCCCC 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,2,0,0)
MCAR D 0 A_ScaleVelocity(0.5)
MCAR DD 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,2,0,0)
MCAR D 0 A_ScaleVelocity(0.5)
MCAR EE 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,2,0,0)
MCAR D 0 A_ScaleVelocity(-2.0)
MCAR FF 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,2,0,0)
MCAR A 0 A_CustomMissile("ReturningMagicCardB",0,0,0,0)
stop
*/


Spawn2:
MCAR N 0
MCAR N 0 A_FaceTarget
goto Spawn3
Spawn3:
MCAR N 0
MCAR N 0 A_JumpIfCloser(64,"Death")
MCAR NN 0 A_SeekerMissile(90,90,2)
MCAR NN 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,momx,momy,momz,0,8)
MCAR N 0 A_JumpIfCloser(64,"Death")
MCAR OO 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,momx,momy,momz,0,8)
MCAR O 0 A_JumpIfCloser(64,"Death")
MCAR PP 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,momx,momy,momz,0,8)
MCAR P 0 A_JumpIfCloser(64,"Death")
MCAR QQ 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,momx,momy,momz,0,8)
MCAR Q 0 A_JumpIfCloser(64,"Death")
MCAR RR 1 A_SpawnItemEx("MagicCardDamagerB",0,0,0,momx,momy,momz,0,8)
MCAR R 0 A_JumpIfCloser(64,"Death")

MCAR N 0 A_CountDown
MCAR N 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
loop
Death:
MCAR M 0
Stop
}
}

actor MagicCardBB : MagicCardB{translation "192:192=205:205","198:198=74:74"}
actor MagicCardBR : MagicCardB{translation "192:192=171:171","198:198=41:41"}
actor MagicCardBO : MagicCardB{translation "192:192=104:104","198:198=128:128"}
actor MagicCardBP : MagicCardB{translation "192:192=229:229","198:198=232:232"}

actor MagicCardBF : MagicCardB
{
translation "192:192=216:216","198:198=3:3"
States
{
Spawn:
MCAR M 0
MCAR M 0 A_RearrangePointers(0,0,2)
MCAR MM 1 A_SpawnItemEx("MagicCardDamagerBF",0,0,0,momx,momy,momz,0,8)
MCAR NNOOOOOO 1 A_SpawnItemEx("MagicCardDamagerBF",0,0,0,momx,momy,momz,0,8)
MCAR P 0 A_ScaleVelocity(0.5)
MCAR PP 1 A_SpawnItemEx("MagicCardDamagerBF",0,0,0,momx,momy,momz,0,8)
MCAR P 0 A_ScaleVelocity(0.5)
MCAR QQ 1 A_SpawnItemEx("MagicCardDamagerBF",0,0,0,momx,momy,momz,0,8)
MCAR Q 0 A_ScaleVelocity(-2.0)
MCAR RR 1 A_SpawnItemEx("MagicCardDamagerBF",0,0,0,momx,momy,momz,0,8)
goto Spawn2
Spawn2:
MCAR N 0 A_FaceTarget
goto Spawn3
Spawn3:
MCAR N 0
MCAR N 0 A_JumpIfCloser(64,"Death")
MCAR NN 0 A_SeekerMissile(90,90,2)
MCAR NN 1 A_SpawnItemEx("MagicCardDamagerBF",0,0,0,momx,momy,momz,0,8)
MCAR N 0 A_JumpIfCloser(64,"Death")
MCAR OO 1 A_SpawnItemEx("MagicCardDamagerBF",0,0,0,momx,momy,momz,0,8)
MCAR O 0 A_JumpIfCloser(64,"Death")
MCAR PP 1 A_SpawnItemEx("MagicCardDamagerBF",0,0,0,momx,momy,momz,0,8)
MCAR P 0 A_JumpIfCloser(64,"Death")
MCAR QQ 1 A_SpawnItemEx("MagicCardDamagerBF",0,0,0,momx,momy,momz,0,8)
MCAR Q 0 A_JumpIfCloser(64,"Death")
MCAR RR 1 A_SpawnItemEx("MagicCardDamagerBF",0,0,0,momx,momy,momz,0,8)
MCAR R 0 A_JumpIfCloser(64,"Death")

MCAR N 0 A_CountDown
MCAR N 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
loop
Death:
MCAR M 0
Stop
}
}


actor MagicCardBFB : MagicCardBF{translation "192:192=205:205","198:198=74:74"}
actor MagicCardBFR : MagicCardBF{translation "192:192=171:171","198:198=41:41"}
actor MagicCardBFO : MagicCardBF{translation "192:192=104:104","198:198=128:128"}
actor MagicCardBFP : MagicCardBF{translation "192:192=229:229","198:198=232:232"}

actor MagicCardDamagerB : MagicCardDamager
{
Damagetype "MagicCardB" 
//Damage (12)
States
{
Spawn:
TNT1 A 1
stop
}
}


actor MagicCardProtectC : PowerProtection
{
Powerup.Duration 5
DamageFactor "MagicCardB", 0.0
}


actor MagicCardDamagerBF : MagicCardDamagerB
{
Damagetype "MagicCardBF"
Obituary "$OB_FAKEMAGICCARD"
Damage (1)
+PIERCEARMOR
}

actor MagicBall
{
translation "199:199=176:176","202:202=218:218"
PROJECTILE
Damagetype "MagicCard"
Obituary "$OB_MAGICBALL"
+DONTBLAST
+DONTREFLECT
+THRUGHOST
+SKYEXPLODE
-NOGRAVITY
Gravity 0.50
ReactionTime 30
Damage (0)
Radius 16
Height 56
Speed 20
scale 2.5
states
{
Spawn:
MGB8 M 0
MGB8 M 0 ACS_ExecuteAlways(815,0,200)//200
MGB8 M 0 ThrustThingZ(0,20,0,1)
MGB8 M 0 A_GiveToTarget("MagicBallPickupSync",1)
MGB8 M 1 A_JumpIfInTargetInventory("MagicBallEnd",1,"Death")
MGB8 M 0 A_GiveToTarget("MagicBallPickupSync",1)
MGB8 M 1 A_JumpIfInTargetInventory("MagicBallEnd",1,"Death")
goto Spawn2+2
Spawn2:
MGB8 MMNNOOPP 1 A_JumpIfInTargetInventory("MagicBallEnd",1,"Death")
MGB8 M 0 A_CountDown
loop
Death:
TNT1 A 0 A_GiveInventory("ProjectilePortDead",1)
TNT1 A 0 A_ChangeFlag("NOINTERACTION",1)
TNT1 A 0 A_Stop
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
TNT1 A 0 A_GiveToTarget("MagicBallEnd",1)
TNT1 A 0 //A_GiveToTarget("MagicBallPickupSync2",1)
TNT1 A 0 //A_PlaySound("weapon/napalm",1,1.0)
TNT1 A 0 A_SpawnItemEx("MagicFirework",0,0,9,0,0,12)
TNT1 A 0 A_SpawnItemEx("MagicBallFX",0,0,0,0,0,0,0,1)
TNT1 A 0 A_JumpIfInTargetInventory("FakeMagicFlag",1,"Death2")
TNT1 A 0 A_SpawnItemEx("MagicBallExplosion",0,0,16)
TNT1 AA 1 A_GiveToTarget("MagicBallPickupSync2",1)
stop
Death2:
TNT1 A 2 A_SpawnItemEx("MagicBallExplosion2",0,0,16)
TNT1 AA 1 A_GiveToTarget("MagicBallPickupSync2",1)
stop
}
}

actor MagicBallEmergency : MagicBall
{
+NOINTERACTION
+NOGRAVITY
Radius 2
Height 2
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("MagicBallPickupSync",1)
Spawn2:
TNT1 AAAAAAAA 1 A_JumpIfInTargetInventory("MagicBallEnd",1,"Death3")
TNT1 A 0 A_CountDown
loop
Death:
TNT1 A 0 A_GiveToTarget("MagicBallEndFix",1)
goto Death3
Death3:
TNT1 A 0 A_GiveToTarget("MagicBallEnd",1)
TNT1 AA 1 A_GiveToTarget("MagicBallPickupSync2",1)
stop
}
}

actor MagicBallExplosion : BasicExplosion
{
Damagetype "MagicCard"//ClassPain
Obituary "$OB_MAGICBALL"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(10,64,0,0,16)
stop
}
}

actor MagicBallExplosion2 : MagicBallExplosion
{
Obituary "$OB_FAKEMAGICBALL"
}

actor MagicBallPickupSync : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SetTranslucent(0.0,0)
stop
}
}

actor MagicBallPickupSync2 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SetTranslucent(1.0,0)
stop
}
}

actor MagicBallB : MagicBall{translation "199:199=74:74","202:202=205:205"}
actor MagicBallR : MagicBall{translation "199:199=41:41","202:202=171:171"}
actor MagicBallO : MagicBall{translation "199:199=128:128", "202:202=104:104"}
actor MagicBallP : MagicBall{translation "199:199=232:232", "202:202=229:229"}

actor MagicFirework
{
-SOLID
+NOGRAVITY
+NOINTERACTION
scale 2.5
States
{
Spawn:
DOMP G 2
DOMP G 0 A_Stop
DOMP H 4 A_SpawnItemEx("MagicFireworkExp",random(-15,15),random(-15,15),10)
DOMP H 4 A_SpawnItemEx("MagicFireworkExp",random(-15,15),random(-15,15),0)
DOMP H 4 A_SpawnItemEx("MagicFireworkExp",random(-15,15),random(-15,15),-10)
stop
}
}

actor MagicFireworkExp
{
-SOLID
scale 2.0
+NOGRAVITY
+NOINTERACTION
States
{
Spawn:
DOMP IJKLMN 4
stop
}
}

actor MagicBallFX
{
-SOLID
+NOGRAVITY
+NOINTERACTION
Scale 2.5
radius 0
height 0
States
{
Spawn:
MGB8 Q 2
TNT1 A 2
MGB8 R 2
TNT1 A 2
MGB8 S 2
TNT1 A 2
MGB8 T 2
stop
}
}

actor MagicBirdsSound : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySound("weapon/MagicBirds",1,1.0)
stop
}
}

actor MagicHomingBirds
{
Translation "195:195=4:4", "204:204=212:212"
PROJECTILE
+DONTSEEKINVISIBLE//
+SEEKERMISSILE
Radius 6
Height 5
scale 2.0
damagetype "ClassPainLess"
Obituary "$OB_MAGICBIRD"
damage (3)
speed 19
reactiontime 10
States
{
Spawn:
TNT1 A 1
Spawn2:
MGB8 AAABBBCCCDDD 1 A_SeekerMissile(1,4,3,64,3)
MGB8 A 0 A_CountDown
loop
Death:
MMFX BCDE 2
stop
}
}

actor ConfettiMagic : Confetti
{
+THRUGHOST
}

actor ConfettiMagicSpawner : ConfettiSpawner
{
ReactionTime 10//10
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_PlaySoundEx("misc/partyball", 1)
goto Spawn2
Spawn2:
TNT1 AAA 0 A_SpawnItemEx("ConfettiMagic",random(-16, 16),random(-16, 16),Random(8, 16),random(-3,3), random(-3,3), random(1,-1),0)
TNT1 A 1 A_CountDown
Loop
}
}

actor ConfettiPickup : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("ConfettiMagicSpawner",0,0,28)
stop
}
}

actor MagicHologram
{
var int user_TID;
-SOLID
+NOGRAVITY
+DONTBLAST
+DONTREFLECT
+THRUACTORS
//+NOINTERACTION
height 56
radius 16
scale 2.5
renderstyle translucent
alpha 0.5
States
{
Spawn:
MGIC G 0
Spawn2:
MGIC G 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
MGIC G 0 A_JumpIfInTargetInventory("MagicBallEnd",1,"End")
MGIC G 1
loop
End:
TNT1 A 0 A_JumpIfInTargetInventory("MagicBallEndFix",1,2)
TNT1 A 0 A_JumpIfInTargetInventory("FakeMagicFlag",1,"TeleportBack")
TNT1 A 0 A_GiveInventory("ConfettiPickup",1)
TNT1 A 0 A_GiveToTarget("ConfettiPickup",1)
TNT1 A 0 A_GiveToTarget("MagicTeleportScaleV",1)
EndBirds:
TNT1 A 0 A_ChangeFlag("MISSILE",1)
TNT1 A 0 //ACS_ExecuteAlways(790,0)
TNT1 A 0 A_GiveInventory("MagicBirdAttack",1)
goto Death
TeleportBack:
TNT1 A 0 A_GiveToTarget("MagicBirdAttack2",1)
TNT1 A 0 A_GiveToTarget("MagicTeleportScaleV",1)
//TNT1 A 1
//TNT1 A 0 Thing_Move(ACS_ExecuteWithResult(257,0),0,1)
TNT1 A 0 A_SetUserVar("user_TID",ACS_ExecuteWithResult(257,0))
TNT1 A 0 Thing_ChangeTID(0,user_TID+600)
TNT1 A 0 Thing_Move(user_TID,TID,1)
TNT1 A 0 A_GiveToTarget("Nudge",1)
//TNT1 A 0 Thing_ChangeTID(0,0)
goto Death
Death:
TNT1 A 1
stop
}
}

actor MagicHologramBirds : MagicHologram
{
States
{
Spawn:
TNT1 A 0 
goto EndBirds
}
}

actor MagicBirdAttack2 : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("MagicHologramBirds",0,0,0,0,0,0,0,1,0)
stop
}
}

actor MagicTeleportScaleV : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_ScaleVelocity(0.1)
stop
}
}

actor MagicBirdAttack : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("MagicBirdsSound",0,0,16)
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("MagicHomingBirds",4,0,70,16,0,0.65,0,1)
TNT1 A 0 A_SpawnItemEx("MagicHomingBirds",4,28,42,16,0,0.35,-4,1)
TNT1 A 0 A_SpawnItemEx("MagicHomingBirds",4,-28,42,16,0,0.35,4,1)
TNT1 A 0 A_SpawnItemEx("MagicHomingBirds",4,0,28,16,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("MagicHomingBirds",4,28,14,16,0,-0.35,-4,1)
TNT1 A 0 A_SpawnItemEx("MagicHomingBirds",4,-28,14,16,0,-0.35,4,1)
TNT1 A 0 A_SpawnItemEx("MagicHomingBirds",4,0,-14,16,0,-0.65,0,1)
//SpawnItemEx Simulation of the below
//TNT1 A 0 A_CustomMissile("MagicHomingBirds",70,0,0,2,2)
//TNT1 A 0 A_CustomMissile("MagicHomingBirds",42,28,-4,2,1)
//TNT1 A 0 A_CustomMissile("MagicHomingBirds",42,-28,4,2,1)
//TNT1 A 0 A_CustomMissile("MagicHomingBirds",28,0,0,2,0)
//TNT1 A 0 A_CustomMissile("MagicHomingBirds",14,28,-4,2,-1)
//TNT1 A 0 A_CustomMissile("MagicHomingBirds",14,-28,4,2,-1)
//TNT1 A 0 A_CustomMissile("MagicHomingBirds",-14,0,0,2,-2)
stop
}
}

actor MagicmanMain1_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("MagicCardB",0,1,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("MagicCardBB",0,1,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("MagicCardBR",0,1,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("MagicCardBO",0,1,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("MagicCardBP",0,1,0,0)
goto Done
}
}

actor MagicmanMain2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("MagicCardBF",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("MagicCardBFB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("MagicCardBFR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("MagicCardBFO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("MagicCardBFP",0,0,0,0)
goto Done
}
}


actor MagicmanMain3_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("MagicCardBF",(random(0,1)*2-1)*random(1,10),0,0,0,0,(random(0,1)*2-1)*random(1,10))
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("MagicCardBFB",(random(0,1)*2-1)*random(1,10),0,0,0,0,(random(0,1)*2-1)*random(1,10))
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("MagicCardBFR",(random(0,1)*2-1)*random(1,10),0,0,0,0,(random(0,1)*2-1)*random(1,10))
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("MagicCardBFO",(random(0,1)*2-1)*random(1,10),0,0,0,0,(random(0,1)*2-1)*random(1,10))
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("MagicCardBFP",(random(0,1)*2-1)*random(1,10),0,0,0,0,(random(0,1)*2-1)*random(1,10))
goto Done
}
}
