actor Gravityman : ClassBase
{
Player.ScoreIcon "C_05A0X"
player.displayname "gravityman"
player.soundclass "gravitymanc"
player.startitem "GravityHoldBoss"
player.startitem "GravityHoldClassAmmo", 64
player.startitem "GravitySwitchItem"
player.jumpz 15

player.startitem "StarCrashWeakness2", 1

//player.startitem "SkullBarrierWeakness", 1
player.startitem "StarCrashWeakness", 1
player.startitem "AstroCrushWeakness", 1
States
{
Spawn:
GRAM A 0
GRAM A 0 A_JumpIfInventory("CeilingFlag",1,3)
GRAM B 1
GRAM A -1 A_JumpIfInventory("CeilingFlag",1,1)
GRAC B 1 
GRAC A 1 A_JumpIfInventory("GroundFlag",1,"Spawn")
Goto Spawn+5
See:
GRAM A 0 A_JumpIfInventory("CeilingFlag",1,"CeilingSee")
GRAM BBBBBCCCCCDDDDDEEEEE 1 A_JumpIfInventory("CeilingFlag",1,"CeilingSee")
Goto Spawn
CeilingSee:
GRAC A 0 A_JumpIfInventory("GroundFlag",1,"See")
GRAC BBBBBCCCCCDDDDDEEEEE 1 A_JumpIfInventory("GroundFlag",1,"See")
Goto Spawn
Missile:
GRAM A 0 A_JumpIfInventory("CeilingFlag",1,"CeilingMissile")
GRAM FFFFFGGGG 1 A_JumpIfInventory("CeilingFlag",1,"CeilingMissile")
goto Spawn
CeilingMissile:
GRAC A 0 A_JumpIfInventory("GroundFlag",1,"Missile")
GRAC FFFFFGGGG 1 A_JumpIfInventory("GroundFlag",1,"Missile")
goto Spawn
//Immunity
pain.GravityB1:
Pain.GravityT1:
pain.gravity:
GRAM H 0
goto Pain+2
ClassPain:
GRAM I 0 A_JumpIfInventory("CeilingFlag",1,"ClassPainCeiling")
GRAM H 0
goto PainContinue
ClassPainCeiling:
GRAC I 0
goto PainContinue
DeathFix:
GRAM H 0 A_JumpIfInventory("CeilingFlag",1,1)
goto DeathContinue
GRAM I 0 A_JumpIfInventory("RiseDeathFlag",1,1)
goto DeathContinue
GRAM I 0 A_GiveInventory("SpecialDeathFlag",1)
goto DeathContinue

ClassDeath:
GRAM I 0 A_JumpIfInventory("RiseDeathFlag",1,"ClassDeathR")
GRAM I 19
goto MegaDeathEnd
ClassDeathR:
GRAM I 1 ThrustThingZ(0,-10,0,1)
GRAM I 0 A_JumpIf(z-floorz<64,"MegaDeathEnd")
GRAM I 0 A_GiveInventory("RiseDeathFlag2",1)
GRAM I 0 A_JumpIfInventory("RiseDeathFlag2",35,"MegaDeathEnd")
Goto ClassDeathR

}
}