actor PowerFistC : BaseMM8BDMWep_CBM
{
tag "$TAG_POWERADAPTOR"
dropitem "PowerUpgradeGiverDropped"
weapon.preferredskin "Power-Megaman"
Weapon.AmmoUse 0
Weapon.AmmoGive 0
Weapon.SlotNumber 1
Obituary "$OB_POWERADAPTOR"
Obituary "%o was punched by %k's Power Fist."
weapon.ammotype "PowerMeter"
States
{
Spawn:
C_00 B 1
loop
Ready:
POWA A 0 A_JumpIfInventory("BusterGiven",1,"TakeBusters")
Goto Ready2
TakeBusters:
POWA A 0 A_GiveInventory("TakeBuster_P",1)
Goto Ready2
Ready2:
POWA A 0 ACS_ExecuteAlways(998,0,DYE_POWERFLIGHT)
POWA A 1 A_WeaponReady
wait

Deselect:
POWA AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
POWA A 1 A_Lower
Loop
Select:
POWA AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
POWA A 1 A_Raise
Loop

Fire:
PROC D 0 A_TakeInventory("PowerMeter",999)
POWA A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
POWA D 3
POWA D 3 Offset(-35,26)
POWA A 0 A_WeaponReady(14)
POWA A 0 A_GiveInventory("PowerMegaMain_CI",1)
POWA A 1 A_JumpIfInventory("IsBot",1,"BotFire")
POWA B 0 A_Refire("FireH")
goto Ready2+1
Fire2:
POWA D 0 ACS_ExecuteAlways(991,0,DYE_POWERFLIGHT)
POWA D 0 A_TakeInventory("PowerMeter",999)
POWA D 0 A_PlaySoundEx("weapon/mbuster","Weapon")
POWA D 2
POWA D 2 Offset(-35,26)
POWA A 0 A_WeaponReady(14)
POWA A 0 A_GiveInventory("PowerMegaMain2_CI",1)
POWA A 1 A_WeaponReady(14)
POWA B 0 A_Refire("FireH")
goto Ready2+1
Fire3:
POWA D 0 ACS_ExecuteAlways(991,0,DYE_POWERFLIGHT)
POWA D 0 A_TakeInventory("PowerMeter",999)
POWA D 0 A_PlaySoundEx("weapon/napalm","Weapon")
POWA D 2
POWA D 2 Offset(-35,26)
POWA A 0 A_GiveInventory("PowerMegaMain3_CI",1)
POWA A 1 A_WeaponReady(14)
POWA B 0 A_Refire("FireH")
goto Ready2+1

BotFire:
POWA A 0 A_Refire("BotFire2")
goto Ready2+1
BotFire2:
POWA A 0 A_Jump(128,"Fire")
goto FireH

FireH:
POWA B 0 A_JumpIfInventory("PowerMeter",32,"FireH2")
POWA B 0 A_JumpIfInventory("PowerMeter",18,"FireH0")
POWA B 1 A_GiveInventory("PowerMeter_RC",1)
POWA B 0 A_Refire("FireH")
Goto Fire//Goto Ready2+1
FireH0:
POWA B 0 A_PlaySoundEx("weapon/coilstart","Weapon")
Goto FireH1
FireH1:
POWA B 0 A_JumpIfInventory("PowerMeter",32,"FireH2")
POWA B 0 ACS_ExecuteAlways(998,0,DYE_POWERCHARGEAA,1)
POWA B 1 A_GiveInventory("PowerMeter_RC",1)
POWA B 0 A_Refire("FireH1.a")
Goto Fire2
FireH1.a:
POWA E 1 ACS_ExecuteAlways(998,0,DYE_POWERCHARGEAB,5)
POWA E 0 A_Refire("FireH1")
Goto Fire2
FireH2:
POWA C 0 A_PlaySoundEx("weapon/coilcharge","Weapon")
POWA C 1 ACS_ExecuteAlways(998,0,DYE_POWERCHARGEBA,6)
POWA C 0 A_Refire("FireH2.a")
Goto Fire3
FireH2.a:
POWA F 0 A_JumpIfInventory("PowerRage_ST",1,"FireH2.b")
POWA F 1 ACS_ExecuteAlways(998,0,DYE_POWERCHARGEBB,7)
POWA F 0 A_Refire("FireH2.b")
Goto Fire3
FireH2.b:
POWA F 1 ACS_ExecuteAlways(998,0,DYE_POWERCHARGEBB,7)
POWA F 0 A_JumpIfInventory("IsBot",1,"BotFireH2")
POWA F 0 A_Refire("FireH2")
Goto Fire3
BotFireH2:
POWA F 0 A_Jump(16,"Fire3")
POWA F 0 A_Refire("FireH2")
Goto Fire3

Altfire:
POWA A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
POWA D 3
POWA D 3 Offset(-35,26)
POWA A 0 A_GiveInventory("PowerMegaMain_CI",1)
POWA A 3 A_WeaponReady(14)
goto Ready2+1
}
}

actor PowerMeter : Ammo
{
inventory.amount 1
inventory.maxamount 32
+INVENTORY.IGNORESKILL
}

actor PowerMeter_RC : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"PickupR")
TNT1 A 0 A_GiveInventory("PowerMeter",1)
stop
PickupR:
TNT1 A 0 A_GiveInventory("PowerMeter",2)
stop
}
}

actor PowerShot
{
Translation "204:204=210:210"
PROJECTILE
damagetype "MegaM_PowerFist"
Obituary "$OB_POWERADAPTOR"
+BRIGHT
ReactionTime 1
Damage (200)
radius 8
height 8
Speed 32
scale 2.5
States
{
Spawn:
//POWW AB 15
POWW ABABABABABAB 2
POWW A 1 A_CountDown
wait
Death:
VMFX DKJ 2
XMFX S 2
POWW G 2
stop
XDeath:
Crash:
TNT1 A 1
stop
}
}

actor PowerShotB : PowerShot{translation "204:204=205:205"}
actor PowerShotR : PowerShot{translation "204:204=171:171"}
actor PowerShotO : PowerShot{translation "204:204=104:104"}
actor PowerShotP : PowerShot{translation "204:204=229:229"}

actor PowerShot2 : PowerShot
{
damagetype "MegaM_PowerFist2"
+THRUGHOST
Damage (350)
radius 12
height 12
States
{
Spawn:
//POWW IH 7
POWW HIHIHIHIH 2
POWW H 1 A_CountDown
wait
Death:
VMFX DKJ 2
XMFX SQ 2
stop
}
}

actor PowerShot2B : PowerShot2{translation "204:204=205:205"}
actor PowerShot2R : PowerShot2{translation "204:204=171:171"}
actor PowerShot2O : PowerShot2{translation "204:204=104:104"}
actor PowerShot2P : PowerShot2{translation "204:204=229:229"}

actor PowerShot3 : PowerShot
{
damagetype "MegaM_PowerFist3"
+THRUGHOST
Damage (700)
radius 20
height 20
Speed 50
States
{
Spawn:
VMFX J 2
XMFX S 2
VMFX J 0 A_Stop
VMFX J 2
XMFX S 2
VMFX J 2
XMFX S 2
VMFX J 2
stop
Death:
VMFX J 2
XMFX S 2
VMFX J 2
XMFX S 2
VMFX J 2
stop
XDeath:
Crash:
TNT1 A 1
stop

}
}

actor PowerShot3B : PowerShot3{translation "204:204=205:205"}
actor PowerShot3R : PowerShot3{translation "204:204=171:171"}
actor PowerShot3O : PowerShot3{translation "204:204=104:104"}
actor PowerShot3P : PowerShot3{translation "204:204=229:229"}

actor PowerAdaptorSuitFX
{
+MISSILE
//+CLIENTSIDEONLY
-SOLID
+NOCLIP
+NOINTERACTION
+NOTIMEFREEZE
+NOGRAVITY
+DONTBLAST
+DONTREFLECT
+THRUACTORS
radius 4
height 4
States
{
Spawn:
POWA X 0
POWA X 1
stop
}
}

actor PowerMegaMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("PowerShot",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("PowerShotB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("PowerShotR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("PowerShotO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("PowerShotP",0,0,8,0)
goto Done
}
}

actor PowerMegaMain2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("PowerShot2",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("PowerShot2B",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("PowerShot2R",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("PowerShot2O",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("PowerShot2P",0,0,8,0)
goto Done
}
}

actor PowerMegaMain3_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("PowerShot3",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("PowerShot3B",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("PowerShot3R",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("PowerShot3O",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("PowerShot3P",0,0,8,0)
goto Done
}
}
