actor EvilRobot_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_8K"
dropitem "DuoFistUpgrade"
Weapon.AmmoUse 1
Weapon.AmmoGive 3
Weapon.SlotNumber 1
Obituary "$OB_EVILBEAM"//$OB_EVILFIST//Due to SERVERSIDEONLY it uses the Weapon Obit
Inventory.Pickupmessage "You got the Evil Fist!"
weapon.ammotype "A1EvilAmmo"
States
{
Spawn:
C_08 K 1
loop

Deselect:
ERO8 A 0 A_TakeInventory("A1EvilAmmo")
goto DeselectSwap
Select:
ERO8 A 0 A_TakeInventory("A1EvilAmmo")
goto SelectSwap

Ready:
ERO8 A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_EVILROBOT)
Goto Ready2
Ready1:
ERO8 A 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_EVILROBOT,TCLR_NONE)
ERO8 A 0 A_TakeInventory("A1EvilAmmo")
Ready2:

ERO8 A 1 A_WeaponReady
wait

Fire:
ERO8 B 0 A_Refire("FireH")
goto Fire2
Fire2:
ERO8 B 0 A_TakeInventory("A1EvilAmmo")
ERO8 B 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_EVILROBOT,TCLR_NONE)
ERO8 B 0 A_PlaySoundEx("weapon/DuoShot2","Weapon")
ERO8 B 0 A_FireCustomMissile("MidFistEvil",0,0,8,0)

//ERO8 GH 1
//ERO8 IJ 8

ERO8 I 2 offset(-6,29)
ERO8 J 2 offset(-12,26)
ERO8 I 2 offset(-14,24)
ERO8 J 2 offset(-11,25)
ERO8 J 2 offset(-8,27)
ERO8 J 2 offset(-6,29)
ERO8 A 2 offset(-4,30)
ERO8 A 2 offset(-2,31)

ERO8 A 2 A_WeaponReady(14)
ERO8 A 6
ERO8 A 0 A_Refire("FireH")
goto Ready2
Fire3:
ERO8 B 0 A_TakeInventory("A1EvilAmmo")
ERO8 B 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_EVILROBOT,TCLR_NONE)
ERO8 B 0 A_PlaySoundEx("weapon/DuoShot3","Weapon")
ERO8 B 0 A_FireCustomMissile("GigaFistEvil",0,0,8,0)

//ERO8 GH 2
//ERO8 IJ 8
ERO8 H 0 A_JumpIfInventory("PlayerPropertyRage",1,"Fire3_R")
ERO8 H 1 Offset(-1,34)
ERO8 H 1 Offset(-10,28)
ERO8 JIJIJ 2 Offset(-14,24)
ERO8 J 1 Offset(-14,24)
ERO8 J 1 Offset(-11,25)
ERO8 J 1 Offset(-8,26)
ERO8 J 1 Offset(-6,27)
ERO8 J 1 Offset(-4,28)
ERO8 J 1 Offset(-3,29)
ERO8 J 1 Offset(-2,30)
ERO8 J 1 Offset(-1,31)

ERO8 A 2 A_WeaponReady(14)
ERO8 A 6
ERO8 A 0 A_Refire("FireH")
goto Ready2
Fire3_R:
ERO8 H 1 Offset(-5,34)
ERO8 JIJIJ 2 Offset(-14,24)
ERO8 J 1 Offset(-11,25)
ERO8 J 1 Offset(-8,26)
ERO8 J 1 Offset(-4,28)
ERO8 J 1 Offset(-2,30)

ERO8 A 2 A_WeaponReady(14)
ERO8 A 6
ERO8 A 0 A_Refire("FireH")
goto Ready2


FireH:
ERO8 B 0 A_JumpIfInventory("A1EvilAmmo",10,"FireH0")
ERO8 B 1 A_GiveInventory("A1EvilAmmo",1+CallACS("core_checkrune",RUNE_RAGE,0))
ERO8 B 0 A_Refire("FireH")
Goto Fire2
FireH0:
ERO8 C 0 A_GunFlash("Flash",1)
goto FireH1
FireH1:
ERO8 C 0 A_JumpIfInventory("A1EvilAmmo",28,"Charge0")
ERO8 C 1 A_GiveInventory("A1EvilAmmo",1+CallACS("core_checkrune",RUNE_RAGE,0))
ERO8 C 0 A_Refire("FireH1")
Goto Fire2
Charge0:
ERO8 D 0 A_PlaySoundEx("weapon/TrioCharge1","Weapon")
Goto Charge1
Charge1:
ERO8 D 0 A_JumpIfInventory("A1EvilAmmo",45,"Charge2Flash")
ERO8 D 1 ACS_NamedExecuteWithResult("core_chargecolor",DYE_TRIO_CHARGE1,TINT_TCLR1)
ERO8 C 0 A_Refire("Charge1.a")
Goto Fire2
Charge1.a:
ERO8 C 1 ACS_NamedExecuteWithResult("core_chargecolor",DYE_EVILROBOT,TCLR_NONE)
ERO8 C 0 A_GiveInventory("A1EvilAmmo",1+CallACS("core_checkrune",RUNE_RAGE,0))
ERO8 D 0 A_Refire("Charge1")
Goto Fire2
Charge2Flash:
ERO8 D 0 A_GunFlash("Flash2",1)
ERO8 D 1 Offset(2,34)ACS_NamedExecuteWithResult("core_chargecolor",DYE_TRIO_CHARGE2,TINT_TCLR2)
ERO8 E 0 A_Refire(1)
Goto Fire3
ERO8 E 1 Offset(4,36)ACS_NamedExecuteWithResult("core_chargecolor",DYE_TRIO_CHARGE3,TINT_TCLR3)
ERO8 F 0 A_Refire(1)
Goto Fire3
ERO8 F 1 Offset(6,38)ACS_NamedExecuteWithResult("core_chargecolor",DYE_EVILROBOT,TCLR_NONE)
ERO8 D 0 A_Refire(1)
Goto Fire3
ERO8 D 1 Offset(7,39)ACS_NamedExecuteWithResult("core_chargecolor",DYE_TRIO_CHARGE2,TINT_TCLR2)
ERO8 E 0 A_Refire(1)
Goto Fire3
ERO8 E 1 Offset(8,40)ACS_NamedExecuteWithResult("core_chargecolor",DYE_TRIO_CHARGE3,TINT_TCLR3)
ERO8 F 0 A_Refire(1)
Goto Fire3
ERO8 F 1 Offset(9,41)ACS_NamedExecuteWithResult("core_chargecolor",DYE_EVILROBOT,TCLR_NONE)
ERO8 D 0 A_Refire("Charge2")
Goto Fire3
Charge2:
ERO8 D 1 ACS_NamedExecuteWithResult("core_chargecolor",DYE_TRIO_CHARGE2,TINT_TCLR2)
ERO8 E 0 A_Refire("Charge2.a")
Goto Fire3
Charge2.a:
ERO8 E 1 ACS_NamedExecuteWithResult("core_chargecolor",DYE_TRIO_CHARGE3,TINT_TCLR3)
ERO8 F 0 A_Refire("Charge2.b")
Goto Fire3
Charge2.b:
ERO8 F 1 ACS_NamedExecuteWithResult("core_chargecolor",DYE_EVILROBOT,TCLR_NONE)
ERO8 D 0 A_JumpIfInventory("IsBot",1,"BotFire")
ERO8 D 0 A_Refire("Charge2")
Goto Fire3
BotFire:
ERO8 D 0 A_Jump(16,"Fire3")
ERO8 D 0 A_Refire("Charge2")
Goto Fire3

Flash:
ERO8 K 1 A_RailWait
TNT1 A 0 A_JumpIfInventory("A1EvilAmmo",1,1)
stop
ERO8 K 1 A_RailWait
TNT1 A 0 A_JumpIfInventory("A1EvilAmmo",1,1)
stop
ERO8 L 1 A_RailWait
TNT1 A 0 A_JumpIfInventory("A1EvilAmmo",1,1)
stop
ERO8 L 1 A_RailWait
TNT1 A 0 A_JumpIfInventory("A1EvilAmmo",1,1)
stop
ERO8 M 1 A_RailWait
TNT1 A 0 A_JumpIfInventory("A1EvilAmmo",1,1)
stop
ERO8 M 1 A_RailWait
TNT1 A 0 A_JumpIfInventory("A1EvilAmmo",1,"Flash")
stop

Flash2:
ERO8 N 1 A_PlaySoundEx("weapon/TrioCharge2","Weapon")
TNT1 A 0 A_JumpIfInventory("A1EvilAmmo",1,1)
stop
ERO8 O 1 A_RailWait
TNT1 A 0 A_JumpIfInventory("A1EvilAmmo",1,1)
stop
ERO8 P 1 A_RailWait
TNT1 A 0 A_JumpIfInventory("A1EvilAmmo",1,1)
stop
ERO8 N 1 A_RailWait
TNT1 A 0 A_JumpIfInventory("A1EvilAmmo",1,1)
stop
ERO8 O 1 A_RailWait
TNT1 A 0 A_JumpIfInventory("A1EvilAmmo",1,"Flash2")
stop





Altfire:
EvilAlt:
ERO8 A 0 A_JumpIfInventory("TrioRageWeakness",1,"EvilSelect")//EvilAlt0
ERO8 A 0 //A_JumpIfInventory("EvilRageAmmo",1120,"RageActivate")
Goto Ready2

RageActivate:
ERO8 A 0 A_PlaySoundEx("weapon/TrioRage","SoundSlot7")
ERO8 A 0 A_GiveInventory("Trio_RageEnable_P",1)
ERO8 A 2 Offset(2,34)
ERO8 B 2 Offset(5,37)
ERO8 C 2 Offset(8,40)
ERO8 D 0 A_JumpIfInventory("PlayerPropertyRage",1,"RageActivate_R")
ERO8 DEFDEFDEF 1 Offset(11,43)
ERO8 C 2 Offset(8,40)
ERO8 B 2 Offset(5,37)
ERO8 A 2 Offset(2,34)
goto Ready2
RageActivate_R:
ERO8 DEFDEF 1 Offset(11,43)
ERO8 C 2 Offset(8,40)
ERO8 B 2 Offset(5,37)
ERO8 A 2 Offset(2,34)
goto Ready2

EvilSelect:
TNT1 A 0 A_GiveInventory("TrioGigaFlag",1)
TNT1 A 0 A_GiveInventory("VivifyFlag3",1)
TNT1 A 0 A_JumpIfInventory("TrioGigaTypeX",8,"EvilAlt8")
TNT1 A 0 A_JumpIfInventory("TrioGigaTypeX",7,"EvilAlt7")
TNT1 A 0 A_JumpIfInventory("TrioGigaTypeX",6,"EvilAlt6")
TNT1 A 0 A_JumpIfInventory("TrioGigaTypeX",5,"EvilAlt5")
TNT1 A 0 A_JumpIfInventory("TrioGigaTypeX",4,"EvilAlt4")
TNT1 A 0 A_JumpIfInventory("TrioGigaTypeX",3,"EvilAlt3")
TNT1 A 0 A_JumpIfInventory("TrioGigaTypeX",2,"EvilAlt2")
TNT1 A 0 A_JumpIfInventory("TrioGigaTypeX",1,"EvilAlt1")
goto EvilAlt0

EvilAlt8://WaterBalloon
ERO8 R 2 OffSet(8,44)
ERO8 R 2 A_WeaponReady(14)
ERO8 R 0 A_GiveInventory("TrioRage_Fire_P8")
ERO8 STUVW 3
ERO8 R 6 OffSet(24,56)
ERO8 R 2 OffSet(8,44)
ERO8 R 2 A_WeaponReady(14)
ERO8 R 0 A_GiveInventory("TrioRage_Fire_P8")
ERO8 R 0 A_TakeInventory("VivifyFlag3",1)
ERO8 STUVW 3
ERO8 R 18 OffSet(24,56)
goto EvilAltEnd

EvilAlt7://FlashBomb
ERO8 Q 1
ERO8 Q 0 A_GiveInventory("TrioRage_Fire_P7")
ERO8 Q 4 OffSet(22,56)A_TakeInventory("VivifyFlag3",1)
ERO8 Q 4 OffSet(42,75)
ERO8 Q 4 OffSet(22,56)
ERO8 Q 35 A_WeaponReady(14)
goto EvilAltEnd

EvilAlt6://IceWave
ERO7 W 4 OffSet(0,24)A_PlaySoundEx("weapon/pcharge","Weapon")
ERO7 W 4 OffSet(0,-6)
ERO7 W 4 OffSet(0,-36)A_SpawnItemEx("TrioIceWaveCharging",0,0,28,0,0,0,0,1)
ERO7 W 4 OffSet(0,-66)

ERO7 X 2 OffSet(1,-66)
ERO7 X 2 OffSet(-3,-66)
ERO7 X 2 OffSet(1,-66)
ERO7 X 2 OffSet(-3,-66)
ERO7 X 2 OffSet(1,-66)
ERO7 X 2 OffSet(-3,-66)
ERO7 X 2 OffSet(1,-66)
ERO7 X 2 OffSet(-3,-66)
ERO7 X 2 OffSet(1,-66)

ERO7 X 0 A_WeaponReady(14)
ERO7 X 3 Offset(0,-19)A_GiveInventory("TrioRage_Fire_P6")
ERO7 Y 3 Offset(0,28)A_TakeInventory("VivifyFlag3",1)
ERO7 Y 21 Offset(0,48)
ERO7 W 3 OffSet(0,40)
goto EvilAltEnd

EvilAlt5://HomingSniper
ERO7 S 1 A_SpawnItemEx("TrioSniper",0,0,32,cos(-pitch)*150,0,sin(-pitch)*150,0,1)
ERO7 S 0 A_TakeInventory("EvilRageAmmo",20)
ERO7 SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS 1 A_JumpIfInventory("CutterFlag",1,"EvilAlt5_Fire")
//99 S's
ERO7 S 0 A_TakeInventory("CutterFlag")
ERO7 S 0 A_TakeInventory("EvilRageAmmo",70)
ERO7 S 0 Thing_Remove(7800-TID)
ERO7 VSVS 2 A_PlaySoundEx("S3_K/MetalSpark","Weapon")
ERO7 S 0 A_TakeInventory("CutterFlag")
ERO7 S 0 A_TakeInventory("VivifyFlag3",1)
ERO7 VS 2 A_PlaySoundEx("S3_K/MetalSpark","Weapon")
goto EvilAltEnd
EvilAlt5_Fire:
ERO7 S 0 A_TakeInventory("CutterFlag")
ERO7 TUVTUVTUVTUVTUVTUVTUVTUVTUVTUVTUVTUVTUVTUVTUVTUVTUVTUVTUVTUV 1 A_GiveInventory("TrioRage_Fire_P5")
ERO7 S 0 A_TakeInventory("CutterFlag")
ERO7 S 0 A_TakeInventory("VivifyFlag3",1)
ERO7 TUVS 2
ERO7 S 15
goto EvilAltEnd

EvilAlt4://ThunderClaw
ERO7 O 0 A_GiveInventory("TrioRage_Fire_P4")
ERO7 O 0 A_PlaySoundEx("misc/wilylightning","Weapon")
ERO7 PQR 3
ERO7 Q 1
ERO7 Q 2 A_PlaySoundEx("misc/wilylightning","Weapon")
ERO7 PQ 3
ERO7 R 2
ERO7 R 1 A_PlaySoundEx("misc/wilylightning","Weapon")
ERO7 QPQ 3
ERO7 R 0 A_PlaySoundEx("misc/wilylightning","Weapon")
ERO7 RQPQR 3
ERO7 O 15 A_TakeInventory("VivifyFlag3",1)
goto EvilAltEnd

EvilAlt3://FlameSword
ERO7 I 2 OffSet(136,-13)A_PlaySoundEx("weapon/mirrorabsorb","Weapon")
ERO7 I 2 OffSet(98,-1)
ERO7 I 2 OffSet(60,11)
ERO7 I 2 OffSet(30,22)
ERO7 I 6 OffSet(1,33)
ERO7 I 2 OffSet(20,18)
ERO7 J 2 OffSet(1,33)
ERO7 J 2 OffSet(50,18)A_GiveInventory("TrioRage_Fire_P3A")
ERO7 J 2 OffSet(91,-3)
ERO7 K 2 OffSet(1,33)
ERO7 K 2 OffSet(50,33)
TNT1 A 4
ERO7 L 2 OffSet(24,19)
ERO7 L 2 OffSet(1,33)A_GiveInventory("TrioRage_Fire_P3B")
ERO7 M 2 OffSet(1,33)A_TakeInventory("VivifyFlag3",1)
ERO7 M 2 OffSet(-57,43)
ERO7 M 2 OffSet(-143,56)
ERO7 N 2 OffSet(17,21)
ERO7 N 2 OffSet(8,27)
ERO7 N 16 OffSet(-1,33)
ERO7 N 2 OffSet(26,31)
ERO7 N 2 OffSet(52,29)
ERO7 N 2 OffSet(78,28)
ERO7 N 2 OffSet(102,27)
ERO7 N 2 OffSet(124,26)
ERO7 N 2 OffSet(144,25)
goto EvilAltEnd

EvilAlt2://AstroCrush
ERO7 D 0 A_GiveInventory("TrioRage_Fire_P2")
ERO7 DEFGHHGFED 3
TNT1 A 2
goto EvilAltEnd

EvilAlt1://TornadoHold
ERO7 A 0 A_GiveInventory("PowerTrioTornadoSpeed",1)
ERO7 A 24 A_SpawnItemEx("TrioTornadoHelper")
ERO7 B 0 A_GiveInventory("TrioRage_Fire_P1")
ERO7 B 0 A_TakeInventory("VivifyFlag3",1)
ERO7 BC 3
ERO7 C 3 OffSet(-12,47)
ERO7 C 3 OffSet(-26,62)A_TakeInventory("PowerTrioTornadoSpeed",9)
goto EvilAltEnd

EvilAlt0://EvilLaser
ERO8 B 0 A_SetArg(0,CallACS("cbm_TrioLaserArgs",0))
ERO8 B 0 A_SetArg(1,CallACS("cbm_TrioLaserArgs",1))
ERO8 B 0 A_PlaySoundEx("weapon/TrioCharge3","Weapon")
ERO8 B 0 A_GiveInventory("TrioGigaFlag",1)
ERO8 B 2 Offset(11,41)
ERO8 H 2 Offset(25,53)
goto EvilAlt0_Start
EvilAlt0_Start:
ERO8 B 0 A_JumpIfInventory("PlayerPropertyRage",1,3)
ERO8 B 1 Offset(25,53)A_GiveInventory("FireTrioSpectrum2")
ERO8 B 0 A_Refire(1)
goto EvilAlt0_End+2
ERO8 B 1 Offset(25,53)A_GiveInventory("FireTrioSpectrum2")
ERO8 B 0 A_Refire(1)
goto EvilAlt0_End+3
ERO8 B 0 A_JumpIfInventory("PlayerPropertyRage",1,3)
ERO8 B 1 Offset(25,53)A_GiveInventory("FireTrioSpectrum2")
ERO8 B 0 A_Refire(1)
goto EvilAlt0_End+5
ERO8 B 1 Offset(25,53)A_GiveInventory("FireTrioSpectrum2")
ERO8 B 0 A_Refire(1)
goto EvilAlt0_End+6
ERO8 H 0 A_JumpIfInventory("PlayerPropertyRage",1,3)
ERO8 H 1 Offset(25,53)A_GiveInventory("FireTrioSpectrum1")
ERO8 H 0 A_Refire(1)
goto EvilAlt0_End+8
ERO8 H 1 Offset(25,53)A_GiveInventory("FireTrioSpectrum1")
ERO8 H 0 A_JumpIfInventory("EvilRageAmmo",1,1)
goto EvilAlt0End
ERO8 H 0 A_Refire("EvilAlt0_Hold")//EvilAlt0_Start
goto EvilAlt0End

EvilAlt0_Hold:
ERO8 B 0 Offset(25,53)A_JumpIfInventory("PlayerPropertyRage",1,4)
ERO8 B 1 A_GiveInventory("FireTrioSpectrum2")
ERO8 B 0 A_JumpIfInventory("EvilRageAmmo",1,1)
goto EvilAlt0End
ERO8 B 0 A_Refire(1)
goto EvilAlt0End
ERO8 B 1 A_GiveInventory("FireTrioSpectrum2")
ERO8 B 0 A_JumpIfInventory("EvilRageAmmo",1,1)
goto EvilAlt0End
ERO8 B 0 A_Refire(1)
goto EvilAlt0End
ERO8 B 0 A_JumpIfInventory("PlayerPropertyRage",1,4)
ERO8 B 1 A_GiveInventory("FireTrioSpectrum2")
ERO8 B 0 A_JumpIfInventory("EvilRageAmmo",1,1)
goto EvilAlt0End
ERO8 B 0 A_Refire(1)
goto EvilAlt0End
ERO8 B 1 A_GiveInventory("FireTrioSpectrum2")
ERO8 B 0 A_JumpIfInventory("EvilRageAmmo",1,1)
goto EvilAlt0End
ERO8 B 0 A_Refire(1)
goto EvilAlt0End
ERO8 H 0 A_JumpIfInventory("PlayerPropertyRage",1,4)
ERO8 H 1 A_GiveInventory("FireTrioSpectrum1")
ERO8 H 0 A_JumpIfInventory("EvilRageAmmo",1,1)
goto EvilAlt0End
ERO8 H 0 A_Refire(1)
goto EvilAlt0End
ERO8 H 1 A_GiveInventory("FireTrioSpectrum1")
ERO8 H 0 A_JumpIfInventory("EvilRageAmmo",1,1)
goto EvilAlt0End
ERO8 H 0 A_Refire("EvilAlt0_Hold")
goto EvilAlt0End

EvilAlt0_End:
ERO8 B 0 A_JumpIfInventory("PlayerPropertyRage",1,2)
ERO8 BB 1 Offset(25,53)A_GiveInventory("FireTrioSpectrum2")
ERO8 B 0 A_JumpIfInventory("PlayerPropertyRage",1,2)
ERO8 BB 1 Offset(25,53)A_GiveInventory("FireTrioSpectrum2")
ERO8 H 0 A_JumpIfInventory("PlayerPropertyRage",1,2)
ERO8 HH 1 Offset(25,53)A_GiveInventory("FireTrioSpectrum1")
EvilAlt0End:
ERO8 B 0 A_TakeInventory("TrioGigaFlag",1)
ERO8 B 2 Offset(17,48)
ERO8 H 2 Offset(11,44)
ERO8 B 2 Offset(6,40)
ERO8 B 2 Offset(3,37)
ERO8 A 2 Offset(1,34)
goto Ready2

EvilAltEnd:
"----" "#" 0 A_TakeInventory("TrioGigaFlag",9)
"----" "#" 10 A_TakeInventory("VivifyFlag3",1)
"----" "#" 0 A_WeaponReady(14)
goto Ready2

}
}

actor A1EvilAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 45
+INVENTORY.IGNORESKILL
}

actor EvilRageAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 1120
+INVENTORY.IGNORESKILL
}

actor EvilRobotItem : BasicClassItem
{
inventory.icon "TrioIcon"
inventory.pickupmessage "Trio is another word for SPREAD."
Tag "Giga Enragement"
states
{
Spawn:
ERO9 Z 1
loop
UseCBM:
TNT1 A 0 A_JumpIfInventory("TrioRuneFlag",0,"Use3")
TNT1 A 0 A_JumpIfInventory("EvilRageAmmo",0,"Use2")
fail
Use2:
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_GigaWeaponSave")
TNT1 A 0 A_PlaySoundEx("weapon/TrioRage","SoundSlot7")
TNT1 A 0 A_GiveInventory("Trio_RageEnable_P")
fail
Use3:
//TNT1 A 0 A_JumpIfInventory("Trio_ItemReuse",1,3)
//TNT1 A 0 A_GiveInventory("Trio_ItemReuse",1)
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_GigaWeaponSave")
TNT1 A 0 A_SpawnItemEx("EvilRobotItem_H")
TNT1 A 0
fail
}
}

actor Trio_ItemReuse : Powerup
{
Powerup.Duration 3
}
actor EvilRobotItem_H : BasicWatcher
{
+SERVERSIDEONLY
States
{
Spawn://Directly calling A_SelectWeapon on the item does not sync online
TNT1 A 0//Doing this roundabout gets around the desync issue
//TNT1 A 0 ACS_NamedExecuteWithResult("cbm_GigaWeaponSaveTarget")
TNT1 A 0 A_GiveToTarget("EvilRobotItem_P",1)
stop
}
}
actor EvilRobotItem_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SelectWeapon("EvilRobot_W")
stop
}
}

actor TrioGigaType : Inventory//Current Weapon Giga
{
inventory.amount 1
inventory.maxamount 8
}
actor TrioGigaTypeX : TrioGigaType{}//Saved Giga

actor TrioGigaFlag : Inventory {}
actor TrioGigaStartDelay : Powerup
{
Powerup.Duration 22
}
actor TrioRuneFlag : Inventory {}

actor TrioRageWeakness : BasePowerWeak
{
damagefactor "Normal", 1.5
}

actor TrioSpawnStart_P : CustomInventory
{
States
{
Pickup:
//TNT1 A 0 ACS_NamedExecuteWithResult("cbm_CopyWepSetAmmo",2,3)//Cut all ammo in half
TNT1 A 0 A_SpawnItemEX("TrioRageManager")
stop
}
}
actor TrioAmmoAdjust_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_CopyWepSetAmmo",2,3)
stop
}
}

actor Trio_RageEnable_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteWithResult("core_runeplayer",0,1,RUNE_SPREAD)
TNT1 A 0 A_GiveInventory("TrioGigaStartDelay",1)
TNT1 A 0 A_GiveInventory("TrioRuneFlag",1)
TNT1 A 0 A_GiveInventory("TrioRageWeakness",1)
TNT1 A 0 A_GiveInventory("GuardDownFlag",1)
TNT1 A 0 A_SpawnItemEx("TrioRageFXBegin_H",0,0,0,0,0,0,0,1)
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_CopyWepAmmoRatioGive",100)//DocRobot Ammo
stop
//TNT1 A 0 ACS_ExecuteAlways(992,0,0,1)//MTank Ammo
}
}


actor Trio_RageDisable_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("TrioRuneFlag",1,1)
stop
TNT1 A 0 A_PlaySoundEx("weapon/TrioCharge0","Weapon")
TNT1 A 0 A_TakeInventory("TrioRuneFlag")
TNT1 A 0 A_TakeInventory("TrioRageWeakness")
TNT1 A 0 A_TakeInventory("GuardDownFlag")
TNT1 A 0 ACS_NamedExecuteWithResult("core_runeplayer",0,0,RUNE_SPREAD)
stop

}
}

actor TrioRageManager : BasicHelper
{
+NOTIMEFREEZE
+SERVERSIDEONLY
States
{
Spawn:
TNT1 A 0

TNT1 A 0
TNT1 AA 1
//Wait 2 tics for owner to change TID
//Along with waiting for all the weapons to be defined in ACS
TNT1 A 0 A_GiveToTarget("TrioAmmoAdjust_P",1)
TNT1 AA 1

Spawn2:
TNT1 A 1
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 0 A_JumpIfInTargetInventory("EvilRobot_W",1,1)
goto Death
TNT1 A 0 A_GiveInventory("TrioRageManagerCheck_P")
loop
Death:
TNT1 A 0
stop
}
}

actor TrioRageManagerCheck_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_GigaWeaponCheckTarget")
TNT1 A 0 A_JumpIfInTargetInventory("TrioRageWeakness",1,"Rage")
TNT1 A 0 //A_JumpIfInTargetInventory("EnergyBalancerActive",1,2)
TNT1 A 0 A_GiveToTarget("EvilRageAmmo",2+CallACS("core_checkrune",RUNE_RAGE,2)*2)
stop
TNT1 A 0 A_GiveToTarget("EvilRageAmmo",3+CallACS("core_checkrune",RUNE_RAGE,2)*3)
stop
Rage:
TNT1 A 0 A_GiveToTarget("TrioRageFX_P",1)
TNT1 A 0 A_JumpIfInTargetInventory("TrioGigaStartDelay",1,"No")
TNT1 A 0 A_JumpIfInTargetInventory("TrioGigaFlag",1,"No")
TNT1 A 0 A_TakeFromTarget("EvilRageAmmo",2,1)
TNT1 A 0 //A_JumpIfInventory("EnergyBalancerActive",1,2)
TNT1 A 0 A_TakeFromTarget("EvilRageAmmo",1)//2
goto RageEnd
TNT1 A 0 //A_TakeFromTarget("EvilRageAmmo",1)
goto RageEnd
RageEnd:
TNT1 A 0 A_JumpIfInTargetInventory("EvilRageAmmo",1,"No")
TNT1 A 0 A_GiveToTarget("Trio_RageDisable_P",1)
stop
No:
TNT1 A 0
stop
}
}

actor TrioRageFX_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("TrioRageFX",random(24,56),0,random(8,48),0,0,2,random(0,359),1)
stop
}
}

actor TrioRageFX : BasicGraphicEffect
{
renderstyle translucent
alpha 0.8
Scale 1.5
States
{
Spawn:
EVFL XXXXYYYYYZZZZZ 1 A_FadeOut(0.06)
stop
}
}

actor TrioRageFXBegin_H : BasicExplosion
{
var int user_translateLikePlayer;
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("TrioRageFXBegin",0,0,32,0,0,0,0,1)
stop
}
}

actor TrioRageFXBegin : BasicGraphicEffect
{
var int user_A;
reactiontime 18
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_A",random(0,20))
TNT1 A 0 A_SpawnItemEx("TrioRageFX",10,0,30,5,0,9,user_A+15,1+4)
TNT1 A 0 A_SpawnItemEx("TrioRageFX",20,0,20,10,0,6,user_A+10,1+4)
TNT1 A 0 A_SpawnItemEx("TrioRageFX",30,0,10,15,0,3,user_A+5,1+4)
TNT1 A 0 A_SpawnItemEx("TrioRageFX",40,0,0,20,0,0,user_A,1+4)
TNT1 A 0 A_SpawnItemEx("TrioRageFX",30,0,-10,15,0,-3,user_A+5,1+4)
TNT1 A 0 A_SpawnItemEx("TrioRageFX",20,0,-20,10,0,-6,user_A+10,1+4)
TNT1 A 0 A_SpawnItemEx("TrioRageFX",10,0,-30,5,0,-9,user_A+15,1+4)
TNT1 A 0 A_SetUserVar("user_A",user_A+20)
TNT1 A 0 A_Countdown
goto Spawn+2
Death:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("TrioRageFX",0,0,40,0,0,12,0,1+4)
TNT1 A 0 A_SpawnItemEx("TrioRageFX",0,0,-40,0,0,-12,0,1+4)
stop
}
}
//weapon/TrioCharge0
actor Trio_BeamProtect : PowerProtection
{
Powerup.Duration 6
damagefactor "Trio_Beam", 0.0
}

actor TrioSpectrumWeaken : BasePowerDamage
{
+INVENTORY.ALWAYSPICKUP
Powerup.Duration 200
damagefactor "Normal", 0.75
}

actor Trio_Beam_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("TrioSpectrumWeaken",1,2)
TNT1 A 0 A_SpawnItemEx("TrioSpectrumWeaken_H")
TNT1 A 0 A_GiveInventory("TrioSpectrumWeaken",1)
TNT1 A 0 A_GiveInventory("Trio_BeamProtect",1)
stop
}
}

actor TrioSpectrumWeaken_H : BasicHelper
{
States
{
Spawn:
TNT1 A 0 
TNT1 A 3 A_GiveToTarget("TrioSpectrumWeakenFX_P",1)
TNT1 A 0 A_JumpIfInTargetInventory("TrioSpectrumWeaken",1,"Spawn")
stop
}
}

actor TrioSpectrumWeakenFX_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("TrioSpectrumWeakenFX",random(24,64),0,Random(48,64),0,0,-1.5,random(0,359))//,1)
stop
}
}

actor TrioSpectrumWeakenFX : BasicGraphicEffectM
{
Translation "192:192=41:41", "198:198=249:249"
//+FLOATBOB
+THRUACTORS
+FORCEXYBILLBOARD
+MISSILE
Alpha 0.6
ReactionTime 1//20
Scale 1.25
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,"Spawn2","Spawn3")
goto Spawn2
Spawn2:
ERO9 K 40
ERO9 K 2 A_CountDown
wait
Spawn3:
ERO9 L 40
ERO9 L 2 A_CountDown
wait
Death:
"----" "#" 1 A_JumpIfInventory("CutterFlag",1,"Death2")
stop
Death2:
"----" "#" 0 ThrustThingZ(0,4,1,1)
"----" "###" 2 A_FadeOut(0.15)
stop
}
}

actor FireTrioSpectrum1 : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_TakeInventory("EvilRageAmmo",2)
TNT1 A 0 A_TakeInventory("EvilRageAmmo",2,1)
TNT1 A 0 A_PlaySoundEx("weapon/TrioCharge4","Weapon")
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_TrioLaserAdjust",Args[0],Args[1],4,3)
TNT1 A 0 A_SetArg(0,CallACS("cbm_TrioLaserArgs",3))
TNT1 A 0 A_SetArg(1,CallACS("cbm_TrioLaserArgs",4))
TNT1 A 0 A_JumpIf( ((Args[0]/65536.0-angle)*(Args[0]/65536.0-angle))<1 && ((pitch-Args[1]/65536.0)*(pitch-Args[1]/65536.0))<1,"PerfectAim")
TNT1 A 0 A_Jump(256,"AdjustAim")
stop
AdjustAim:
TNT1 A 0 A_SpawnItemEx("TrioSpectrumStart1",cos(-Args[1]/65536.0)*16,0,32+sin(-Args[1]/65536.0)*16,cos(-Args[1]/65536.0),0,sin(-Args[1]/65536.0),Args[0]/65536.0,SXF_ABSOLUTEANGLE+SXF_MULTIPLYSPEED+32768,0,-7800-tid)//4+8192
AdjustAim2:
TNT1 A 0 A_SpawnItemEx("TrioSpectrumDamager",cos(-Args[1]/65536.0)*16,0,32+sin(-Args[1]/65536.0)*16,cos(-Args[1]/65536.0),0,sin(-Args[1]/65536.0),Args[0]/65536.0,4+8192+32768)
stop
PerfectAim:
TNT1 A 0 A_SpawnItemEx("TrioSpectrumStart1",cos(-pitch)*16,0,32+sin(-pitch)*16,cos(-pitch),0,sin(-pitch),0,8192,0,-7800-tid)
PerfectAim2:
TNT1 A 0 A_SpawnItemEx("TrioSpectrumDamager",cos(-pitch)*16,0,32+sin(-pitch)*16,cos(-pitch),0,sin(-pitch),0,8192)
stop
}
}

actor FireTrioSpectrum2 : FireTrioSpectrum1
{
states
{
AdjustAim:
TNT1 A 0 A_SpawnItemEx("TrioSpectrumStart2",cos(-Args[1]/65536.0)*16,0,32+sin(-Args[1]/65536.0)*16,cos(-Args[1]/65536.0),0,sin(-Args[1]/65536.0),Args[0]/65536.0,4+8192,0,-7800-tid)
goto AdjustAim2
PerfectAim:
TNT1 A 0 A_SpawnItemEx("TrioSpectrumStart2",cos(-pitch)*16,0,32+sin(-pitch)*16,cos(-pitch),0,sin(-pitch),0,8192,0,-7800-tid)
goto PerfectAim2
}
}


const int TRIO_LASERRANGE = 166;

actor TrioSpectrum1 : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_EVILBEAM"
DamageType "Trio_Beam"
+THRUACTORS
+DONTBLAST
+DONTREFLECT
+CLIENTSIDEONLY
+FORCEXYBILLBOARD
+BRIGHT
+PAINLESS
damage (0)
Radius 11
Height 11
speed 30
scale 2.5
Args 166 //Laser spawn limit
states
{
Spawn:
TNT1 A 0
ERO9 A 0 A_CountDownArg(0)
ERO9 A 0 A_SpawnItemEx("TrioSpectrum1",0,0,0,momx,momy,momz,0,1+8+SXF_TRANSFERSPECIAL)//32768
ERO9 A 0 A_JumpIf(CallACS("cbm_IsPointerClient",2)==1,"ClientFade")
ERO9 A 1 //A_Stop
stop
ClientFade:
ERO9 A 1 A_SetTranslucent(0.20+(TRIO_LASERRANGE-Args[0])*0.01)//A_SetScale(1.5)
stop
Death:
TNT1 A 1 A_SpawnItemEx("TrioSpectrumDeathFX1",0,0,0,0,0,0,0,1)
stop
}
}
actor TrioSpectrum2 : TrioSpectrum1
{
states
{
Spawn:
TNT1 A 0
ERO9 B 0 A_CountDownArg(0)
ERO9 B 0 A_SpawnItemEx("TrioSpectrum2",0,0,0,momx,momy,momz,0,1+8+32+32768)
ERO9 A 0 A_JumpIf(CallACS("cbm_IsPointerClient",2)==1,"ClientFade")
ERO9 B 1 //A_Stop
stop
ClientFade:
ERO9 B 1 A_SetTranslucent(0.20+(TRIO_LASERRANGE-Args[0])*0.01)//A_SetScale(1.5)
stop
Death:
TNT1 A 1 A_SpawnItemEx("TrioSpectrumDeathFX2",0,0,0,0,0,0,0,1)
stop
}
}

actor TrioSpectrumDeathFX1 : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
States
{
SpawnFrame:
ERO9 C 1
stop
}
}
actor TrioSpectrumDeathFX2 : TrioSpectrumDeathFX1
{
States
{
SpawnFrame:
ERO9 D 1
stop
}
}

actor TrioSpectrumStart1 : TrioSpectrum1
{
+USESPAWNEVENTSCRIPT
var int user_UseProjSpawnFunc;
+INVISIBLE
//+NONETID
-CLIENTSIDEONLY
RenderStyle None
states
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_SetPointer_Client",2,(TID+7800)*-1)
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
TNT1 A 0 A_SpawnItemEx("TrioSpectrum1",0,0,0,momx,momy,momz,0,1+8+SXF_TRANSFERPOINTERS+32768)//1024
TNT1 A 1 //A_Stop
stop
Death://For hitting a wall right away
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
goto TrioSpectrum1::Death
}
}

actor TrioSpectrumStart2 : TrioSpectrumStart1
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_SetPointer_Client",2,(TID+7800)*-1)
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
TNT1 A 0 A_SpawnItemEx("TrioSpectrum2",0,0,0,momx,momy,momz,0,1+8+1024+32768)
TNT1 A 1 //A_Stop
stop
Death:
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
TNT1 A 1 A_SpawnItemEx("TrioSpectrumDeathFX2",0,0,0,0,0,0,0,1)
stop
}
}

actor TrioSpectrumDamager
{
PROJECTILE
Obituary "$OB_EVILBEAM"
DamageType "Trio_Beam"
+THRUACTORS
+THRUGHOST
+DONTBLAST
+DONTREFLECT
+SERVERSIDEONLY//+NONETID
renderstyle none
damage (0)
Radius 11
Height 11
speed 30
Args 166
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_CountDownArg(0)
TNT1 A 0 A_SpawnItemEx("TrioSpectrumDamager",0,0,0,momx,momy,momz,0,8+32768)
TNT1 A 0 //A_Stop
TNT1 A 1 A_Explode(66*(CallACS("core_checkrune",RUNE_RAGE,2)+1)*((CallACS("cbm_TrioSpreadCountInv")>=2)*2+1),28,0,0,28)
//TNT1 A 1 A_Explode(66,28,0,0,28)//90
stop
Death:
TNT1 A 1
stop
}
}


actor MidFistEvil : ProjSpawnFuncActor
{
PROJECTILE
damagetype "Trio_Shot2"
Obituary "$OB_EVILFIST"
+SKYEXPLODE
+EXPLODEONWATER
Damage (300)//350
Radius 16
Height 16//10
Speed 26
Scale 2.5

States
{
Spawn:
EVFL CD 1
Loop
Death:
EVFL F 0 
EVFL F 0 A_Recoil(5)
EVFL CD 1 A_FadeOut
Goto Death+2
}
}

actor GigaFistEvil : ProjSpawnFuncActor
{
PROJECTILE
damagetype "Trio_Shot3"
Obituary "$OB_EVILFIST"
+SKYEXPLODE
+EXPLODEONWATER
RenderStyle "Translucent"
Alpha 0.98
Damage (550)
Radius 24
Height 20
Speed 26
scale 2.5
States
{
Spawn:
EVFL F 2
EVFL F 1 A_SpawnItemEx("GigaFistEvilFX",64,0,0,momx/7,momy/7,momz/7,0,1+8)
EVFL G 2
loop
Death:
EVFL F 0 
EVFL F 0 A_Recoil(5)
EVFL F 1 A_FadeOut
Goto Death+2
}
}

Actor GigaFistEvilFX : BasicGraphicEffect
{
States
{
SpawnFrame:
TNT1 A 0
EVFL H 3
EVFL I 5
EVFL I 1 A_FadeOut(0.5)
wait
}
}



actor EvilTrioSparkle : BasicGraphicEffect
{
Renderstyle "Translucent"
Alpha 0.95
ReactionTime 10
States
{
SpawnFrame:
EVFL M 0
EVFL M 0 A_Jump(256,1,2,3,4,5,6)
S1:
EVFL MNO 2 bright A_CountDown
loop
S2:
EVFL OQR 2 bright A_CountDown
loop
}
}







actor TrioRage_Fire_P8 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/waterballoon","Weapon")
TNT1 A 0 A_TakeInventory("EvilRageAmmo",140)
TNT1 A 0 A_TakeInventory("EvilRageAmmo",140,1)
TNT1 A 0 A_SpawnItemEx("TrioBalloon",0,0,32,cos(-pitch),0,sin(-pitch),0,SXF_MULTIPLYSPEED)//8192
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",2,1)
stop
TNT1 A 0 A_SpawnItemEx("TrioBalloon",0,0,32,cos(-pitch),0,sin(-pitch),15,8192)
TNT1 A 0 A_SpawnItemEx("TrioBalloon",0,0,32,cos(-pitch),0,sin(-pitch),-15,8192)
stop
}
}

actor TrioRage_Fire_P7 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/magnetmissile","Weapon")
TNT1 A 0 A_TakeInventory("EvilRageAmmo",280)
TNT1 A 0 A_TakeInventory("EvilRageAmmo",280,1)
TNT1 A 0 A_SpawnItemEx("TrioFlashBomb_H",0,0,32,cos(-pitch),0,sin(-pitch),0,SXF_TRANSFERPITCH+8192)//512
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",2,1)
stop
TNT1 A 0 A_SpawnItemEx("TrioFlashBomb_H",0,0,32,cos(-pitch),0,sin(-pitch),15,512+8192)
TNT1 A 0 A_SpawnItemEx("TrioFlashBomb_H",0,0,32,cos(-pitch),0,sin(-pitch),-15,512+8192)
stop
}
}

actor TrioRage_Fire_P6 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/BlizzStrike","Weapon")
TNT1 A 0 A_TakeInventory("EvilRageAmmo",280)
TNT1 A 0 A_TakeInventory("EvilRageAmmo",280,1)
TNT1 A 0 A_SpawnItemEx("TrioIceWave",0,0,8,cos(-pitch),0,sin(-pitch),0,8192)
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",2,1)
stop
TNT1 A 0 A_SpawnItemEx("TrioIceWave",0,0,8,cos(-pitch),0,sin(-pitch),15,8192)
TNT1 A 0 A_SpawnItemEx("TrioIceWave",0,0,8,cos(-pitch),0,sin(-pitch),-15,8192)
stop
}
}

actor TrioRage_Fire_P5 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("EvilRageAmmo",4)
TNT1 A 0 A_TakeInventory("EvilRageAmmo",5,1)
TNT1 A 0 A_SpawnItemEx("TrioMissiles",20,random(-64,64),random(-8,70),0,0,0,0,0)
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",2,1)
stop
TNT1 A 0 A_SpawnItemEx("TrioMissiles2",20,random(-64,64),random(-8,70),0,0,0,15,0)
TNT1 A 0 A_SpawnItemEx("TrioMissiles3",20,random(-64,64),random(-8,70),0,0,0,-15,0)
stop
}
}

actor TrioRage_Fire_P4 : CustomInventory
{
States
{
Pickup:
//TNT1 A 0 A_PlaySoundEx("misc/wilylightning","Weapon")
TNT1 A 0 A_TakeInventory("EvilRageAmmo",280)
TNT1 A 0 A_TakeInventory("EvilRageAmmo",280,1)
TNT1 A 0 A_SpawnItemEx("TrioThunderClawHelper",0,0,0,0,0,0,0,0)
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",2,1)
stop
TNT1 A 0 A_SpawnItemEx("TrioThunderClawHelper",0,0,0,0,0,0,15,0)
TNT1 A 0 A_SpawnItemEx("TrioThunderClawHelper",0,0,0,0,0,0,-15,0)
stop
}
}

actor TrioRage_Fire_P3A : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("TrioFlameSwing1",0,0,32,cos(-pitch),0,sin(-pitch),0,8192)
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",2,1)
goto Take
TNT1 A 0 A_SpawnItemEx("TrioFlameSwing1",0,0,32,cos(-pitch),0,sin(-pitch),15,8192)
TNT1 A 0 A_SpawnItemEx("TrioFlameSwing1",0,0,32,cos(-pitch),0,sin(-pitch),-15,8192)
goto Take
Take:
TNT1 A 0 A_PlaySoundEx("weapon/atomicfire","Weapon")
TNT1 A 0 A_TakeInventory("EvilRageAmmo",140)
TNT1 A 0 A_TakeInventory("EvilRageAmmo",140,1)
stop
}
}
actor TrioRage_Fire_P3B : TrioRage_Fire_P3A
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("TrioFlameSwing2",0,0,32,cos(-pitch),0,sin(-pitch),0,8192)
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",2,1)
goto Take
TNT1 A 0 A_SpawnItemEx("TrioFlameSwing2",0,0,32,cos(-pitch),0,sin(-pitch),15,8192)
TNT1 A 0 A_SpawnItemEx("TrioFlameSwing2",0,0,32,cos(-pitch),0,sin(-pitch),-15,8192)
goto Take
}
}

actor TrioRage_Fire_P2 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/mirrorabsorb","Weapon")
TNT1 A 0 A_TakeInventory("EvilRageAmmo",280)
TNT1 A 0 A_TakeInventory("EvilRageAmmo",280,1)
TNT1 A 0 A_SpawnItemEx("TrioAstroCrush",0,0,0,0,0,0,0,0)
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",2,1)
stop
TNT1 A 0 A_SpawnItemEx("TrioAstroCrush2",0,0,0,0,0,0,15,0)
TNT1 A 0 A_SpawnItemEx("TrioAstroCrush3",0,0,0,0,0,0,-15,0)
stop
}
}


actor TrioRage_Fire_P1 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("EvilRageAmmo",280)
TNT1 A 0 A_TakeInventory("EvilRageAmmo",280,1)
TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,0,0)
TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,90,0)
TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,-90,0)
TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,180,0)
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",2,1)
stop
TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,0+15,0)
TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,90+15,0)
TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,-90+15,0)
TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,180+15,0)

TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,0-15,0)
TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,90-15,0)
TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,-90-15,0)
TNT1 A 0 A_SpawnItemEx("TrioTornado",0,0,0,20,0,0,180-15,0)
stop
}
}


//Quote from EvilRobot actor in older core file.
////
// If you use ALL the following crap in your classes mod you are bad and you should feel bad
////
//The above was meant as humor for dudes who used it day 1 the core boss existed. [Celebi]

////
////////
//TornadoHold
////////
////
actor TrioTornadoHelper : BasicHelper
{
ReactionTime 28
States
{
Spawn:
TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 1 A_GiveToTarget("TrioTornadoThrust",1)
loop
}
}

actor TrioTornadoThrust : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(CallACS("cbm_IsDashingDisabled"),3)
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 ThrustThingZ(0,40,0,0)
TNT1 A 0
stop
}
}

actor PowerTrioTornadoSpeed : PowerSpeed
{
Speed 1.75
Powerup.Duration 100
}


actor TrioTornado : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_GIGA_TORNADOHOLD"
damagetype "TrioTornadoHold"
+FLOORHUGGER
+RIPPER
+THRUGHOST
+NOCLIP
+DONTSPLASH
+DONTREFLECT
renderstyle Translucent
damage (0)
Radius 10
Height 10
Speed 20
Alpha 0.7
reactiontime 16
scale 2.5
States
{
Spawn:
ERO3 S 0 A_CountDown
ERO3 STU 2 A_SpawnItemEx("TrioTornadoDamager")
ERO3 S 0 A_PlaySoundEx("weapon/superboost","Weapon")
loop
}
}

actor TrioTornadoDamager
{
PROJECTILE
Obituary "$OB_GIGA_TORNADOHOLD"
damagetype "TrioTornadoHold"
+RIPPER
+DONTSPLASH
+DONTBLAST
+THRUGHOST
Damage (50)
Radius 65
Height 1350
Speed 0
States
{
Spawn:
TNT1 A 2
stop
}
}

////
////////
//AstroCrush
////////
////
actor TrioAstroCrush : BasicHelper
{
Args 0
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("TrioMeteor",2,0,0,17,0,0,0,SXF_TRANSFERSPECIAL)//32768
TNT1 A 0 A_SpawnItemEx("TrioMeteor",2,0,0,17,random(-2,20),random(-4,12),0,32768)
TNT1 A 0 A_SpawnItemEx("TrioMeteor",2,0,0,17,random(-20,2),random(-4,12),0,32768)
TNT1 A 0 A_SpawnItemEx("TrioMeteor",2,0,0,17,random(10,40),random(-10,24),0,32768)
TNT1 A 0 A_SpawnItemEx("TrioMeteor",2,0,0,17,random(-40,-10),random(-10,24),0,32768)
TNT1 A 0 A_SpawnItemEx("TrioMeteor",2,0,0,17,random(-64,-20),random(-16,32),0,32768)
TNT1 A 0 A_SpawnItemEx("TrioMeteor",2,0,0,17,random(-32,32),random(-16,32),0,32768)
TNT1 A 0 A_SpawnItemEx("TrioMeteor",2,0,0,17,random(20,64),random(-16,32),0,32768)
stop
}
}
actor TrioAstroCrush2 : TrioAstroCrush{Args 15}
actor TrioAstroCrush3 : TrioAstroCrush{Args -15}

actor TrioMeteor : ProjSpawnFuncActor
{
var int user_A;
PROJECTILE
Obituary "$OB_GIGA_ASTROCRUSH"
Damagetype "TrioAstroCrush"
+THRUGHOST
+SKYEXPLODE
+EXPLODEONWATER
+NOEXPLODEFLOOR
+HEXENBOUNCE
+BRIGHT
renderstyle translucent
alpha 0.1
Damage (40)
Radius 52//260
Height 60//300
Speed 35
Scale 2.0//4.0
States
{
Spawn:
ERO3 V 0
ERO3 V 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,0)//Change pitch to player pitch
ERO3 V 0 A_SetUserVar("user_A",CallACS("cbm_FetchPointerAngle",2)*360.0/256.0*100000.0)//Record player angle
goto Spawn2
Spawn2:
ERO3 V 0 A_JumpIfInventory("CutterFlag",8,"Spawn3")
ERO3 VV 0 A_SpawnItemEx("EvilTrioSparkle",random(-16,16),random(-16,16),random(-16,16),0,0,0,0,1)
ERO3 V 1 A_Recoil(2.5)
ERO3 V 0 A_GiveInventory("CutterFlag",1)
loop
Spawn3:
ERO3 V 0 A_Stop
ERO3 V 0 A_GiveInventory("ResyncPickup",1)
goto Spawn4
Spawn4:
ERO3 V 0 A_JumpIfInventory("CutterFlag",18,"SpawnEnd")
ERO3 VVV 0 A_SpawnItemEx("EvilTrioSparkle",random(-32,32),random(-32,32),random(8,56),0,0,0,0,1)
ERO3 V 1
ERO3 VVV 0 A_SpawnItemEx("EvilTrioSparkle",random(-32,32),random(-32,32),random(8,56),0,0,0,0,1)
ERO3 V 1
ERO3 VVV 0 A_SpawnItemEx("EvilTrioSparkle",random(-32,32),random(-32,32),random(8,56),0,0,0,0,1)
ERO3 V 1
ERO3 VVV 0 A_SpawnItemEx("EvilTrioSparkle",random(-32,32),random(-32,32),random(8,56),0,0,0,0,1)
ERO3 V 1
ERO3 VVV 0 A_SpawnItemEx("EvilTrioSparkle",random(-32,32),random(-32,32),random(8,56),0,0,0,0,1)
ERO3 V 0 A_FadeIn(0.1)
ERO3 V 1 A_GiveInventory("CutterFlag",1)
loop
SpawnEnd:
ERO3 V 0 A_SpawnItemEx("TrioMeteor2",0,0,0,cos(-pitch)*35,0,sin(-pitch)*35,user_A/100000.0+Args[0],1+4)
stop
Death:
TNT1 A 0
TNT1 A 1 A_JumpIfInventory("CutterFlag",8,"Death2")
stop
Death2:
TNT1 A 0 A_playSoundEx("wep_L/AstroACrush","Weapon")//weapon/astrocrush
TNT1 A 0 A_Explode(240,196,0,0,53)
TNT1 AAAAAAAAAAAAAAAAA 1 A_SpawnItemEx("TrioMeteorExplodeFX",random(-72,72),random(-72,72),random(-72,72),0,0,0,0,1)
stop
}
}

actor TrioMeteor2 : TrioMeteor
{
-HEXENBOUNCE
-NOEXPLODEFLOOR
alpha 1.0
Damage (5)
Speed 35
Scale 2.0
States
{
Spawn:
TNT1 A 0
TNT1 A 0 //A_PlaySoundEx("weapon/pharaoh2","Item")
SpawnLoop:
ERO3 V 4 A_SpawnItemEx("TrioMeteorFX",0,0,0,0,0,0,0,1)
loop
Death:
TNT1 A 0
goto Death2
}
}

actor TrioMeteorExplodeFX : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
scale 2.0
States
{
SpawnFrame:
ASEX ABCDEF 2
stop
}
}

actor TrioMeteorFX : BasicGraphicEffect
{
+BRIGHT
alpha 0.3
renderstyle translucent
Scale 2.0//4.0
States
{
SpawnFrame:
ERO3 V 2 A_FadeOut(0.02)
wait
}
}

////
////////
//FlameSword
////////
////
actor TrioFlameSwing1 : BasicExplosion
{
speed 1
states
{
Spawn:
TNT1 A 0

TNT1 A 1 A_SpawnItemEx("TrioFlameTip",3,315,240,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlameTip",3,280,220,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,245,200,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,210,180,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,175,160,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,140,140,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,105,120,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,70,100,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,35,80,momx*38,momy*38,momz*38,0,8)

TNT1 A 0 A_SpawnItemEx("TrioFlame",3,0,60,momx*38,momy*38,momz*38,0,8)//Middle

TNT1 A 1 A_SpawnItemEx("TrioFlame",3,-35,40,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,-70,20,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,-105,0,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,-140,-20,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,-175,-40,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,-210,-60,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,-245,-80,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlameTip",3,-280,-100,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlameTip",3,-315,-120,momx*38,momy*38,momz*38,0,8)

stop
}
}

actor TrioFlameSwing2 : TrioFlameSwing1
{
states
{
Spawn:
TNT1 A 0

TNT1 A 1 A_SpawnItemEx("TrioFlameTip",3,-315,120,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlameTip",3,-280,240,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,-245,200,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,-210,180,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,-175,160,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,-140,140,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,-105,120,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,-70,100,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,-35,80,momx*38,momy*38,momz*38,0,8)

TNT1 A 0 A_SpawnItemEx("TrioFlame",3,0,60,momx*38,momy*38,momz*38,0,8)//Middle

TNT1 A 1 A_SpawnItemEx("TrioFlame",3,35,40,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,70,20,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,105,0,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,140,-20,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,175,-40,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlame",3,210,-60,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlame",3,245,-80,momx*38,momy*38,momz*38,0,8)
TNT1 A 0 A_SpawnItemEx("TrioFlameTip",3,280,-100,momx*38,momy*38,momz*38,0,8)
TNT1 A 1 A_SpawnItemEx("TrioFlameTip",3,315,-120,momx*38,momy*38,momz*38,0,8)

stop
}
}


actor TrioFlame : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_GIGA_FLAMESWORD"
Damagetype "TrioFlameSword"
+NOCLIP
+NOINTERACTION
+THRUGHOST
+BRIGHT
+DONTREFLECT
Damage (0)//30
Height 2//32
Radius 2//40
reactiontime 2//6
Scale 3.5
states
{
Spawn:
FWVE A 0 A_CountDown
FWVE A 0 A_Explode(50,80,0,0,80)
FWVE A 0 A_SpawnItemEx("TrioFlameFX",0,0,40,-6,0,5,0,1)
FWVE A 0 A_SpawnItemEx("TrioFlameFX",0,0,-40,-6,0,-5,0,1)
FWVE AAA 1 A_Explode(50,80,0,0,80)
FWVE B 0 A_SpawnItemEx("TrioFlameFX",0,0,40,-6,0,5,0,1)
FWVE B 0 A_SpawnItemEx("TrioFlameFX",0,0,-40,-6,0,-5,0,1)
FWVE BBB 1 A_Explode(50,80,0,0,80)
FWVE C 0 A_SpawnItemEx("TrioFlameFX",0,0,40,-6,0,5,0,1)
FWVE C 0 A_SpawnItemEx("TrioFlameFX",0,0,-40,-6,0,-5,0,1)
FWVE CCC 1 A_Explode(50,80,0,0,80)
loop
}
}

actor TrioFlameTip : TrioFlame
{
renderstyle none
}

actor TrioFlameFX : BasicGraphicEffect
{
+BRIGHT
Scale 4.0
States
{
SpawnFrame:
FSWD D 0
FSWD D 5
FSWD EF 4
stop
}
}

actor TrioFlameSwordProtect : PowerProtection
{
Powerup.Duration 3
DamageFactor "TrioFlameSword", 0.0//0.375
}

////
////////
//ThunderClaw
////////
////
actor TrioThunderClawHelper : BasicHelper
{
var int user_TID;
var int user_A1;
ReactionTime 45
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_TID",CallACS("core_gettarget"))
TNT1 A 0 A_SetUserVar("user_A1",90)
goto SpawnFire
SpawnFire:
TNT1 A 0 Thing_Move(0,user_TID,1)
TNT1 A 0 A_SpawnItemEx("TrioThunderClawBit",8,0,10,80,0,0,user_A1,32)
TNT1 A 0 A_SpawnItemEx("TrioThunderClawBit",-8,0,10,-80,0,0,user_A1,32)
TNT1 A 0 A_CountDown
TNT1 A 0 A_SetUserVar("user_A1",user_A1+8)
TNT1 A 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
loop
}
}

actor TrioThunderClawBit : ProjSpawnFuncActor
{
translation "197:197=41:41", "75:75=249:249"
var int user_D;
PROJECTILE
+SKYEXPLODE
+EXPLODEONWATER
+THRUGHOST
+FORCEXYBILLBOARD
+BRIGHT
damagetype "TrioThunderClaw"
Obituary "$OB_GIGA_THUNDERCLAW"
Damage (40+user_D*10)
Radius 32//40
Height 46//55

Speed 80
Scale 3.0//4.0
States
{
Spawn:
TNT1 A 1
WCPJ KLMNOJKLMNOJKLMNO 1 A_SetUserVar("user_D",user_D+1)
WCPJ JKLMNO 1
stop
XDeath:
TNT1 A 1 A_SpawnItemEX("ElectrifyEffect")
stop
Death:
TNT1 A 0 A_Explode(user_D*10+10,64+user_D*2,0,0,32+user_D*1.25)
goto XDeath
}
}

////
////////
//HomingSniper
////////
////

actor TrioSniper : ProjSpawnFuncActorFast
{
PROJECTILE
damagetype "TrioHomingSniperShock"
Obituary "$OB_GIGA_HOMINGSNIPER"

//+SEEKERMISSILE
+SKYEXPLODE
+EXPLODEONWATER
+THRUGHOST
+DONTREFLECT
+DONTBLAST

ReactionTime 1
damage (60)
height 12
Radius 12
Speed 500
MissileHeight 8
//MissileType "TrioSniperFX"
scale 4.0
States
{
Spawn:
Homing:
TNT1 A 0 A_GiveInventory("CutterFlag",1)
TNT1 A 0 A_PlaySoundEx("misc/BombCount","Weapon")
ERO3 WWWWXXXXYYYY 1 A_SpawnItemEx("EvilTrioSparkle",0,0,0,0,0,0,0,1)
ERO3 WWWWXXXXYYYY 1 A_SpawnItemEx("EvilTrioSparkle",0,0,0,0,0,0,0,1)
TNT1 A 0 A_JumpIfInventory("CutterFlag",2,"Homing2")
loop
Homing2:
TNT1 A 0 A_JumpIfInventory("CutterFlag",8,"Homing3")
TNT1 A 0 A_GiveInventory("CutterFlag",1)
TNT1 A 0 A_PlaySoundEx("misc/BombCount","Weapon")
ERO3 WWWWXX 1 A_SpawnItemEx("EvilTrioSparkle",0,0,0,0,0,0,0,1)
TNT1 A 0 A_PlaySoundEx("misc/BombCount","Weapon")
ERO3 XXYYYY 1 A_SpawnItemEx("EvilTrioSparkle",0,0,0,0,0,0,0,1)
loop
Homing3:
ERO3 XXYYYY 1 A_CountDown
loop
Death:
TNT1 A 0 A_JumpIfInventory("CutterFlag",18,"Locked")
TNT1 A 0 A_GiveInventory("CutterFlag",1)
TNT1 A 0 A_PlaySoundEx("misc/BombCount","Weapon")
ERO3 WXY 1 //A_MStaffTrack
loop
Locked:
ERO3 W 0 A_Stop
ERO3 W 0 A_GiveToTarget("CutterFlag",1)

ERO3 W 0 Thing_Remove(-7800-CallACS("core_gettarget"))
ERO3 W 0 Thing_ChangeTID(0,-7800-CallACS("core_gettarget"))

ERO3 W 100
stop
}
}

actor TrioSniperFX : BasicClientSide
{
States
{
Spawn:
TNT1 A 0
TNT1 AAAA 0 A_SpawnItemEx("EvilTrioSparkle",random(-16,16),random(-16,16),random(-16,16),0,0,0,0,1)
stop
}
}

actor TrioMissiles : ProjSpawnFuncActor
{
damagetype "TrioHomingSniper"
Obituary "$OB_GIGA_HOMINGSNIPER"
+MISSILE
+NOINTERACTION
+NOEXPLODEFLOOR
+NOGRAVITY
-SOLID
scale 2.0
Args 0
States
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_aimattargetcursor",-7800-CallACS("core_gettarget"),8)
TNT1 A 0 A_PlaySoundEx("weapon/TrioMagnet","Weapon")
TNT1 A 0 A_SpawnItemEx("TrioMissile",cos(-pitch)*8,0,8+(sin(-pitch)*8),cos(-pitch)*132,0,sin(-pitch)*132,Args[0],1,0)//random(-4,4)
MMFX BCDE 2 bright
stop
}
}
actor TrioMissiles2 : TrioMissiles{Args 15}
actor TrioMissiles3 : TrioMissiles{Args -15}

actor TrioMissile : ProjSpawnFuncActor
{
PROJECTILE
damagetype "TrioHomingSniper"
Obituary "$OB_GIGA_HOMINGSNIPER"
+THRUGHOST
Damage (80)
Radius 40
Height 40
Speed 264
scale 3.5
States
{
Spawn:
HSNM BC 2
loop
Death:
MMFX BCDE 2 bright
stop
}
}

////
////////
//IceWave
////////
////
actor TrioIceWave : ProjSpawnFuncActor
{
PROJECTILE
Damagetype "TrioIceWave"
Obituary "$OB_GIGA_ICEWAVE"
-NOGRAVITY
+DONTREFLECT
+SKYEXPLODE
+BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
+DONTSPLASH
+THRUGHOST
+THRUACTORS
Gravity 0.75
BounceFactor 0.95
WallBounceFactor 0.99
BounceCount 40
Renderstyle Translucent
alpha 0.5
Reactiontime 20
Radius 16
Height 16
damage (0)
speed 20//16
scale 1.0
States
{
Spawn:
ERO3 PPPPPPPP 1 A_SpawnItemEx("TrioIceWaveFX_H",0,0,0,0,0,0,0,1)
ERO3 P 0 A_PlaySoundEx("weapon/icewavespawn","Weapon")
ERO3 P 0 A_SpawnItemEx("TrioIceWavePart")
ERO3 P 0 A_CountDown
//+SEEKERMISSILE
//A_Tracer2
loop
Death:
TNT1 A 1
stop
}
}
//TrioIceWave2
//reactiontime 40


actor TrioIceWaveFX_H : BasicClientSide
{
States
{
Spawn:
TNT1 A 0
TNT1 AAAAA 0 A_SpawnItemEx("TrioIceWaveFX",random(-48,48),random(-48,48),random(2,48),0,0,0,0,1)
stop
}
}

actor TrioIceWaveFX : BasicGraphicEffect
{
//Gravity 0.2
scale 3.0
States
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_SetScale(ScaleX*(random(0,1)*2-1),ScaleY)
EVFL K 4
EVFL L 15
EVFL L 1 A_Fadeout
wait
}
}

actor TrioIceWavePart : ProjSpawnFuncActor
{
PROJECTILE
Damagetype "TrioIceWave"
Obituary "$OB_GIGA_ICEWAVE"
+SHOOTABLE
+THRUGHOST
+GHOST
-NOBLOCKMAP
+BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
BounceFactor 0.95
WallBounceFactor 0.95
BounceCount 20
//+SOLID
mass 9999999
health 1
Renderstyle Translucent
alpha 0.5
ReactionTime 1
Damage (150)
Radius 64
Height 64
Speed 0
scale 1.25//2.5
States
{
Spawn:
ERO3 P 0
ERO3 PPPPPPPPPP 0 A_SpawnItemEx("TrioIceWaveFX",random(-48,48),random(-48,48),random(2,48),3,0,random(1,3),random(0,359),1)
ERO3 PQ 5
ERO3 R 0 A_SetArg(3,40)
Spawn2:
ERO3 R 0 A_Stop
ERO3 RR 10 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death2")
ERO3 R 0 A_CountdownArg(3)
loop
//goto Death2
Death2:
ERO3 M 1 A_CountDown
wait
Death:
TNT1 A 0
TNT1 A 0 A_PlaySound("weapon/centaurflash")
TNT1 AAAAAA 0 A_SpawnItemEx("TrioIceWaveShards",random(-64,64),random(-64,64),random(5,60),random(-3,3),random(-3,3),random(-3,3),random(0,360),1)
TNT1 A 2
stop
}
}

actor TrioIceWaveCharging : BasicExplosion
{
+FORCEXYBILLBOARD
+BRIGHT
speed 80
scale 2.5
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D NN 1 A_Warp(2,0,0,32,0,WARPF_NOCHECKPOSITION+WARPF_INTERPOLATE)//8+16
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D MM 1 A_Warp(2,0,0,32,0,8+16)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D LL 1 A_Warp(2,0,0,32,0,8+16)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D KK 1 A_Warp(2,0,0,32,0,8+16)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D JJ 1 A_Warp(2,0,0,32,0,8+16)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D II 1 A_Warp(2,0,0,32,0,8+16)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D HH 1 A_Warp(2,0,0,32,0,8+16)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D GG 1 A_Warp(2,0,0,32,0,8+16)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D FF 1 A_Warp(2,0,0,32,0,8+16)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D EE 1 A_Warp(2,0,0,32,0,8+16)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D DD 1 A_Warp(2,0,0,32,0,8+16)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D CC 1 A_Warp(2,0,0,32,0,8+16)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
Q_1D BB 1 A_Warp(2,0,0,32,0,8+16)
stop
}
}

actor TrioIceWaveShards : BasicGraphicEffectM
{
+THRUACTORS
+THRUGHOST
alpha 0.5
Radius 10
Height 10
Speed 2
Scale 3.0//4.5
States
{
SpawnFrame:
ICEW FGH 20//30
stop
}
}

////
////////
//FlashBomb
////////
////


actor TrioFlashBomb_H : BasicExplosion
{
Speed 1
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,8,sin(-pitch)*55,0,1)
TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,16,sin(-pitch)*55,0,1)
//TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,24,sin(-pitch)*55,0,1)
TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,-8,sin(-pitch)*55,0,1)
TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,-16,sin(-pitch)*55,0,1)
//TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,-24,sin(-pitch)*55,0,1)

TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,0,sin(-pitch)*55,0,1)

//TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,0,sin(-pitch)*55+24,0,1)
TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,0,sin(-pitch)*55+16,0,1)
TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,0,sin(-pitch)*55+8,0,1)
TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,0,sin(-pitch)*55-8,0,1)
TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,0,sin(-pitch)*55-16,0,1)
//TNT1 A 0 A_SpawnItemEx("TrioFlashBomb",cos(-pitch)*9,8,sin(-pitch)*9,cos(-pitch)*55,0,sin(-pitch)*55-24,0,1)
TNT1 A 0
stop
}
}

actor TrioFlashBomb : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_GIGA_FLASHBOMB"
Damagetype "TrioFlashBomb2"
+SKYEXPLODE
+EXPLODEONWATER
+THRUGHOST
+FORCEXYBILLBOARD
reactiontime 10
damage (40)
radius 12
height 10
Speed 40
scale 2.5
States
{
Spawn:
FLSB BCDE 3 A_CountDown
loop
Death:
FLEX A 0 A_PlaySoundEx("weapons/mm8/flashbombexplode","Weapon")
FLEX A 1 bright A_SpawnItemEx("TrioFlashBombExplosion")
stop
}
}

actor TrioFlashBombExplosion : BasicExplosion
{
var int user_Flash;
Obituary "$OB_GIGA_FLASHBOMB"
damagetype "TrioFlashBomb"
+FORCEXYBILLBOARD
+BRIGHT
Reactiontime 12//5
Scale 3.5
States
{
Spawn:
FLEX A 0
FLEX A 0 A_SetUserVar("user_Flash",200)
FLEX AB 1
FLEX CD 1
FLEX A 0 A_Explode(230,80,0,0,16)
FLEX EE 0 A_SpawnItemEx("FlashBombFX2",Random(-16, 16),Random(-40, 40), Random(-32, 32),0,0,0,0, SXF_WEPFXCOLOR)
FLEX EF 1 A_SpawnItemEx("FlashBombFX1",0,0,0,random(-7, 7),random(-7, 7),random(-7, 7),random(0,360), SXF_WEPFXCOLOR)
FLEX EE 0 A_SpawnItemEx("FlashBombFX2",Random(-16, 16),Random(-40, 40), Random(-32, 32),0,0,0,0, SXF_WEPFXCOLOR)
FLEX GF 1 A_SpawnItemEx("FlashBombFX1",0,0,0,random(-7, 7),random(-7, 7),random(-7, 7),random(0,360), SXF_WEPFXCOLOR)
FLEX A 0 A_Explode(220,80,0,0,16)
Goto Pattern1
Pattern1:
FLEX EF 1 A_SpawnItemEx("FlashBombFX1",0,0,0,random(-7, 7),random(-7, 7),random(-7, 7),random(0,360), SXF_WEPFXCOLOR)
FLEX E 0 A_SpawnItemEx("FlashBombFX2",Random(-16, 16),Random(-16, -40), Random(-32, 32),0,0,0,0, SXF_WEPFXCOLOR)
FLEX GF 1 A_SpawnItemEx("FlashBombFX2",Random(-16, 16),Random(16, 40), Random(-32, 32),0,0,0,0, SXF_WEPFXCOLOR)
FLEX G 0 A_SpawnItemEx("FlashBombFX1",0,0,0,random(-7, 7),random(-7, 7),random(-7, 7),random(0,360), SXF_WEPFXCOLOR)
Goto DamageNow
Pattern2:
FLEX EF 1 A_SpawnItemEx("FlashBombFX1",0,0,0,random(-7, 7),random(-7, 7),random(-7, 7),random(0,360), SXF_WEPFXCOLOR)
FLEX E 0 A_SpawnItemEx("FlashBombFX2",Random(-16, 16),Random(32, 64), Random(-32, 40),0,0,0,0, SXF_WEPFXCOLOR)
FLEX E 0 A_SpawnItemEx("FlashBombFX2",Random(-16, 16),Random(-32, -64), Random(-32, 40),0,0,0,0, SXF_WEPFXCOLOR)
FLEX EF 1 A_SpawnItemEx("FlashBombFX2",Random(-16, 16),Random(-40, 40), Random(-32, 32),0,0,0,0, SXF_WEPFXCOLOR)
FLEX G 0 A_SpawnItemEx("FlashBombFX1",0,0,0,random(-7, 7),random(-7, 7),random(-7, 7),random(0,360), SXF_WEPFXCOLOR)
Goto DamageNow
DamageNow:
FLEX E 0 A_Explode(user_Flash,80,0,0,8)
Goto Continue
Continue:
FLEX E 0 A_CountDown
FLEX E 0 A_SetUserVar("user_Flash",user_Flash-10)
FLEX E 0 A_Jump(256,"Pattern1","Pattern2")
Goto Death
Death:
FLEX A 0 A_SetGravity(0.0)
FLEX G 1
TNT1 A 1
FLEX D 1
TNT1 A 1
FLEX D 1
TNT1 A 1
FLEZ C 1
stop
}
}



actor TrioFlashBombProtect : PowerProtection
{
Powerup.Duration 15
DamageFactor "TrioFlashBomb", 0.25//0.125
}
////
////////
//WaterBalloon
////////
////
actor TrioBalloon : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_GIGA_WATERBALLOON"
damagetype "TrioWaterBalloon"
+SKYEXPLODE
+THRUGHOST
+BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
//+ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
WALLBOUNCEFACTOR 1.0
BOUNCEFACTOR 1.0
BounceCount 10
renderstyle Translucent
Alpha 0.2
reactiontime 6
Damage (250)
Height 56
Radius 56
Speed 15//30
Scale 2.0//2.5
States
{
Spawn:
ERO3 Z 0
ERO3 Z 4 A_FadeIn(0.1)
ERO4 AB 4 A_FadeIn(0.1)
ERO3 Z 4 A_FadeIn(0.1)
ERO4 AB 4 A_FadeIn(0.1)
ERO3 Z 4 A_FadeIn(0.1)
Goto Spawn2
Spawn2:
ERO3 Z 0 A_ScaleVelocity(0.85)
ERO3 Z 4 A_Countdown
ERO4 AB 4
loop
Death:
TNT1 AA 0 A_SpawnItemEx("TrioBalloon2",0,0,0,random(-8,8),0,random(-7,7),random(0,359))
TNT1 A 0 A_SpawnItemEx("TrioBalloon2",0,0,0,random(5,14),0,random(-7,7),random(-10,10))
TNT1 A 0 A_SpawnItemEx("TrioBalloon2",0,0,0,random(5,14),0,random(-7,7),random(80,100))
TNT1 A 0 A_SpawnItemEx("TrioBalloon2",0,0,0,random(5,14),0,random(-7,7),random(170,190))
TNT1 A 0 A_SpawnItemEx("TrioBalloon2",0,0,0,random(5,14),0,random(-7,7),random(260,280))
XDeath:
TNT1 A 0 A_PlaySoundEx("misc/splash","Weapon")
TNT1 AAAAAA 1 A_SpawnItemEx("TrioSplash",random(-96,96),random(-96,96),random(-96,96),0,0,0,0,1)
stop
}
}

actor TrioBalloon2 : TrioBalloon
{
-NOGRAVITY
Gravity 0.50
BounceCount 15
Alpha 0.8
reactiontime 1
Damage (120)//150
Radius 32
Height 32
Speed 35
Scale 1.25
Args 13
States
{
Spawn:
ERO3 Z 4 A_FadeIn(0.1)
ERO4 AB 4 A_FadeIn(0.1)
ERO3 Z 0 A_SetArg(0,13-random(1,7))
Goto Spawn2
Spawn2:
ERO3 Z 4 A_CountdownArg(0)
ERO4 AB 4
loop
Death:
TNT1 AA 0 A_SpawnItemEx("TrioBalloon3",0,0,0,random(-8,8),0,random(-4,7),random(0,359))
TNT1 A 0 A_SpawnItemEx("TrioBalloon3",0,0,0,random(4,10),0,random(1,9),0)
TNT1 A 0 A_SpawnItemEx("TrioBalloon3",0,0,0,random(4,10),0,random(-5,5),30)
TNT1 A 0 A_SpawnItemEx("TrioBalloon3",0,0,0,random(4,10),0,random(-5,5),-30)
TNT1 A 0 A_SpawnItemEx("TrioBalloon3",0,0,0,random(4,10),0,random(-1,-9),0)
XDeath:
TNT1 A 0 A_PlaySoundEx("weapon/TrioSplash","Weapon")
TNT1 AAAA 1 A_SpawnItemEx("TrioSplash2",random(-64,64),random(-64,64),random(-64,64),0,0,0,0,1)
stop
}
}

actor TrioBalloon3 : TrioBalloon2
{
Gravity 0.35
BounceCount 20
reactiontime 1
Damage (80)
Radius 16
Height 16
Speed 40
Scale 0.75
Args 14
States
{
Spawn:
ERO3 Z 4 A_FadeIn(0.1)
ERO4 AB 4 A_FadeIn(0.1)
ERO3 Z 0 A_SetArg(0,14-random(1,7))
Goto Spawn2
Spawn2:
ERO3 Z 4 A_CountdownArg(0)
ERO4 AB 4
loop
XDeath:
Death:
TNT1 A 0 A_PlaySoundEx("weapon/TrioSplash","Weapon")
TNT1 A 1 A_SpawnItemEx("TrioSplash3",0,0,0,0,0,0,0,1)
stop
}
}

actor TrioSplash : BasicGraphicEffect
{
states
{
SpawnFrame:
WTRB KLMN 2
stop
}
}
actor TrioSplash2 : TrioSplash{Scale 2.0}
actor TrioSplash3 : TrioSplash{Scale 1.5}


//actor EvilRobot_W_NormalBar : NormalBar {Args 41,249}
actor EvilRobot_W_ScriptBar : ScriptBar {}