actor Grenademan : ClassBase
{
Player.ScoreIcon "C_08G0X"
player.displayname "Grenademan"
player.soundclass "GrenademanC"
player.startitem "FlashBombBoss"
player.startitem "FBOMBBOSSAMMO",28
player.forwardmove 0.74, 0.74
player.sidemove 0.72, 0.72

player.startitem "ThunderClawWeakness2", 1

player.startitem "ThunderBoltWeakness", 1
player.startitem "ThunderClawWeakness", 1
player.startitem "ThunderBeamWeakness", 1
player.startitem "SparkShockWeakness", 1
player.startitem "ThunderBeamWeakness", 1
player.startitem "LightningBoltWeakness", 1
player.startitem "PlugBallWeakness", 1
States
{
Spawn:
GREM A 0
GREM B 1
GREM A 1
Goto Spawn+2
See:
GREM BCDE 5
Goto Spawn
Missile:
GREM FFFFF 1
GREM GGGG 1
goto Spawn
ClassPain:
GREM H 0
goto PainContinue
DeathFix:
GREM H 0 A_GiveInventory("ThatFeltGoodAmmo",ACS_ExecuteWithResult(191,11))
GREM H 0 A_JumpIfInventory("THATFELTGOODAMMO",27,1)
goto DeathContinue
GREM H 0 A_GiveInventory("SpecialDeathFlag",1)
goto DeathContinue
ClassDeath:
GREM H 0
GREM H 0 A_JumpIfInventory("InstagibFlag",1,"MegaDeathEnd")
GREM H 0 A_JumpIfInventory("RiseDeathFlag",1,"ClassDeathR")
GREM H 0 A_JumpIfInventory("IceDeathFlag",1,"ClassDeathI")

GREM H 0 A_PlaySoundEx("misc/BombCount","Voice")
GREM H 10 bright A_SpawnItemEx("GrenademanDeathHelper",0,0,0,0,0,0,0,1)
GREM H 0 A_PlaySoundEx("misc/BombCount","Voice")
GREM H 10 bright A_SpawnItemEx("GrenademanDeathHelper",0,0,0,0,0,0,0,1)
GREM H 0 A_PlaySoundEx("misc/BombCount","Voice")
GREM H 10 bright A_SpawnItemEx("GrenademanDeathHelper",0,0,0,0,0,0,0,1)
GREM H 0 A_SpawnItemEX("GrenadeBOOM",0,0,28,0,0,0,0,1)
goto MegaDeathEnd

ClassDeathR:
GREM H 0 A_PlaySoundEx("misc/BombCount","Voice")
GREM H 0 A_SpawnItemEx("GrenademanDeathHelper",0,0,0,0,0,0,0,1)
GREM H 0 A_JumpIfInventory("RiseDeathFlag2",30,"ClassDeathRX")
GREM H 0 A_JumpIfInventory("RiseDeathFlag2",20,"ClassDeathR3")
GREM H 0 A_JumpIfInventory("RiseDeathFlag2",10,"ClassDeathR2")
ClassDeathR1:
GREM H 0 A_SetArg(4,10)
goto ClassDeathR0
ClassDeathR2:
GREM H 0 A_SetArg(4,20)
goto ClassDeathR0
ClassDeathR3:
GREM H 0 A_SetArg(4,30)
goto ClassDeathR0
ClassDeathR0:
GREM H 0 A_SpawnItemEx("FlashBombFX3_B",Random(-16,16)*random(0,1),Random(16,40)*random(-1,1),Random(-32,32)*random(0,1)+28,random(-7,7)*random(0,1),random(-7,7)*random(0,1),random(-7,7)*random(0,1),random(0,359)*random(0,1),1)
GREM H 1 ThrustThingZ(0,20,0,1)
GREM H 0 A_JumpIf(ceilingz-z<64,"ClassDeathRE0")
GREM H 0 A_GiveInventory("RiseDeathFlag2",1)
GREM H 0 A_JumpIfInventory("RiseDeathFlag2",Args[4],"ClassDeathR")
loop
ClassDeathRE:
GREM H 0 A_PlaySoundEx("misc/BombCount","Voice")
GREM H 0 A_SpawnItemEx("GrenademanDeathHelper",0,0,0,0,0,0,0,1)
GREM H 0 A_JumpIfInventory("RiseDeathFlag2",30,"ClassDeathRX")
GREM H 0 A_JumpIfInventory("RiseDeathFlag2",20,"ClassDeathRE3")
GREM H 0 A_JumpIfInventory("RiseDeathFlag2",10,"ClassDeathRE2")
ClassDeathRE1:
GREM H 0 A_SetArg(4,10)
goto ClassDeathRE0
ClassDeathRE2:
GREM H 0 A_SetArg(4,20)
goto ClassDeathRE0
ClassDeathRE3:
GREM H 0 A_SetArg(4,30)
goto ClassDeathRE0
ClassDeathRE0:
GREM H 0 A_Stop
GREM H 0 A_SpawnItemEx("FlashBombFX3_B",Random(-16,16)*random(0,1),Random(16,40)*random(-1,1),Random(-32,32)*random(0,1)+28,random(-7,7)*random(0,1),random(-7,7)*random(0,1),random(-7,7)*random(0,1),random(0,359)*random(0,1),1)
GREM H 0 A_GiveInventory("RiseDeathFlag2",1)
GREM H 0 A_JumpIfInventory("RiseDeathFlag2",Args[4],"ClassDeathRE")
GREM H 1
goto ClassDeathRE0
ClassDeathRE:
GREM H 1 A_Stop
GREM H 0 A_SpawnItemEX("GrenadeBOOM",0,0,28)
goto MegaDeathEnd

ClassDeathI:
GREM H 0 ACS_ExecuteAlways(998,0,666,10)
GREM H 0 A_PlaySoundEx("CBM/freeze","Voice")
GREM H 0 A_PlaySoundEx("misc/BombCount","Weapon")
GREM HHHHHHHHHH 1 A_SpawnItemEx("FlashBombFX3_B",Random(-16,16)*random(0,1),Random(16,40)*random(-1,1),Random(-32,32)*random(0,1)+28,random(-7,7)*random(0,1),random(-7,7)*random(0,1),random(-7,7)*random(0,1),random(0,359)*random(0,1),1)
GREM H 0 A_PlaySoundEx("misc/BombCount","Weapon")
GREM HHHHHHHHHH 1 A_SpawnItemEx("FlashBombFX3_B",Random(-16,16)*random(0,1),Random(16,40)*random(-1,1),Random(-32,32)*random(0,1)+28,random(-7,7)*random(0,1),random(-7,7)*random(0,1),random(-7,7)*random(0,1),random(0,359)*random(0,1),1)
GREM H 0 A_PlaySoundEx("misc/BombCount","Weapon")
GREM HHHHHHHHHH 1 A_SpawnItemEx("FlashBombFX3_B",Random(-16,16)*random(0,1),Random(16,40)*random(-1,1),Random(-32,32)*random(0,1)+28,random(-7,7)*random(0,1),random(-7,7)*random(0,1),random(-7,7)*random(0,1),random(0,359)*random(0,1),1)
GREM H 0 A_PlaySoundEx("CBM/icebreak","Body")
GREM H 0 A_SpawnItemEx("FrozenDeathFXC",0,0,0)
GREM H 0 A_SpawnItemEX("GrenadeBOOM",0,0,28,0,0,0,0,1)
goto DeathWait

}
}

actor GrenademanDeathHelper : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 AA 1 bright A_SpawnItemEx("FlashBombFX1_B",0,0,28,random(-7,7),random(-7,7),random(-7,7),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("FlashBombFX2_B",Random(-16,16),Random(-16,-40), Random(-32,32)+28,0,0,0,0,1)
TNT1 AA 1 bright A_SpawnItemEx("FlashBombFX2_B",Random(-16,16),Random(16,40), Random(-32,32)+28,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("FlashBombFX1_B",0,0,28,random(-7,7),random(-7,7),random(-7,7),random(0,359),1)
stop
}
}
