actor WilyGun : BaseMM8BDMWep_CBM
{
dropitem "CopyClassUpgradeDropped"
weapon.preferredskin "Base-Wily"
Weapon.AmmoUse 1
Weapon.AmmoGive 0
Weapon.SlotNumber 1
Obituary "$OB_WILYPAN"
weapon.ammotype "PlasmaAmmo"
States
{
Spawn:
C_02 I 1
loop
Ready:
WICH J 0 ACS_ExecuteAlways(998,0,748)
WICH J 0 A_GunFlash
WICH J 0 A_JumpIfInventory("PlasmaAmmo",2,"Ready2")
WICH J 5 A_WeaponReady(WRF_NOPRIMARY)
WICH J 0 A_GiveInventory("CapsuleAmmo",1)
WICH J 0 A_GiveInventory("PlasmaAmmo",1)
WICH J 0 A_JumpIfInventory("CapsuleAmmo",28,"Transform")
Goto Ready+2
Ready2:
WICH J 5 A_WeaponReady
WICH J 0 A_GiveInventory("CapsuleAmmo",1)
WICH J 0 A_GiveInventory("PlasmaAmmo",1)
WICH J 0 A_JumpIfInventory("CapsuleAmmo",28,"Transform")
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
WICH J 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
WICH J 1 A_Raise
Loop
Fire:
TNT1 A 0 A_JumpIfInventory("SecondSwing",1,"FireReady")
TNT1 A 0 A_JumpIfInventory("PlasmaAmmo",2,"Fire2")
goto NoAmmo
Fire2:
WICH J 0 A_PlaySoundEx("weapon/mbuster","Weapon")
WICH J 0 A_GiveInventory("DrWilyMain_CI",1)
WICH J 0 A_TakeInventory("PlasmaAmmo",2)
WICH KL 3
WICH J 14
WICH J 0// A_Refire
goto Ready+2
FireReady:
WICH J 1 OffSet(6,92)A_TakeInventory("SecondSwing",99)
WICH J 1 OffSet(3,62)
WICH J 1 A_WeaponReady(14)
goto Ready+2

Altfire:
WICH J 0 A_JumpIfInventory("SecondSwing",1,"Altfire2")
WICH J 1 OffSet(3,62)
WICH J 1 OffSet(6,92)
WICH O 0 A_PlaySoundEx("B_Toad/Swipe","Weapon")
WICH O 0 A_TakeInventory("CapsuleAmmo",1)
WICH O 2 OffSet(20,34)
WICH O 2 OffSet(35,46)A_GiveInventory("DrWilyAltX_CI",1)
WICH O 2 OffSet(51,57)
WICH O 2 OffSet(67,68)
WICH O 2 OffSet(83,79)
WICH P 2 OffSet(75,85)
WICH P 2 OffSet(90,104)
WICH P 2 OffSet(106,130)
WICH P 2 OffSet(123,158)
WICH P 2 OffSet(141,188)
TNT1 A 4 A_GiveInventory("SecondSwing",15)
goto AltfireReady
AltfireReady:
TNT1 A 0 A_TakeInventory("SecondSwing",1)
TNT1 A 1 A_WeaponReady
TNT1 A 0 A_JumpIfInventory("SecondSwing",2,"AltfireReady")
goto FireReady
Altfire2:
WICH M 0 A_TakeInventory("CapsuleAmmo",1)
WICH M 2 OffSet(-36,50)A_PlaySoundEx("B_Toad/Swipe","Weapon")
WICH M 2 OffSet(-66,35)A_GiveInventory("DrWilyAltX2_CI",1)
WICH M 2 OffSet(-94,24)
WICH M 2 OffSet(-122,22)
WICH M 2 OffSet(-152,20)
WICH N 2 OffSet(-132,28)
WICH N 2 OffSet(-174,50)
WICH N 2 OffSet(-202,74)
WICH N 2 OffSet(-230,102)
WICH N 2 OffSet(-260,136)
TNT1 A 6 A_TakeInventory("SecondSwing",99)
WICH J 1 OffSet(6,92)
WICH J 1 OffSet(3,62)
WICH J 1 A_WeaponReady(14)
goto Ready+2

NoAmmo:
WICH J 0
Goto Ready+2
Transform:
WICH J 0 A_GiveInventory("WilySkullSuit_Pickup",1)
WICH J 1
Loop
Flash:
TNT1 A 1
stop
}
}

/*actor AlienTransformItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "SSIcon"//AlieIcon//ALIEN
scale 2.0
+COUNTITEM
+INVBAR
states
{
Spawn:
WICH V 1
//WICH U 1//SUIT
loop
loop
Use:
TNT1 A 1 A_GiveInventory("AlienTransform",1)
stop
}
}*/

actor WilySkullSuit_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("SkullSuitWep",1)

TNT1 A 0 A_TakeInventory("WilyGun",1)
TNT1 A 0 A_TakeInventory("CapsuleAmmo",28)
TNT1 A 0 A_GiveInventory("WilyCapsuleItem",1)

TNT1 A 0 A_TakeInventory("GuardDownFlag",99)
TNT1 A 0 A_TakeInventory("WilyNoSuitWeakness",99)
TNT1 A 0 A_TakeInventory("GlassHealthBar",999)
TNT1 A 0 A_GiveInventory("LightHealthBar",1)
stop
}
}

actor WilyCapsule_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 //A_JumpIf(ACS_ExecuteWithResult(975,0)==2,"Death")
TNT1 A 0 SetPlayerProperty(0,1,3)
TNT1 A 0 A_GiveInventory("CapsuleFireWep",1)
TNT1 A 0 A_GiveInventory("CapsuleIceWep",1)

TNT1 A 0 A_TakeInventory("WilyGun",1)
TNT1 A 0 A_TakeInventory("SkullSuitWep",1)
TNT1 A 0 A_TakeInventory("WilyCapsuleItem",1)

TNT1 A 0 A_GiveInventory("WilySandalsItem",1)
TNT1 A 0 A_TakeInventory("WilyNoSuitWeakness",99)
TNT1 A 0 A_TakeInventory("GlassHealthBar",999)
TNT1 A 0 A_GiveInventory("LightHealthBar",1)
stop
}
}

actor WilySandals_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 SetPlayerProperty(0,0,3)
TNT1 A 0 A_GiveInventory("WilyGun",1)

TNT1 A 0 A_TakeInventory("SkullSuitWep",1)
TNT1 A 0 A_TakeInventory("CapsuleFireWep",1)
TNT1 A 0 A_TakeInventory("CapsuleIceWep",1)
TNT1 A 0 A_TakeInventory("WilySandalsItem",1)
TNT1 A 0 A_TakeInventory("PlasmaAmmo",28)
TNT1 A 0 A_TakeInventory("CapsuleAmmo",28)
TNT1 A 0 A_TakeInventory("WilyCapsuleFlagDelay",999)


TNT1 A 0 A_GiveInventory("GuardDownFlag",1)
TNT1 A 0 A_GiveInventory("WilyNoSuitWeakness",1)
TNT1 A 0 A_TakeInventory("LightHealthBar",999)
TNT1 A 0 A_GiveInventory("GlassHealthBar",1)
stop
}
}

actor WilyCapsuleItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "CapIcon"
scale 2.0
inventory.pickupmessage "Wily Capsule, only 7 payments of $19.95."
+COUNTITEM
+INVBAR
states
{
Spawn:
WICH T 1
loop
Use:
TNT1 A 0 A_JumpIfInventory("CapsuleAmmo",28,"Use2")
fail
Use2:
TNT1 A 1 A_GiveInventory("WilyCapsule_Pickup",1)
stop
}
}

actor WilySandalsItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "WilyIcon"
scale 2.0
inventory.pickupmessage "Picked up Ninja Wily Item."
+COUNTITEM
+INVBAR
states
{
Spawn:
WICH S 1
loop
Use:
TNT1 A 0 A_TakeInventory("WilyCapsuleFlagDelay",999)
TNT1 A 1 A_GiveInventory("WilySandals_Pickup",1)
stop
}
}

actor SkullSuitWep : BaseMM8BDMWep_CBM
{
dropitem "CopyClassUpgradeDropped"
weapon.preferredskin "SkullSuit-Wily"
Weapon.AmmoUse 1
Weapon.AmmoGive 0
Weapon.AmmoUse2 1
Weapon.AmmoGive2 0
Weapon.SlotNumber 1
Obituary "$OB_WILYSKULL"
weapon.ammotype "PlasmaAmmo"
weapon.ammotype2 "PlasmaAmmo"
+WEAPON.Alt_AMMO_OPTIONAL
States
{
Spawn:
C_02 I 1
loop
Ready:
WICH G 0 ACS_ExecuteAlways(998,0,749)
WICH G 0 A_GunFlash
WICH G 0 A_JumpIfInventory("CapsuleAmmo",1,"Ready2")
WICH G 2 A_WeaponReady(WRF_NOSECONDARY)
WICH G 0 A_JumpIfInventory("CapsuleAmmo",1,"Ready2")
WICH G 2 A_WeaponReady(WRF_NOSECONDARY)
WICH G 0 A_JumpIfInventory("CapsuleAmmo",1,"Ready2")
WICH G 2 A_WeaponReady(WRF_NOSECONDARY)
WICH G 0 A_JumpIfInventory("CapsuleAmmo",1,"Ready2")
WICH G 2 A_WeaponReady(WRF_NOSECONDARY)
WICH G 0 A_GiveInventory("PlasmaAmmo",2)
Goto Ready+2
Ready2:
WICH G 8 A_WeaponReady
WICH G 0 A_GiveInventory("PlasmaAmmo",2)
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
WICH G 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
WICH G 1 A_Raise
Loop
Fire:
WICH G 0 A_JumpIfInventory("PlasmaAmmo",26,"Fire1")
WICH G 0 A_JumpIfInventory("PlasmaAmmo",14,"Fire2")
WICH G 0 A_JumpIfInventory("PlasmaAmmo",1,"Fire3")
WICH G 0 A_PlaySoundEx("weapon/mbuster","Weapon")
WICH G 0 A_GiveInventory("DrWilyAlt4_CI",1)
WICH HI 3
WICH G 2
WICH G 0 A_Refire
goto Ready+2
Fire1:
WICH G 0 A_PlaySoundEx("weapon/wilyshot4","Weapon")
WICH G 0 A_GiveInventory("DrWilyAlt1_CI",1)
WICH G 0 A_TakeInventory("PlasmaAmmo",4)
WICH HI 3
WICH G 6
WICH G 0 A_Refire
goto Ready+2
Fire2:
WICH G 0 A_PlaySoundEx("weapon/wilyshot3","Weapon")
WICH G 0 A_GiveInventory("DrWilyAlt2_CI",1)
WICH G 0 A_TakeInventory("PlasmaAmmo",2)
WICH HI 3
WICH G 4
WICH G 0 A_Refire
goto Ready+2
Fire3:
WICH G 0 A_PlaySoundEx("weapon/wilyshot2","Weapon")
WICH G 0 A_GiveInventory("DrWilyAlt3_CI",1)
WICH G 0 A_TakeInventory("PlasmaAmmo",1)
WICH HI 3
WICH G 2
WICH G 0 A_Refire
goto Ready+2
AltFire:
WISS G 0 A_JumpIfInventory("CapsuleAmmo",1,"AltFire2")
goto NoAmmo
AltFire2:
WICH G 0 A_PlaySoundEx("weapon/mbuster","Weapon")
WICH G 0 A_GiveInventory("DrWilyMain_CI",1)
WICH G 0 A_TakeInventory("CapsuleAmmo",1)
WICH G 0 A_TakeInventory("WilyCapsuleFlagDelay",16)
WICH HI 3
WICH GGG 4 A_TakeInventory("WilyCapsuleFlagDelay",16)
WICH G 0 A_Refire
goto Ready+2
/*Altfire:
WICH H 1 A_JumpIfInventory("PlasmaAmmo", 1, "Fly")
Goto Ready
Fly:
WICH H 0 SetPlayerProperty(0,1,3)
WICH H 0 A_Recoil(-3)
WICH H 0 ThrustThingZ(0,1,0,1)
WICH H 0 A_PlaySoundEX("weapon/superboost","Weapon")
WICH H 0 A_SpawnItemEX("BoosterFX",0,-10,0,0,0,0,0,0)
WICH H 1 A_SpawnItemEX("BoosterFX",0,10,0,0,0,0,0,0))
WICH H 0 ThrustThingZ(0,1,0,1)
WICH H 0 A_PlaySoundEX("weapon/superboost","Weapon")
WICH H 0 A_SpawnItemEX("BoosterFX",0,-10,0,0,0,0,0,0)
WICH H 1 A_SpawnItemEX("BoosterFX",0,10,0,0,0,0,0,0))
WICH H 0 ThrustThingZ(0,1,0,1)
WICH H 0 A_PlaySoundEX("weapon/superboost","Weapon")
WICH H 0 A_SpawnItemEX("BoosterFX",0,-10,0,0,0,0,0,0)
WICH H 1 A_SpawnItemEX("BoosterFX",0,10,0,0,0,0,0,0))
WICH H 0 ThrustThingZ(0,1,0,1)
WICH H 0 A_PlaySoundEX("weapon/superboost","Weapon")
WICH H 0 A_SpawnItemEX("BoosterFX",0,-10,0,0,0,0,0,0)
WICH H 1 A_SpawnItemEX("BoosterFX",0,10,0,0,0,0,0,0))
WICH H 0 ThrustThingZ(0,1,0,1)
WICH H 0 A_PlaySoundEX("weapon/superboost","Weapon")
WICH H 0 A_SpawnItemEX("BoosterFX",0,-10,0,0,0,0,0,0)
WICH H 1 A_SpawnItemEX("BoosterFX",0,10,0,0,0,0,0,0))
WICH H 0 A_TakeInventory("PlasmaAmmo", 1)
WICH H 0 A_Refire
Goto Ready*/

Flash:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_GiveInventory("WilyCapsuleFlagDelay",1)
TNT1 A 0 A_JumpIfInventory("WilyCapsuleFlagDelay",15,1)
loop
TNT1 A 0 A_GiveInventory("CapsuleAmmo",1)
TNT1 A 0 A_TakeInventory("WilyCapsuleFlagDelay",999)
loop

NoAmmo:
WICH G 0
Goto Ready+2
}
}


actor WilyBurnTimer : Inventory
{
inventory.amount 1
inventory.maxamount 60
}



actor WilyNoShot
{
Translation "192:192=228:228","198:198=253:253"
PROJECTILE
+DONTSEEKINVISIBLE//
+SEEKERMISSILE
+SCREENSEEKER
Radius 5
Height 5
scale 3.0
damagetype "Buster"
Obituary "$OB_WILYSHOT"
damage (7)
speed 35
ReactionTime 30
States
{
Spawn:
TNT1 A 1
WISS V 2 A_SeekerMissile(2,10,3,50,6)
WISS V 0 A_SpawnItemEx("WilyNoShotFX",0,0,0,0,0,0,0,1)
WISS W 2 A_SeekerMissile(2,10,3,50,6)
WISS W 0 A_SpawnItemEx("WilyNoShotFX",0,0,0,0,0,0,0,1)
WISS X 2 A_SeekerMissile(2,10,3,50,6)
WISS X 0 A_SpawnItemEx("WilyNoShotFX",0,0,0,0,0,0,0,1)
WISS X 0 A_CountDown
Goto Spawn+1
Death:
TNT1 A 1
stop
}
}

actor WilyNoShotB : WilyNoShot{translation "192:192=205:205","198:198=74:74"}
actor WilyNoShotR : WilyNoShot{translation "192:192=171:171","198:198=41:41"}
actor WilyNoShotO : WilyNoShot{translation "192:192=104:104","198:198=128:128"}
actor WilyNoShotP : WilyNoShot{translation "192:192=229:229","198:198=232:232"}

actor WilyNoShotFX : BasicClientSide
{
scale 2.0
States
{
Spawn:
TNT1 A 1
WISS VWX 2
stop
}
}

actor WilyShot1
{
Translation "192:192=228:228","198:198=253:253"
PROJECTILE
damagetype "Buster"
Obituary "$OB_WILYSKULL"
Speed 26
Damage (30)
radius 28//40
height 28
scale 2.5//5
States
{
Spawn:
WISS S 1
loop
Crash:
UMFX D 1
stop
}
}


actor WilyShot1B : WilyShot1{translation "192:192=205:205","198:198=74:74"}
actor WilyShot1R : WilyShot1{translation "192:192=171:171","198:198=41:41"}
actor WilyShot1O : WilyShot1{translation "192:192=104:104","198:198=128:128"}
actor WilyShot1P : WilyShot1{translation "192:192=229:229","198:198=232:232"}

actor WilyShot2 : WilyShot1
{
Damage (20)
radius 22//20
height 22
scale 2.5
States
{
Spawn:
WISS T 1
loop
}
}

actor WilyShot2B : WilyShot2{translation "192:192=205:205","198:198=74:74"}
actor WilyShot2R : WilyShot2{translation "192:192=171:171","198:198=41:41"}
actor WilyShot2O : WilyShot2{translation "192:192=104:104","198:198=128:128"}
actor WilyShot2P : WilyShot2{translation "192:192=229:229","198:198=232:232"}

actor WilyShot3 : WilyShot1
{
Damage (15)
radius 16//15
height 16
scale 2.5//2
States
{
Spawn:
WISS U 1
loop
}
}

actor WilyShot3B : WilyShot3{translation "192:192=205:205","198:198=74:74"}
actor WilyShot3R : WilyShot3{translation "192:192=171:171","198:198=41:41"}
actor WilyShot3O : WilyShot3{translation "192:192=104:104","198:198=128:128"}
actor WilyShot3P : WilyShot3{translation "192:192=229:229","198:198=232:232"}

actor WilyShot4 : WilyShot1
{
Damage (10)
radius 10//7
height 10
Scale 1.0
States
{
Spawn:
TMFX D 1
loop
}
}

actor WilyShot4B : WilyShot4{translation "192:192=205:205","198:198=74:74"}
actor WilyShot4R : WilyShot4{translation "192:192=171:171","198:198=41:41"}
actor WilyShot4O : WilyShot4{translation "192:192=104:104","198:198=128:128"}
actor WilyShot4P : WilyShot4{translation "192:192=229:229","198:198=232:232"}

actor WilyShotX
{
translation "202:202=4:4","199:199=215:215"
PROJECTILE
Damagetype "ClassPain"
Obituary "$OB_WILYPAN"
+DONTSPLASH
+DONTBLAST
damage (33)//60
ReactionTime 1
Radius 14
Height 14
speed 120
scale 2.0
States
{
Spawn:
TNT1 A 1
//TNT1 A 0 A_CountDown
stop
Crash:
XDeath:
TNT1 A 0 A_Stop
TNT1 A 0 A_Jump(256,1,3)
TNT1 A 0 A_PlaySound("weapon/PanHit1",2,0.70)
TNT1 A 1 A_PlaySound("weapon/PanHit1",1,0.70)
goto Death+3
TNT1 A 0 A_PlaySound("weapon/PanHit2",2,0.70)
TNT1 A 1 A_PlaySound("weapon/PanHit2",1,0.70)
goto Death+3
Death:
TNT1 A 0 A_Stop
TNT1 A 0 A_PlaySound("weapon/PanWall",2,0.70)
TNT1 A 1 A_PlaySound("weapon/PanWall",1,0.70)
NEDR UVWXWVU 1
stop
}
}

actor WilyShotXB : WilyShotX{translation "202:202=205:205", "199:199=74:74"}
actor WilyShotXR : WilyShotX{translation "202:202=171:171", "199:199=41:41"}
actor WilyShotXO : WilyShotX{translation "202:202=104:104", "199:199=128:128"}
actor WilyShotXP : WilyShotX{translation "202:202=229:229", "199:199=232:232"}

actor PlasmaAmmo : Ammo
{
Inventory.Amount 1
Inventory.MaxAmount 28
+INVENTORY.IGNORESKILL
}

actor CapsuleAmmo : Ammo
{
Inventory.Amount 1
Inventory.MaxAmount 28
+INVENTORY.IGNORESKILL
}

actor CapsuleIceWep : BaseMM8BDMWep_CBM
{
dropitem "CopyClassUpgradeDropped"
weapon.preferredskin "Capsule-Wily"
Weapon.AmmoUse 7
Weapon.AmmoGive 28
Weapon.SlotNumber 2
Obituary "$OB_WILYICE"
weapon.ammotype "PlasmaAmmo"
+WEAPON.NOAUTOAIM
States
{
Spawn:
C_02 I 1
loop
Ready:
WICH D 0 ACS_ExecuteAlways(998,0,751)
WICH D 0 A_GunFlash
WICH D 0 A_JumpIfInventory("PlasmaAmmo",7,"Ready2")
WICH D 5 A_WeaponReady(WRF_NOFIRE)
WICH D 0 A_GiveInventory("PlasmaAmmo",2)
Goto Ready+2
Ready2:
WICH D 0 A_JumpIfInventory("PlasmaAmmo",14,"Ready3")
WICH D 5 A_WeaponReady(WRF_NOSECONDARY)
WICH D 0 A_GiveInventory("PlasmaAmmo",2)
loop
Ready3:
WICH D 5 A_WeaponReady
WICH D 0 A_GiveInventory("PlasmaAmmo",2)
loop
Deselect:
//TNT1 A 0 A_SelectWeapon("CapsuleFireWep")
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
WICH D 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
WICH D 1 A_Raise
Loop
Fire:
WICH D 0 A_JumpIfNoAmmo("NoAmmo")
WICH E 0 A_PlaySoundEx("weapon/wrapfire","Weapon")
WICH EE 0 A_GiveInventory("DrWilyMainI_CI",1)
WICH E 8 A_PlaySoundEx("weapon/wrapfire","Weapon")
WICH EE 0 A_GiveInventory("DrWilyMainI2_CI",1)
WICH D 27
WICH D 0 A_Refire
goto Ready+2
Altfire:
WICH D 0 A_JumpIfInventory("PlasmaAmmo",14,"GroundSplit")
Goto Ready+2
GroundSplit:
WICH F 0 A_PlaySoundEx("weapon/thunderbolt","Weapon")
WICH F 0 A_GiveInventory("DrWilyAlt_CI",1)
WICH F 0 A_TakeInventory("PlasmaAmmo",14)
WICH F 1 A_SpawnItemEx("WilyCapsuleElecFX",0,50,30,0,0,0,0,1)
WICH F 1 A_SpawnItemEx("WilyCapsuleElecFX",0,-50,30,0,0,0,0,1)
WICH F 3
WICH D 25
WICH D 0 A_Refire
NoAmmo:
WICH D 0
Goto Ready+2

Flash:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("CapsuleAmmo",1,2)
TNT1 A 1 A_GiveInventory("WilySandals_Pickup",1)
stop
TNT1 A 1 A_GiveInventory("WilyCapsuleFlagDelay",1)
TNT1 A 0 A_JumpIfInventory("WilyCapsuleFlagDelay",8,1)
loop
TNT1 A 0 A_TakeInventory("CapsuleAmmo",1)
TNT1 A 0 A_TakeInventory("WilyCapsuleFlagDelay",999)
loop
}
}

actor WilyCapsuleFlagDelay : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 16
}

actor CapsuleFireWep : CapsuleIceWep
{
dropitem "CopyClassUpgradeDropped"
weapon.preferredskin "Capsule-Wily"
Weapon.SlotNumber 3
Weapon.AmmoUse 2
States
{
Ready:
WICH A 0 ACS_ExecuteAlways(998,0,750)
WICH A 0 A_GunFlash
WICH A 0 A_JumpIfInventory("PlasmaAmmo",2,"Ready2")
WICH A 4 A_WeaponReady(WRF_NOFIRE)
WICH A 0 A_GiveInventory("PlasmaAmmo",2)
Goto Ready+2
Ready2:
WICH A 0 A_JumpIfInventory("PlasmaAmmo",14,"Ready3")
WICH A 4 A_WeaponReady(WRF_NOSECONDARY)
WICH A 0 A_GiveInventory("PlasmaAmmo",2)
loop
Ready3:
WICH A 4 A_WeaponReady
WICH A 0 A_GiveInventory("PlasmaAmmo",2)
loop
Deselect:
//TNT1 A 0 A_SelectWeapon("CapsuleIceWep")
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
WICH A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
WICH A 1 A_Raise
Loop
Fire:
WICH A 0 A_JumpIfNoAmmo("NoAmmo")
WICH A 0 A_PlaySoundEx("weapon/atomicfire","Weapon")
WICH A 0 A_GiveInventory("DrWilyMainF_CI",1)
WICH B 4
WICH A 0 A_Refire
goto Ready+2
Altfire:
WICH A 0 A_JumpIfInventory("PlasmaAmmo",14,"GroundSplit")
Goto Ready+2
GroundSplit:
WICH A 0 A_PlaySoundEx("weapon/thunderbolt","Weapon")
WICH A 0 A_GiveInventory("DrWilyAlt_CI",1)
WICH A 0 A_TakeInventory("PlasmaAmmo",14)
WICH C 1 A_SpawnItemEx("WilyCapsuleElecFX",0,50,30,0,0,0,0,1)
WICH C 1 A_SpawnItemEx("WilyCapsuleElecFX",0,-50,30,0,0,0,0,1)
WICH C 3
WICH A 25
WICH A 0 A_Refire
NoAmmo:
WICH A 0
Goto Ready+2
}
}

actor WilyCapFX
{
-SOLID
+NOGRAVITY
+NOBLOCKMAP
+FIXMAPTHINGPOS
Height 6
Radius 6
+MISSILE
damage 0
scale 2.5
+CLIENTSIDEONLY
//+NOINTERACTION
States
{
Spawn:
WICH R 0
WICH R 1
stop
}
}

actor RandomCapsuleProjectileX
{
PROJECTILE
Speed 50
States
{
Spawn:
TNT1 A 4
TNT1 A 0 A_Jump(85,"Lightning")
TNT1 A 0 A_Jump(85,"Ice")
Goto Fire
Lightning:
TNT1 A 0 A_CustomMissile("CapsuleLightningX")
stop
Fire:
TNT1 A 0 A_CustomMissile("CapsuleFireX")
stop
Ice:
TNT1 A 0 A_CustomMissile("CapsuleIceX")
stop
}
}

actor WilyCapsuleElecFX
{
PROJECTILE
+NOINTERACTION
scale 2.5
States
{
Spawn:
WISS PQR 1
stop
}
}

actor CapsuleLightningX
{
Translation "195:195=212:212", "204:204=218:218"
damagetype "WilyLightning"
Obituary "$OB_WILYELEC"
PROJECTILE
+RIPPER
Bouncetype Hexen
-ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
BounceCount 8
BounceFactor 1.0
WallBounceFactor 1.0
Damage (12)
Height 16
Radius 16
Speed 30
Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("weapon/wrapfire","Voice")
TNT1 A 0 //A_ClearTarget
WISS DEF 3
goto Spawn+2
}
}

actor CapsuleLightningXX : CapsuleLightningX{BounceCount 5 Damage (8) Obituary "$OB_WILYELECX"}

actor CapsuleLightningXXB : CapsuleLightningXX{translation "204:204=205:205", "195:195=74:74"}
actor CapsuleLightningXXR : CapsuleLightningXX{translation "204:204=171:171", "195:195=41:41"}
actor CapsuleLightningXXO : CapsuleLightningXX{translation "204:204=104:104", "195:195=128:128"}
actor CapsuleLightningXXP : CapsuleLightningXX{translation "204:204=229:229", "195:195=232:232"}


actor CapsuleFireX : CapsuleLightningX
{
Translation "199:199=221:221", "202:202=218:218"
Obituary "$OB_WILYFIRE"
damagetype "WilyFireB1"
-RIPPER
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("weapon/wrapfire","Voice")
WISS ABC 3
goto Spawn+2
}
}

actor CapsuleFireB
{
Translation "199:199=221:221", "202:202=218:218"
Obituary "$OB_WILYFIRE"
damagetype "WilyFireB1"
PROJECTILE
+RIPPER
Damage (6)
radius 6
height 6
Speed 30
scale 2.5
states
{
Spawn:
WISS ABCABC 3
stop
}
}

actor CapsuleFireBB : CapsuleFireB{translation "202:202=205:205", "199:199=74:74"}
actor CapsuleFireBR : CapsuleFireB{translation "202:202=171:171", "199:199=41:41"}
actor CapsuleFireBO : CapsuleFireB{translation "202:202=104:104", "199:199=128:128"}
actor CapsuleFireBP : CapsuleFireB{translation "202:202=229:229", "199:199=232:62"}

actor WilyFireCollide : BasicExplosion
{
damagetype "WilyFireB2"
Obituary "$OB_WILYFIRE"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(3,15,0,0,15)
stop
}
}

actor WilyTackleFireFX1
{
scale 5.0
- SOLID
+NOGRAVITY
+CLIENTSIDEONLY
RenderStyle "Translucent"
Alpha 0.5
States
{
Spawn:
HOTH X 0
HOTH X 1
stop
}
}

actor WilyTackleFireFX2 : WilyTackleFireFX1
{
States
{
Spawn:
HOTH Y 0
HOTH Y 1
stop
}
}

actor CapsuleIceX : CapsuleLightningX
{
Translation "199:199=4:4", "202:202=69:69"
Obituary "$OB_WILYICE"
damagetype "WilyIce"
-RIPPER
BounceCount 4
states
{
Spawn:
TNT1 A 0
WISS GHI 3
goto Spawn+2
}
}

actor CapsuleIceXB : CapsuleIceX{translation "202:202=205:205"}
actor CapsuleIceXR : CapsuleIceX{translation "202:202=171:171"}
actor CapsuleIceXO : CapsuleIceX{translation "202:202=104:104"}
actor CapsuleIceXP : CapsuleIceX{translation "202:202=229:229"}

actor WilyCapsuleGroundSplitX
{
Translation "195:195=69:69", "204:204=212:212"
damagetype "WilyLightning"
Obituary "$OB_WILYELEC"
PROJECTILE
+RIPPER
-NOGRAVITY
Damage (5)
Radius 16
Height 16
Speed 0
scale 2.5
States
{
Spawn:
WISS JKL 1
loop
Death:
WISS JKL 1
WISS J 0 A_SpawnItemEx("WilyCapsuleGroundLitX",0,0,0,20,0,0,0,1)
WISS J 0 A_SpawnItemEx("WilyCapsuleGroundLitX",0,0,0,20,0,0,90,1)
WISS J 0 A_SpawnItemEx("WilyCapsuleGroundLitX",0,0,0,20,0,0,180,1)
WISS J 0 A_SpawnItemEx("WilyCapsuleGroundLitX",0,0,0,20,0,0,270,1)
stop
}
}

actor WilyCapsuleGroundSplitXB : WilyCapsuleGroundSplitX{translation "204:204=205:205", "195:195=74:74"}
actor WilyCapsuleGroundSplitXR : WilyCapsuleGroundSplitX{translation "204:204=171:171", "195:195=41:41"}
actor WilyCapsuleGroundSplitXO : WilyCapsuleGroundSplitX{translation "204:204=104:104", "195:195=128:128"}
actor WilyCapsuleGroundSplitXP : WilyCapsuleGroundSplitX{translation "204:204=229:229", "195:195=232:232"}

actor WilyCapsuleGroundLitX
{
PROJECTILE
damagetype "WilyLightning"
Obituary "$OB_WILYELEC"
+FLOORHUGGER
+RIPPER
Damage (6)
Radius 32
Height 32
Speed 50
scale 2.5
States
{
Spawn:
WISS MNON 2
loop
}
}

actor WilyNoSuitWeakness : BasePowerWeak
{
DamageFactor "Normal", 1.25
}


actor DrWilyMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WilyNoShot",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WilyNoShotB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WilyNoShotR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WilyNoShotO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WilyNoShotP",0,0,8,0)
goto Done
}
}

actor DrWilyAlt1_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WilyShot1",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WilyShot1B",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WilyShot1R",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WilyShot1O",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WilyShot1P",0,0,8,0)
goto Done
}
}

actor DrWilyAlt2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WilyShot2",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WilyShot2B",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WilyShot2R",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WilyShot2O",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WilyShot2P",0,0,8,0)
goto Done
}
}

actor DrWilyAlt3_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WilyShot3",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WilyShot3B",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WilyShot3R",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WilyShot3O",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WilyShot3P",0,0,8,0)
goto Done
}
}

actor DrWilyAlt4_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WilyShot4",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WilyShot4B",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WilyShot4R",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WilyShot4O",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WilyShot4P",0,0,8,0)
goto Done
}
}

actor DrWilyMainF_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("CapsuleFireB",random(-15,15),1,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("CapsuleFireBB",random(-15,15),1,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("CapsuleFireBR",random(-15,15),1,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("CapsuleFireBO",random(-15,15),1,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("CapsuleFireBP",random(-15,15),1,0,0)
goto Done
}
}

actor DrWilyMainI_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("CapsuleIceX",20,1,70,0)
TNT1 A 0 A_FireCustomMissile("CapsuleIceX",-20,0,-70,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("CapsuleIceXB",20,1,70,0)
TNT1 A 0 A_FireCustomMissile("CapsuleIceXB",-20,0,-70,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("CapsuleIceXR",20,1,70,0)
TNT1 A 0 A_FireCustomMissile("CapsuleIceXR",-20,0,-70,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("CapsuleIceXO",20,1,70,0)
TNT1 A 0 A_FireCustomMissile("CapsuleIceXO",-20,0,-70,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("CapsuleIceXP",20,1,70,0)
TNT1 A 0 A_FireCustomMissile("CapsuleIceXP",-20,0,-70,0)
goto Done
}
}

actor DrWilyMainI2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("CapsuleIceX",0,0,40,0)
TNT1 A 0 A_FireCustomMissile("CapsuleIceX",0,0,-40,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("CapsuleIceXB",0,0,40,0)
TNT1 A 0 A_FireCustomMissile("CapsuleIceXB",0,0,-40,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("CapsuleIceXR",0,0,40,0)
TNT1 A 0 A_FireCustomMissile("CapsuleIceXR",0,0,-40,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("CapsuleIceXO",0,0,40,0)
TNT1 A 0 A_FireCustomMissile("CapsuleIceXO",0,0,-40,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("CapsuleIceXP",0,0,40,0)
TNT1 A 0 A_FireCustomMissile("CapsuleIceXP",0,0,-40,0)
goto Done
}
}

actor DrWilyAlt_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WilyCapsuleGroundSplitX",0,1,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WilyCapsuleGroundSplitXB",0,1,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WilyCapsuleGroundSplitXR",0,1,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WilyCapsuleGroundSplitXO",0,1,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WilyCapsuleGroundSplitXP",0,1,0,0)
goto Done
}
}

actor DrWilyAltX_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WilyShotX",0,0,-8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WilyShotXB",0,0,-8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WilyShotXR",0,0,-8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WilyShotXO",0,0,-8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WilyShotXP",0,0,-8,0)
goto Done
}
}

actor DrWilyAltX2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WilyShotX",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WilyShotXB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WilyShotXR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WilyShotXO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WilyShotXP",0,0,8,0)
goto Done
}
}