actor AutoS : SaxtonHaleSurvivor
{
player.displayname "Auto" // Support
player.soundclass "Support"
player.damagescreencolor "green"
-PICKUP
player.startitem "AutoScrewerArmSupportSummon"
player.startitem "BusterAmmo", 3
player.startitem "SaxtonHaleOfficialWeaponsPack"
player.startitem "SupportItemAtomiser"
player.startitem "AutoProduct1"
player.startitem "AutoWindowSwitch"

player.startitem "AutoShopItem_1"
player.startitem "AutoShopItem_2"
player.startitem "AutoShopItem_3"
player.startitem "AutoShopItem_4"
player.startitem "AutoShopItem_5"
player.startitem "AutoShopItem_6"
player.startitem "AutoShopItem_7"
player.startitem "AutoShopItem_8"

player.startitem "Auto_ITEMCOST_1", 225
player.startitem "Auto_ITEMCOST_2", 160
player.startitem "Auto_ITEMCOST_3", 125
player.startitem "Auto_ITEMCOST_4", 350
player.startitem "Auto_ITEMCOST_5", 250
player.startitem "Auto_ITEMCOST_6", 250
player.startitem "Auto_ITEMCOST_7", 250
player.startitem "Auto_ITEMCOST_8", 250

player.startitem "AutoItemTypeFlag",1
player.forwardmove 0.72, 0.72 // 0.8
player.sidemove 0.71, 0.71 // 0.78
scale 2.5
+NOSKIN
States
{
Spawn:
AUT6 A 0
AUT6 B 1
AUT6 A 245
AUT6 QA 4
goto Spawn+3
See:
AUT6 BCDE 5
Goto Spawn
Missile:
AUT6 R 0 A_JumpIfInventory("AutoThumbFlag",1,"MissileT")
AUT6 R 0 A_JumpIfInventory("VivifyDelay5",1,"Missile2")
AUT6 R 0 A_JumpIfInventory("AutoCreationFlag",1,"MissileC")
AUT6 UV 2
AUT6 UV 3
goto Spawn

Missile2:
AUT6 FG 5
goto Spawn
MissileC:
AUT6 U 0 A_JumpIfInventory("AutoEyebrowFlag",6,8)
AUT6 U 0 A_JumpIfInventory("AutoEyebrowFlag",3,4)
AUT6 U 2 A_GiveInventory("AutoEyebrowFlag",1)
AUT6 UU 1 A_JumpIfInventory("VivifyDelay6",1,"MissileC2")
goto Spawn
AUT6 V 2 A_GiveInventory("AutoEyebrowFlag",1)
AUT6 VV 1 A_JumpIfInventory("VivifyDelay6",1,"MissileC2")
goto Spawn
AUT6 U 2 A_TakeInventory("AutoEyebrowFlag",5)
AUT6 UU 1 A_JumpIfInventory("VivifyDelay6",1,"MissileC2")
goto Spawn
MissileC2:
AUT6 W 9
goto Spawn
MissileT:
AUT6 R 0 A_JumpIfInventory("AutoEyebrowFlag",6,4)
AUT6 R 0 A_JumpIfInventory("AutoEyebrowFlag",3,2)
AUT6 R 6 A_GiveInventory("AutoEyebrowFlag",1)
goto Spawn
AUT6 S 6 A_GiveInventory("AutoEyebrowFlag",1)
goto Spawn
AUT6 S 6 A_TakeInventory("AutoEyebrowFlag",5)
goto Spawn
AutoDoingASolo:
AUTO WX 4
AUTO A 0
goto Spawn
NinjaTelefragger:
PLAY X 2 A_SetTranslucent(0.01)
PLAY X 1 A_JumpIfInventory("InvisibleSection", 1, "NinjaTelefragger")
PLAY X 1 A_SetTranslucent(1.00)
goto Spawn
PainElbowSpawn:
AUTO H 0 A_SetTranslucent(1.0)
goto Spawn

InstantDeathState:
AUTO Z 1 SetPlayerProperty(0,0,4)
AUTO Z 0 A_Jump(256, "InstantDeathFinish")
goto InstantDeathFinish
SurvivorPain:
AUTO H 0 
AUTO HHHHHHHHHH 2 A_SpawnItem("PainFX",0,3)
goto Spawn
SurvivorDeathGFX:
AUTO H 20
AUTO H 0 A_Jump(256, "SurvivorDeathEnd")
goto SurvivorDeathEnd

INeverAskedYouToStop:
AUTO WWXXWWXXWW 2 A_SpawnItem("PainFX",0,3)
goto Spawn

SMMClotheslineDeath:
AUTO H 35 A_GiveInventory("BogusFatality", 1)
goto SMMClotheslineDeath2
PainElbowContinue:
AUTO H 2
goto PainElbowCheck
CrunchFinish:
AUTO H 35 A_GiveInventory("BogusFatality", 1)
"----" H 0 A_ChangeFlag("NOGRAVITY", 0)
"----" H 0 A_TakeInventory("BogusFatality", 999)
"----" H 0 ThrustThingZ(0, 170, 0, 0)
AUTO H 20 A_Recoil(7)
goto DeathEndSequence

GoukiContinueComboStop:
AUTO HHHHHHHH 1 A_Stop
goto Pain

Pain.DioFlashTime:
AUTO A 0 SetPlayerProperty(0,1,4)
AUTO A 0 A_GiveInventory("DioFlashTimeHUD", 1)
AUTO A 0 HealThing(2)
AUTO A 0 A_SpawnItem("DioFlashTimeHUDAssist")
AUTO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_Stop // 40 tics
AUTO AAAAAAAAAAAAAAAAAAA 0 SetPlayerProperty(0,0,4)
AUTO A 1 SetPlayerProperty(0,0,4)
Goto Spawn
Pain.ShunGokuSatsu:
AUTO H 3 ACS_ExecuteAlways(401, 0, 18)
AUTO H 14 A_PlaySoundEx("TomahawkTalbain/TotemSamaDestroyed", "Body")
AUTO H 0 //A_StopSound(CHAN_BODY)
AUTO H 30 A_TakeInventory("GoukiGoHadokenZone", 999)
goto Pain
GoHadokenStop:
AUTO HHHHHHHHH 1 A_Stop
goto GoHadokenEnd
ShunGokuSatsuFrame:
AUTO H 20
goto ShunGokuSatsuEnd
ElbowPuffPuff:
AUTO H 35 A_GiveInventory("BogusFatality", 1)
"----" H 0 A_ChangeFlag("NOGRAVITY", 0)
"----" H 0 A_TakeInventory("BogusFatality", 999)
AUTO H 8 A_Recoil(20)
goto DeathEndSequence
Ice:
AUTO H 0
goto IceContinue
NoKillSummonsDrain:
AUTO H 20
"----" H 0 A_Jump(256, "NoKillSummonsDrainAgain")
goto NoKillSummonsDrainAgain
SlenderRape:
AUTO HHHHHHHHH 10 A_FadeOut (0.1)
goto DeathEndSequence+2

TheEnd:
AUTO G 4
loop
WalkForward: 
AUTO BBBBBCCCCCDDDDDEEEEE 1 A_Recoil(-0.8)
loop
CreditWalk: 
AUTO BCDE 8
loop
CreditRun:
AUTO BCDE 5
loop
DozerCarry:
AUTO BBBBCCCCDDDDEEEEBBBBCCCCDDDDBBBBCCCCDDDD 1 A_Recoil(-1)
AUTO F 10 A_Stop
AUTO F -1
stop
DozerThrow:
AUTO F 0 A_ChangeFlag("THRUACTORS",1)
AUTO F 20 ThrustThingZ(0, 60, 0, 1)
AUTO G 20
AUTO A -1
stop
EndlessPain:
AUTO H -1
stop
}
}


actor SupportSArmor : PowerupGiver
{
inventory.maxamount 0
+INVENTORY.AUTOACTIVATE
Powerup.Color 144 208 255, 0.15 //height 60 +FLOATBOB
powerup.duration -25 Powerup.Type "PartSArmor"
Inventory.PickupSound "item/1up" scale 2.2
inventory.pickupmessage "You equipped the \c[v3]S. Armor\c- part!"
states
{
Spawn:
AUPA BBBBBBBBBBBBBBB 35 // 12 seconds
AUPA BBBBBBB 5 A_FadeOut(0.12)
stop}}

actor PowerPartSArmor : PowerProtection
{
damagefactor "Normal", 0.40
}

actor SupportSBuster : SupportSArmor
{
Powerup.Color 188 80 224, 0.15
powerup.duration -25 Powerup.Type "PartSBuster"
inventory.pickupmessage "You equipped the \c[q0]S. Buster\c- part!"
states
{
Spawn:
AUPA DDDDDDDDDDDDDDD 35 // 12 seconds
AUPA DDDDDDD 5 A_FadeOut(0.12)
stop
Use:
stop}}

actor PowerPartSBuster : PowerDamage
{
damagefactor "Normal", 1.35
}

actor SupportHSD : SupportSArmor
{
Powerup.Color 255 255 255, 0.15
powerup.duration -25 Powerup.Type "PartHSD"
inventory.pickupmessage "You equipped the \c[q8]H.S.D\c- part!"
states
{
Spawn:
AUPA CCCCCCCCCCCCCCC 35 // 12 seconds
AUPA CCCCCCC 5 A_FadeOut(0.12)
stop}}

actor PowerPartHSD : PowerSpeed
{
speed 1.25
}

 actor SupportCAttack : CustomInventory
{
Inventory.PickupSound "item/1up" scale 2.2 reactiontime 84
inventory.pickupmessage "You equipped the \c[D4]C. Attack\c- part!"
states
{
Spawn:
AUPA AAAAAAAAAAAA 35
AUPA AAAAAAA 5 A_FadeOut(0.12)
Death:
AUPA AAAAAAA 5 A_FadeOut(0.12)
stop
Pickup:
TNT1 A 0 A_GiveInventory("CAttackCounters", 525)
TNT1 A 0 A_TakeInventory("PowerPartCAttack", 1)
TNT1 A 0 A_GiveInventory("PowerPartCAttack", 1)
stop
}}

actor CAttackCounters : inventory
{
inventory.amount 1
inventory.maxamount 525
} 

ACTOR PowerCAttack : PowerDoubleFiringSpeed{}


actor PowerPartCAttack : PowerCAttack // it's just for the color anyway
{
damagefactor "PizzaMortadellaParmigianoConPepperoncini", 1.0
powerup.duration -25 //15 seconds
 Powerup.Color 248 216 120, 0.35
}

//JUST HERE FOR LATER//
actor AutoShopItem_BASE : BaseMM8BDMWep
{
//weapon.preferredskin "Auto"
tag "Base Item -- 100 Bolts"
Weapon.AmmoUse 0
Weapon.AmmoGive1  100
Weapon.AmmoGive2  0
Weapon.SlotNumber 2
Obituary "%o got too close to %k's pyrotechnics."
Inventory.Pickupmessage "You got a shop item!"
weapon.ammotype "Auto_ITEMCOST_1"
weapon.ammotype2 "ScrewYouBuySomeAmmo"
inventory.icon "EDDIEC"
States
{
Spawn:
C_00 G 1
loop
Ready:
0G_H A 0 ACS_ExecuteAlways(998,0,10004)
0G_H A 0 A_GunFlash("Flash.Idle")
Ready7:
0G_H A 1 A_WeaponReady
wait

Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
0G_H A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
0G_H A 1 A_Raise
Loop

Fire:
0G_H A 0 A_GiveInventory("VivifyDelay5",1)
0G_H A 0 A_Refire(1)
0G_H A 0 A_PlaySoundEx("weapon/AutoFirework","Weapon")
0G_H A 0 A_FireCustomMissile("AutoFireworkShot",0,0,-8,0)
0G_H B 2 Offset(4,28)
0G_H C 2 Offset(8,24)
0G_H B 2 Offset(4,28)
0G_H A 10 A_WeaponReady(14)
0G_H D 10 A_PlaySound("weapon/AutoReload1",4,1.0)
0G_H D 0 A_PlaySound("weapon/AutoReload2",1,0.85)
0G_H D 2 Offset(-6,44)
0G_H D 2 Offset(-6,44)
0G_H D 6 A_WeaponReady(14)
0G_H A 6 A_PlaySound("weapon/AutoReload3",1,0.85)
0G_H A 1 A_JumpIfInventory("AutoBoltGunFlag",1,"FireHold")
0G_H A 1 //A_Refire("FireHold")
goto HoldSkip
HoldSkip:
0G_H A 3 
goto Ready7
FireHold:
0G_H A 0 A_JumpIfInventory("OilSliderFlag",30,"BoltGun")
0G_H A 1 A_GiveInventory("OilSliderFlag",2)
0G_H A 0 A_Refire("FireHold")
goto ChargeEnd
BoltGun:
0G_H A 0 A_GiveInventory("VivifyDelay5",1)
0G_H A 0 A_Refire(1)
0G_H B 2 Offset(4,28)
0G_H C 3 Offset(8,24)
TNT1 A 0 A_JumpIfInventory("CutterFlag",5,"Pick_Big")
goto Pick_Small
Pick_Small:
RSS1 G 0 A_PlaySoundEx("enemy/hammerjoestep","Weapon")
TNT1 A 0 A_FireCustomMissile("AutoScrewShot",0,0,-8,0)
0G_H B 2 Offset(4,28) A_GiveInventory("CutterFlag",1)
goto AltEnd
Pick_Big:
RSS1 G 0 A_PlaySoundEx("enemy/hammerjoethrow","Weapon")
TNT1 A 0 A_FireCustomMissile("AutoScrewShot2",0,0,-8,0)
0G_H B 2 Offset(4,28) A_TakeInventory("CutterFlag",9)
goto AltEnd
AltEnd:
0G_H A 2 A_WeaponReady(14)
0G_H A 0 A_Refire("BoltGun")
0G_H A 6 A_WeaponReady(14)
0G_H A 0 A_TakeInventory("OilSliderFlag",99)
goto Ready7
ChargeEnd:
0G_H A 0 A_TakeInventory("OilSliderFlag",99)
0G_H A 8 A_WeaponReady(14)
goto Ready7


Altfire:
0G_H Q 0 A_JumpIfInventory("ScrewYouBuySomeAmmo",100,"FireL")
goto Ready7
FireL:
0G_H Q 0 A_JumpIfInventory("AutoCreationFlag",56,"FireEnd")
0G_H Q 0 A_GiveInventory("AutoIsCreating",1)
0G_H Q 0 A_TakeInventory("AutoCreateSndDelay",99)
0G_H Q 0 A_Refire(1)
FireL0:
0G_H Q 0 A_JumpIfInventory("AutoCreationFlag",56,"FireEnd")
0G_H O 1 A_GiveInventory("AutoCreateSnd_P",1)
0G_H Q 0 A_Refire(1)
goto FireEnd
0G_G O 0 A_Jump(256,"FireL1","FireL2","FireL3","FireL4")
FireL1:
0G_H Q 0 A_JumpIfInventory("AutoCreationFlag",56,"FireEnd")
0G_H P 0 A_JumpIfInventory("IsDead",1,"NoFlash")
0G_H P 1 A_GiveInventory("AutoCreateSnd_P",1)
0G_H P 0 A_Refire("FireL0")
goto FireEnd
FireL2:
0G_H Q 0 A_JumpIfInventory("AutoCreationFlag",56,"FireEnd")
0G_H Q 0 A_JumpIfInventory("IsDead",1,"NoFlash")
0G_H Q 1 A_GiveInventory("AutoCreateSnd_P",1)
0G_H Q 0 A_Refire("FireL0")
goto FireEnd
FireL3:
0G_H Q 0 A_JumpIfInventory("AutoCreationFlag",56,"FireEnd")
0G_H R 0 A_JumpIfInventory("IsDead",1,"NoFlash")
0G_H R 1 A_GiveInventory("AutoCreateSnd_P",1)
0G_H R 0 A_Refire("FireL0")
goto FireEnd
FireL4:
0G_H Q 0 A_JumpIfInventory("AutoCreationFlag",56,"FireEnd")
0G_H S 0 A_JumpIfInventory("IsDead",1,"NoFlash")
0G_H S 1 A_GiveInventory("AutoCreateSnd_P",1)
0G_H S 0 A_Refire("FireL0")
goto FireEnd

FireEnd:
0G_H E 0 A_JumpIfInventory("AutoCreationFlag",56,"FireCreate")
0G_H E 0 A_StopSound(1)
0G_H EE 1 A_TakeInventory("AutoIsCreating",9)
0G_H A 0
0G_H AA 1 A_TakeInventory("AutoCreationFlag",99)
0G_H A 0
0G_H A 0
goto Ready7

FireCreate:
TNT1 A 0 A_StopSound(1)
TNT1 A 0 A_PlaySoundEx("weapon/AutoTada","SoundSlot6")
TNT1 A 0 A_GiveInventory("AutoThumbFlag",1)
TNT1 A 0 A_SpawnItemEx("BigHealth",20,0,8,0,0,0)
TNT1 A 2 A_TakeInventory("ScrewYouBuySomeAmmo", 100)
goto FireEndingX
FireEndingX:
TNT1 A 2 A_TakeInventory("AutoCreationFlag",99)
TNT1 A 0 A_TakeInventory("AutoIsCreating",9)
TNT1 A 0 A_GunFlash("Flash.Tada")
0G_H U 2 Offset(0,80)
0G_H U 2 Offset(0,40)
0G_H T 15 A_WeaponReady(14)
0G_H T 2 Offset(0,40)
0G_H T 2 Offset(0,80)
OG_H T 0 A_WeaponReady(14)
0G_F TT 0 A_TakeInventory("AutoCreationFlag",99)
TNT1 A 0 A_TakeInventory("AutoThumbFlag",1)
0G_H A 5
0G_H A 0 A_Jump(256,"Ready7")
goto Ready7


Flash.Idle:
TNT1 A 0 A_JumpIfInventory("AutoIsCreating",1,"Flash.Create")
TNT1 A 1 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_GiveInventory("AutoAmmoRegenDelay_P",1)
loop

Flash.Create:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_GiveInventory("AutoCreationFlag_RC",1)
TNT1 A 0 A_GiveInventory("AutoAmmoRegenDelay_P",1)
TNT1 A 0 A_JumpIfInventory("AutoIsCreating",1,"Flash.Create")
goto Flash.Idle

Flash.Tada:
TNT1 AA 1 A_JumpIfInventory("IsDead",1,"NoFlash")
goto Flash.TadaWait
Flash.TadaWait:
TNT1 A 1 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_GiveInventory("AutoAmmoRegenDelay_P",1)
TNT1 A 0 A_JumpIfInventory("AutoIsCreating",1,"Flash.TadaWait")
goto Flash.Idle
}
}

actor AutoScrewFire_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("CutterFlag",5,"Pick_Big")
goto Pick_Small
Pick_Small:
RSS1 G 0 A_PlaySoundEx("enemy/hammerjoestep","Weapon")
TNT1 A 0 A_FireCustomMissile("AutoScrewShot",0,0,-8,0)
TNT1 A 0 A_GiveInventory("CutterFlag",1)
stop
Pick_Big:
RSS1 G 0 A_PlaySoundEx("enemy/hammerjoethrow","Weapon")
TNT1 A 0 A_FireCustomMissile("AutoScrewShot2",0,0,-8,0)
TNT1 A 0 A_TakeInventory("CutterFlag",9)
stop
}
}

actor AutoBoltGunFlag : Once {}

actor AutoScrewShot
{
Translation "192:192=208:208","198:198=128:128"
PROJECTILE
damagetype "Buster"
Obituary "%o was turned into a part that %k will trade in Mega Man 12 for some screws."
Damage (13)
radius 5
height 5
Speed 27
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1
RSS1 I 1
wait
Death:
TNT1 A 2
stop
}
}

actor AutoScrewShot2 : AutoScrewShot
{
Damage (20)
radius 14
height 14
States
{
Spawn:
TNT1 A 0
TNT1 A 1
RSS1 J 1
wait
}
}

actor AutoBoltgunPickup_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(CallACS("sh_AutoBoltgunVar"),"Pickup1")
goto Pickup0
Pickup0:
TNT1 A 0 A_TakeInventory("AutoBoltGunFlag",99)
stop
Pickup1:
TNT1 A 0 A_GiveInventory("AutoBoltGunFlag",1)
stop
}
}