actor Trio : ClassBase
{
Player.ScoreIcon "C_08K0X"
player.displayname "EvilRobot"
player.soundclass "evilrobotc"

player.maxhealth 1150
health 1150
player.jumpz 10
player.forwardmove 0.73, 0.73
player.sidemove 0.71, 0.71

player.startitem "CBM_BaseFlagPack"
player.startitem "ModeWeps"

player.startitem "IsEvilRobot_F"
player.startitem "EvilRobot_W"
player.startitem "EvilRageAmmo", 112
player.startitem "EvilRobotItem"
player.startitem "TrioSpawnStart_P"

player.startitem "NoAmmoPickup"
player.startitem "CopyNerfGiver_P"

States
{
Spawn:
EROB A 0
EROB B 1
EROB A 1
Goto Spawn+2
See:
EROB BCDE 5
Goto Spawn
Missile:
EROB FF 1 A_JumpIfInventory("VivifyFlag3",1,"Missile2")
EROB F 3
EROB G 4
goto Spawn
Missile2:
EROB I 1
EROB I 1 A_JumpIfInventory("VivifyFlag3",1,1)
goto Missile
EROB I 1
EROB I 1 A_JumpIfInventory("VivifyFlag3",1,1)
goto Missile
EROB I 1
EROB I 1 A_JumpIfInventory("VivifyFlag3",1,1)
goto Missile
EROB J 1
EROB J 1 A_JumpIfInventory("VivifyFlag3",1,1)
goto Missile
EROB J 1
EROB J 1 A_JumpIfInventory("VivifyFlag3",1,1)
goto Missile
EROB J 1
EROB J 1 A_JumpIfInventory("VivifyFlag3",1,"Missile2")
goto Missile
ClassPain:
EROB H 0
goto MegamanPain
ClassDeath:
EROB H 0
goto MegamanDeath
}
}

actor TrioExodiaFlag : OnceC{}
actor TrioExodiaFlag0 : OnceC{}
actor TrioExodiaFlag1 : OnceC{}
actor TrioExodiaFlag2 : OnceC{}
actor TrioExodiaFlag3 : OnceC{}
actor TrioExodiaFlag4 : OnceC{}
actor TrioExodiaFlag5 : OnceC{}
actor TrioExodiaFlag6 : OnceC{}

actor TrioRareDeathHelper : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,"S_1","S_2","S_3","S_4","S_5","S_6")
goto S_1
S_1:
TNT1 A 1 A_SpawnItemEx("TrioExodia_P1",0,0,40,momx+random(2,3),momy+frandom(-1,1),momz+frandom(2,6),random(-2,2),41,0)
stop
S_2:
TNT1 A 1 A_SpawnItemEx("TrioExodia_P2",0,0,28,momx+random(1,3),momy+frandom(-1,1),momz+frandom(2,6),random(-2,2),41,0)
stop
S_3:
TNT1 A 1 A_SpawnItemEx("TrioExodia_P3",0,0,30,momx+random(1,4),momy+frandom(-2,2),momz+frandom(2,6),random(-2,2),41,0)
stop
S_4:
TNT1 A 1 A_SpawnItemEx("TrioExodia_P4",0,0,30,momx+random(1,4),momy+frandom(-2,2),momz+frandom(2,6),random(-2,2),41,0)
stop
S_5:
TNT1 A 1 A_SpawnItemEx("TrioExodia_P5",0,0,6,momx+random(1,4),momy+frandom(-2,2),momz+frandom(2,6),random(-2,2),41,0)
stop
S_6:
TNT1 A 1 A_SpawnItemEx("TrioExodia_P6",0,0,6,momx+random(1,4),momy+frandom(-2,2),momz+frandom(2,6),random(-2,2),41,0)
stop
}
}

actor TrioExodia_PFX : BasicClientSide
{
renderstyle translucent
alpha 0.8
Scale 0.25
States
{
Spawn:
EVFL XXYYZZ 2 ThrustThingZ(0,random(1,3),0,1)
Spawn2:
EVFL Z 1 ThrustThingZ(0,random(1,3),0,1)
EVFL Z 1 A_FadeOut(0.185)
wait
}
}

actor TrioExodia_P1 : CustomInventory
{
inventory.pickupmessage "\ctPicked up the Head of the \cgForbidden One\ct."
inventory.amount 1
inventory.maxamount 1
scale 2.5
States
{
Spawn:
ERO9 M 1
goto Spawn2
Spawn2:
//300 * 5 // A_SpawnItemEx("TrioExodia_PFX",random(0,4),0,random(6,24),random(0,1),0,random(1,3),random(0,359),1)
"----" "############################################################################################################################################################################################################################################################################################################" 5 A_SpawnItemEx("TrioExodia_PFX",random(4,10),0,random(6,24),random(-1,1),0,random(0,2),random(0,359),1)
"----" "#" 1 A_FadeOut(0.05)
wait
Pickup:
TNT1 A 0 A_GiveInventory("TrioExodiaFlag1",1)
goto End
End:
TNT1 A 0 A_PlaySoundEx("GNT/Treasure","Item")
TNT1 A 0 A_GiveInventory("TrioExodia_PX",1)
stop
}
}

actor TrioExodia_P2 : TrioExodia_P1
{
inventory.pickupmessage "\ctPicked up the Body of the \cgForbidden One\ct."
States
{
Spawn:
ERO9 N 1
goto Spawn2
Pickup:
TNT1 A 0 A_GiveInventory("TrioExodiaFlag2",1)
goto End
}
}
actor TrioExodia_P3 : TrioExodia_P1
{
inventory.pickupmessage "\ctPicked up the Right Arm of the \cgForbidden One\ct."
States
{
Spawn:
ERO9 O 1
goto Spawn2
Pickup:
TNT1 A 0 A_GiveInventory("TrioExodiaFlag3",1)
goto End
}
}
actor TrioExodia_P4 : TrioExodia_P1
{
inventory.pickupmessage "\ctPicked up the Left Arm of the \cgForbidden One\ct."
States
{
Spawn:
ERO9 P 1
goto Spawn2
Pickup:
TNT1 A 0 A_GiveInventory("TrioExodiaFlag4",1)
goto End
}
}
actor TrioExodia_P5 : TrioExodia_P1
{
inventory.pickupmessage "\ctPicked up the Right Leg of the \cgForbidden One\ct."
States
{
Spawn:
ERO9 Q 1
goto Spawn2
Pickup:
TNT1 A 0 A_GiveInventory("TrioExodiaFlag5",1)
goto End
}
}
actor TrioExodia_P6 : TrioExodia_P1
{
inventory.pickupmessage "\ctPicked up the Left Leg of the \cgForbidden One\ct."
States
{
Spawn:
ERO9 R 1
goto Spawn2
Pickup:
TNT1 A 0 A_GiveInventory("TrioExodiaFlag6",1)
goto End
}
}

actor TrioExodia_PX : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag1",1,1)
stop
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag2",1,1)
stop
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag3",1,1)
stop
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag4",1,1)
stop
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag5",1,1)
stop
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag6",1,1)
stop
TNT1 A 0 A_GiveInventory("TrioExodia_PZ")
stop
}
}

actor TrioExodia_PZ : CustomInventory
{
inventory.pickupmessage "\ctYou have collected all six pieces of the \cgForbidden One\ct!"
Inventory.PickupAnnouncerEntry "spread"
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteWithResult("core_runeplayer",0,1,RUNE_SPREAD)
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag",1,3)
TNT1 A 0 A_SpawnItemEx("TrioExodiaFollow",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("TrioExodiaFollow_W")
TNT1 A 0 A_GiveInventory("TrioExodiaFlag")
stop
}
}

actor TrioExodiaFollow_W : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("weapon/TrioExodia","Weapon")
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_Warp(2,0,0,28,0,24)
TNT1 A 10
stop
}
}

actor TrioExodiaFollow : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0
TNT1 AA 1 A_GiveToTarget("TrioExodiaFollowFX_P",1)
TNT1 A 2
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
goto Spawn+2
}
}

actor TrioExodiaFollowFX_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("TrioExodiaFollowFX",0,0,84,momx,momy,momz,0,9)
stop
}
}

actor TrioExodiaFollowFX : BasicClientSide
{
States
{
Spawn:
EVFL J 0
EVFL J 1
stop
}
}

actor TrioExodiaDropper_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag",1,"No")
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag1",1,"P_1")
goto P_1+2
No:
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag0",1,"P_0_Bonus")
stop
P_0_Bonus:
TNT1 A 0 A_SpawnItemEx("TrioRareDeathHelper",0,0,0,momx,momy,momz,0,9)
stop
P_1:
TNT1 A 0 A_SpawnItemEx("TrioExodia_P1",0,0,8,random(2,6),0,random(4,9),random(0,359),1)
TNT1 A 0 A_GiveInventory("TrioExodiaFlag0",1)
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag2",1,"P_2")
goto P_2+2
P_2:
TNT1 A 0 A_SpawnItemEx("TrioExodia_P2",0,0,8,random(2,6),0,random(4,9),random(0,359),1)
TNT1 A 0 A_GiveInventory("TrioExodiaFlag0",1)
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag3",1,"P_3")
goto P_3+2
P_3:
TNT1 A 0 A_SpawnItemEx("TrioExodia_P3",0,0,8,random(2,6),0,random(4,9),random(0,359),1)
TNT1 A 0 A_GiveInventory("TrioExodiaFlag0",1)
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag4",1,"P_4")
goto P_4+2
P_4:
TNT1 A 0 A_SpawnItemEx("TrioExodia_P4",0,0,8,random(2,6),0,random(4,9),random(0,359),1)
TNT1 A 0 A_GiveInventory("TrioExodiaFlag0",1)
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag5",1,"P_5")
goto P_5+2
P_5:
TNT1 A 0 A_SpawnItemEx("TrioExodia_P5",0,0,8,random(2,6),0,random(4,9),random(0,359),1)
TNT1 A 0 A_GiveInventory("TrioExodiaFlag0",1)
TNT1 A 0 A_JumpIfInventory("TrioExodiaFlag6",1,"P_6")
goto No
P_6:
TNT1 A 0 A_SpawnItemEx("TrioExodia_P6",0,0,8,random(2,6),0,random(4,9),random(0,359),1)
TNT1 A 0 A_GiveInventory("TrioExodiaFlag0",1)
goto No
}
}