actor BBAMegaman : CustWepClassBase
{
Player.ScoreIcon "C_00T0X"
player.displayname "BBAMegaMan"
player.soundclass "bbamegamanc"

player.maxhealth 1000
health 1000
player.jumpz 10
player.forwardmove 0.8, 0.8
player.sidemove 0.78, 0.78

Player.Face "BBA"
Player.MugShotMaxHealth 1000

player.startitem "CBM_BaseFlagPack"

player.startitem "BBA_Pistol"
player.startitem "BBA_Clip", 50
player.startitem "BBA_Money", 75
player.startitem "BBA_ShopItem", 1
//player.startitem "NoDrawFaceMugshot"


player.weaponSlot 1, "BBA_Pistol"
player.weaponSlot 2, "BBA_Shotgun"
player.weaponSlot 3, "BBA_SuperShotgun"
player.weaponSlot 4, "BBA_Chaingun"
player.weaponSlot 5, "BBA_RocketLauncher"
player.weaponSlot 6, "BBA_PlasmaRifle"
player.weaponSlot 7, "BBA_BFG9000"

States
{
Spawn:
BBAM A 0
BBAM B 1
BBAM A 1
BBAM A 210
BBAM R random(8,20)
BBAM SRSRSRS 3
BBAM R random(8,20)
BBAM TRTRTRTRTRTR 2
Goto Spawn+4
See:
BBAM BCDE 5
Goto Spawn
Missile:
BBAM F 0 A_JumpIfInventory("VivifyDelay5",1,"MissilePunch")
BBAM F 5
BBAM G 4
goto Spawn
MissilePunch:
BBAM Q 9
goto Spawn

ClassPain:
BBAM H 0
goto MegamanPain

ClassDeath:
BBAM H 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_BBAMEGAMAN_DEATH,TINT_BBA_DEAD)
BBAM H 0 A_JumpIfInventory("ExplodeDeathFlag",1,"MegamanGib")
BBAM H 0 A_JumpIfInventory("FallingDeathFlag",1,"MegamanFall")
BBAM H 0 A_JumpIfInventory("FlingDeathFlag",1,"MegamanFling")
BBAM H 0 A_JumpIfInventory("RisingDeathFlag",1,"MegamanRise")
BBAM H 0 A_JumpIfInventory("IceDeathFlag",1,"MegamanIce")
BBAM H 2
BBAM H 0 A_SpawnItemEx("BBADeathBubble",0,65,80)
BBAM H 0 A_SpawnItemEx("BBADeathAnimation",0,0,0,0,0,0,0,1)
BBAM H 0 A_GiveInventory("CBM_CritDeathCheck_Snd_P")
BBAM H 0 A_SpawnItemEx("FakeDeathFX",0,0,32)
goto MegamanErase

MegamanGib:
BBAM H 0 A_SpawnItemEx("BBADeathBubble",0,65,80)
BBAM H 0 A_SpawnItemEx("BBADeathAnimation",0,0,0,0,0,0,0,1)
goto Super::MegamanGib

MegamanFling:
BBAM H 19
BBAM H 0 A_SpawnItemEx("BBADeathBubble",0,65,80)
BBAM H 0 A_SpawnItemEx("BBADeathAnimationF",0,0,0,0,0,0,0,1)
goto Super::MegamanFling+1

RiseMyMegamanEnd:
BBAM H 0 A_SpawnItemEx("BBADeathBubble",0,65,80)
BBAM H 0 A_SpawnItemEx("BBADeathAnimationF",0,0,0,0,0,0,0,1)
goto Super::RiseMyMegamanEnd

MegamanIce:
BBAM H 0 A_SpawnItemEx("BBADeathBubble",0,65,80)
BBAM H 0 ACS_NamedExecuteWithResult("core_chargecolor",CLR_ICEDEATH,TCLR_ICEDEATH)
BBAM H 1 A_PlaySoundEx("*icefreze","Voice")
BBAM H 0 A_JumpIfInventory("CriticalDeath",1,"MegamanIceGib")
BBAM HHHHHHHHHHHHHHH 1 A_SpawnItemEx("FrozenDeathBitFX",frandom(16,48),0,fRandom(16,48),0,0,0,random(0,359))
BBAM H 0 A_SpawnItemEx("BBADeathAnimationI",0,0,0,0,0,0,0,1)
goto MegamanErase
MegamanIceGib:
BBAM H 0 A_SpawnItemEX("CriticalDeathSpawner",0,0,0,0,0,0,0,1)
BBAM H 0 A_SpawnItemEx("FakeDeathFX",0,0,32)
BBAM H 0 A_PlaySoundEx("*icedeath","Voice")
BBAM H 0 A_SpawnItemEx("BBADeathAnimationI",0,0,0,0,0,0,0,1)
goto MegamanErase
}
}

actor BBADeathAnimation// : ProjSpawnFuncActor
{
//Translation "213:213=215:215","192:192=0:0","198:198=78:78","161:161=165:165"
//var int user_translateLikePlayer;
//Mass 10544
-SOLID
+THRUACTORS
+DONTBLAST
+DONTREFLECT
//+MISSILE
//+NOEXPLODEFLOOR
damage 0
radius 2
height 2
scale 2.5
states
{
Spawn:
BBAM H 25
BBAM A 20 A_SetAngle(random(0,359))
BBAM E 0 A_SpawnItemEx("BBADeathAnimationFX",0,0,0,2,0,0,0,1)
stop
}
}
actor BBADeathAnimationFX : BasicClientSide
{
//var int user_TranslateBlackColors;
States
{
Spawn:
BBAM BBBCCCDDDEEE 1 A_FadeOut(0.01)
loop
}
}
actor BBADeathAnimationF : BBADeathAnimation
{
states
{
Spawn:
BBAM H 10
BBAM A 20 A_SetAngle(random(0,359))
BBAM E 0 A_SpawnItemEx("BBADeathAnimationFX",0,0,0,2,0,0,0,1)
stop
}
}

actor BBADeathAnimationI : BBADeathAnimation
{
//Translation "0:0=72:72","213:213=4:4","192:192=4:4","198:198=201:201","161:161=161:161"
//Mass 334//TCLR_ICEDEATH
states
{
Spawn:
BBAM H 5
BBAM A 20 A_SetAngle(random(0,359))
BBAM E 0 A_SpawnItemEx("BBADeathAnimationIFX",0,0,0,1,0,0,0,1)
stop
}
}
actor BBADeathAnimationIFX : BBADeathAnimationFX
{
States
{
Spawn:
BBAM BBBBBBBBCCCCCCCCDDDDDDDDEEEEEEEE 1 A_FadeOut(0.01)
loop
}
}

actor BBADeathBubble : BasicExplosion
{
//var int user_TranslateWhiteColors;
scale 1.5
states
{
Spawn:
BBAB Y 0
BBAB Y 1 A_PlaySoundEx("BBA_Snd/cut","SoundSlot6")
BBAB XYXYXYXYXYXYXYXYX 1
stop
}
}