actor BearerClass : HardClassBase
{
Player.ScoreIcon "C_00X0X"
player.startitem "ToadHealthBar"
player.displayname "BearerClass"
player.soundclass "BearerClassC"
+NOSKIN
player.startitem "WildBearBoss"
player.startitem "WildBearAmmo",3
player.startitem "BearerFlag"
player.startitem "CanUseItems"

player.forwardmove 0.56, 0.56
player.sidemove 0.54, 0.54
player.startitem "SemiStunArmor"
player.morphweapon "WildBearBoss"

States
{
Spawn:
YD_B A 0
YD_B B 1
YD_B A 1
Goto Spawn+2
See:
YD_B BCDE 4
Goto Spawn
Missile:
YD_B FG 5
goto Spawn
//Have to hard code because morphes break the rules
ClassPain:
YD_B H 0 A_PlaySoundEX("misc/GBPAINX","Voice")
YD_B HHHHHHHHHH 2 A_SpawnItem("PainFX",0,3)
YD_B H 1
Goto Spawn

TimeStopped:
YD_B HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 1 A_Stop
Goto Pain+2

DeathFix:
YD_B H 0 A_GiveInventory("SpecialDeathFlag",1)
goto DeathContinue

ClassDeath:
YD_B H 0 A_JumpIfInventory("InstagibFlag",1,"MegaDeathEnd")
YD_B H 0 A_JumpIfInventory("RiseDeathFlag",1,"RiseDeath")
YD_B H 0 A_JumpIfInventory("IceDeathFlag",1,"IceDeath")
YD_B H 19
goto MegaDeathEnd

RiseDeath:
YD_B H 1 ThrustThingZ(0,20,0,1)
YD_B H 0 A_JumpIf(ceilingz-z<64,"MegaDeathEnd")
YD_B H 0 A_GiveInventory("RiseDeathFlag2",1)
YD_B H 0 A_JumpIfInventory("RiseDeathFlag2",35,"MegaDeathEnd")
Goto RiseDeath
IceDeath:
YD_B H 0 ACS_ExecuteAlways(998,0,666,10)
YD_B H 1 A_PlaySoundEx("misc/freeze","Voice")
YD_B HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 1 A_SpawnItemEx("FrozenDeathBitFX",frandom(16,48),0,fRandom(16,48),0,0,0,random(0,359))
YD_B H 0 A_PlaySoundEx("misc/icebreak","Body")
YD_B H 0 A_SpawnItemEx("FrozenDeathFXC",0,0,0)
goto DeathWait
}
}


actor BearerFlag : Inventory
{
inventory.amount 1
inventory.maxamount 1
}

actor WildBearBoss : BaseMM8BDMWep_CBM
{
dropitem "ConfettiDeathSpawner"
Tag "Wild Boner Weapon"
Weapon.AmmoUse 0
Weapon.AmmoGive 3
Weapon.SlotNumber 1
Obituary "%o was devoured by %k."
weapon.ammotype "WildBearAmmo"
States
{
Spawn:
C_00 X 1
loop
Ready:
WICH Y 0 ACS_ExecuteAlways(998,0,802)
WICH Y 1 A_WeaponReady
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
WICH Y 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
WICH Y 1 A_Raise
Loop
AltFire:
Fire:
WICH Y 0 A_PlaySoundEx("weapon/RockBuster","weapon")
WICH Y 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==-1,"FireX")
WICH Y 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==0,"FireB")
WICH Y 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==1,"FireR")
WICH Y 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==2,"FireO")
WICH Y 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==3,"FireP")
goto FireX
FireX:
WICH Y 0 A_FireCustomMissile("BearerShot",0,0,8,0)
goto FireEnd
FireB:
WICH Y 0 A_FireCustomMissile("BearerShotB",0,0,8,0)
goto FireEnd
FireR:
WICH Y 0 A_FireCustomMissile("BearerShotR",0,0,8,0)
goto FireEnd
FireO:
WICH Y 0 A_FireCustomMissile("BearerShotO",0,0,8,0)
goto FireEnd
FireP:
WICH Y 0 A_FireCustomMissile("BearerShotP",0,0,8,0)
goto FireEnd

FireEnd:
WICH ZY 5
WICH Y 10
//TNT1 A 0 A_Refire
Goto Ready+1
NoAmmo:
WICH Y 1
Goto Ready+1
}
}

actor WildBearAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 3
+INVENTORY.IGNORESKILL
}

actor BearerShot
{
Translation "204:204=215:215"
PROJECTILE
Obituary "%o was devoured by %k."
damagetype "Buster"
+DONTBLAST
Radius 10
Height 10
damage (15)
speed 45
scale 2.5
States
{
Spawn:
BASB T 1
loop
}
}

actor BearerShotB : BearerShot{translation "204:204=192:192"}
actor BearerShotR : BearerShot{translation "204:204=54:54"}
actor BearerShotO : BearerShot{translation "204:204=229:229"}
actor BearerShotP : BearerShot{translation "204:204=64:64"}
