actor AcidBarrierWep : Weapon {}

actor AcidBarrierWepSH : BaseMM8BDMWep
{+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans

Weapon.AmmoUse 14
Weapon.AmmoGive 28
Weapon.SlotNumber 7
Inventory.Pickupmessage "$PU_ACIDBARRIER"
Obituary "$OB_ACIDBARRIER"
Tag "$TAG_ACIDBARRIER"
weapon.ammotype "AcidBarrierAmmo"
inventory.icon "ACIDICON"
States
{
SpawnLoop:
11WP E 1
loop
Ready:
ACDB A 0 ACS_ExecuteAlways(998,0,244)
ACDB A 0 A_JumpIfInventory("ShieldCheck",1,"ShieldUp")
ACDB A 1
ACDB A 1 A_WeaponReady
Goto Ready+1
ShieldUp:
ACBS A 0 A_JumpIfInventory("AcidBar",280,"ShieldPop")
ACBS A 0
ACBS A 1
ACBS A 1 A_WeaponReady
ACDB A 0 A_JumpIfInventory("BasicArmor",1,"ShieldUp")
Goto ShieldPop
Deselect:
ACDB A 0 A_JumpIfInventory("BasicArmor",1,"DeselectDown")
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
ACDB A 1 A_Lower
Loop
DeselectDown:
TNT1 A 0 A_PlaySoundEx("misc/splash","Weapon")
ACBS A 0 A_SpawnItemEx("AcidShotTwoSplasher")
ACBS A 0 A_TakeInventory("AcidVision",1)
ACBS A 0 A_TakeInventory("AcidBar",280)
ACBS A 0 A_TakeInventory("ShieldCheck",999)
ACBS A 0 A_TakeInventory("AcidShield",1)
ACBS A 0 A_TakeInventory("BasicArmor",100)
ACBS A 0 A_GiveInventory("MirrorBusterCooldown",1)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
ACDB A 1 A_Lower
Loop
Select:
ACDB A 0 A_JumpIfInventory("ShieldCheck",1,"ShieldUp")
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
ACDB A 1 A_Raise
Loop
Fire:
ACDB A 0 A_JumpIfInventory("MirrorBusterCooldown",1,"NoAmmo")
ACDB A 0 A_JumpIfInventory("ShieldCheck",1,"AcidBuster")
ACDB A 1 A_JumpIfInventory("AcidBarrierAmmo",14,"Activate")
ACBS A 0 A_JumpIfNoAmmo("NoAmmo")
goto Ready+1
AcidBuster:
ACBS A 0 A_JumpIfInventory("AcidBar",280,"ShieldPop")
ACBS A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
ACBS A 0 A_FireCustomMissile("AcidShot",0,0,8,0)
ACBS BC 3
ACBS A 1
ACDB A 0 A_JumpIfInventory("BasicArmor",1,"ShieldUp")
Goto ShieldPop
Altfire:
ACDB A 0 A_JumpIfInventory("MirrorBusterCooldown",1,"NoAmmo")
ACDB A 0 A_JumpIfInventory("ShieldCheck",1,"ShieldPop")
ACDB A 1 A_JumpIfInventory("AcidBarrierAmmo",14,"Activate")
ACBS A 0 A_JumpIfNoAmmo("NoAmmo")
goto Ready+1
Activate:
ACDB A 0 A_JumpIfInventory("ShieldCheck",1,"ShieldExit")
ACDB A 0 A_JumpIfNoAmmo("NoAmmo")
ACDB ABCDEF 2
TNT1 A 0 A_TakeInventory("AcidBarrierAmmo",14)
TNT1 A 0 A_TakeInventory("BasicArmor",9999)
TNT1 A 0 A_GiveInventory("AcidShield",1)
TNT1 A 0 A_GiveInventory("ShieldCheck",1)
TNT1 A 0 A_PlaySoundEx("misc/oil","Weapon")
TNT1 A 1 A_SpawnItemEx("AcidBarrierWarper")
TNT1 A 1 A_GiveInventory("AcidVision",1)
TNT1 AA 5
ACBS A 2 Offset(0,80)
ACBS A 2 Offset(0,60)
ACBS A 2 Offset(0,40)
ACBS A 2 Offset(0,20)
ACBS A 0 A_Gunflash
goto ShieldUp
ShieldPop:
TNT1 A 0 A_PlaySoundEx("misc/splash","Weapon")
ACDB A 0 A_SpawnItemEx("AcidShotTwoSplasher")
ACDB A 0 A_SpawnItemEx("BarrierPopWarper")
ACDB A 0 A_SpawnItemEx("BarrierPop")
ACDB A 0 A_TakeInventory("AcidVision",1)
ACDB A 0 A_TakeInventory("AcidBar",280)
ACDB A 0 A_TakeInventory("ShieldCheck",999)
ACDB A 0 A_TakeInventory("AcidShield",1)
ACDB A 0 A_TakeInventory("BasicArmor",100)
ACBS A 2 Offset(0,20)
ACBS A 1 Offset(0,40)
ACBS A 1 Offset(0,60)
ACBS A 1 Offset(0,80)
TNT1 A 4
ACDB A 1 Offset(0,80)
ACDB A 1 Offset(0,60)
ACDB A 1 Offset(0,40)
ACDB A 2 Offset(0,20)
ACBS A 0 A_GiveInventory("MirrorBusterCooldown",1)
goto Ready+1
NoAmmo:
ACDB A 1 ACS_Execute(979,0)
ACDB A 0 A_JumpIfInventory("ShieldCheck",1,"ShieldExit")
ACDB A 0 A_TakeInventory("AcidVision",1)
ACDB A 0 A_TakeInventory("AcidBar",280)
ACDB A 0 A_TakeInventory("ShieldCheck",999)
ACDB A 0 A_TakeInventory("AcidShield",1)
ACDB A 0 A_TakeInventory("BasicArmor",100)
ACDB A 0 A_Refire
goto Ready+1
ShieldExit:
ACDB A 0 A_PlaySoundEx("misc/splash","Weapon")
ACDB A 0 A_SpawnItemEx("AcidShotTwoSplasher")
ACDB A 0 A_SpawnItemEx("BarrierPopWarper")
ACDB A 0 A_SpawnItemEx("BarrierPop")
ACDB A 0 A_TakeInventory("AcidVision",1)
ACDB A 0 A_TakeInventory("AcidBar",280)
ACDB A 0 A_TakeInventory("ShieldCheck",999)
ACDB A 0 A_TakeInventory("AcidShield",1)
ACDB A 0 A_TakeInventory("BasicArmor",100)
ACBS A 2 Offset(0,80)
ACBS A 2 Offset(0,60)
ACBS A 2 Offset(0,40)
ACBS A 2 Offset(0,20)
TNT1 A 4
ACDB A 2 Offset(0,20)
ACDB A 2 Offset(0,40)
ACDB A 2 Offset(0,60)
ACDB A 2 Offset(0,80)
//ACBS A 0 A_GiveInventory("MirrorBusterCooldown",1)
goto Ready+1
Exit:
ACDB A 1
Goto Ready+1
Flash:
TNT1 A 0
TNT1 A 1 A_GiveInventory("AcidBar",1)
TNT1 A 0 A_JumpIfInventory("AcidVision",1,"Flash")
stop
}
}

actor AcidBarrierAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}

actor AcidBarrierWarper : BaseShieldWarper
{
	scale 3
	States
	{
	Shield:
	ACIB AAAABBBBAAAACCCC 1 A_Warp(AAPTR_TARGET, 0, 0, -20, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
	loop
	}
}

actor BarrierPopWarper : BaseShieldWarper
{
	scale 3
	States
	{
	Shield:
	ABUB AAAABBBBCCCCDDDD 3 A_Warp(AAPTR_TARGET, 0, 0, -20, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
	loop
	}
}

actor AcidShield : BasicArmorPickup
{
Armor.Savepercent 60
Armor.Saveamount 60
States
{
Spawn:
TNT1 A 0
loop
}
}


actor AcidShot
{
PROJECTILE
-NOGRAVITY
+SOLID
Obituary "$OB_ACIDBARRIER"
speed 45
Radius 4
Height 8
damagetype "AcidBarrier"
scale 2.5
gravity 1.8
damage (13)
States
{
Spawn:
ACIB D 0 A_SpawnItemEx("AcidShotFX")
ACIB D 1
loop
Death:
TNT1 A 0 A_Explode(11,50,0,0,50)
TNT1 A 0 A_SpawnItemEx("AcidSplash")
Stop
XDeath:
TNT1 A 0 A_Explode(11,50,0,0,50)
TNT1 A 0 A_SpawnItemEx("AcidSplash")
Stop
}
}

actor AcidShotTwoSplasher
{
PROJECTILE
+NOINTERACTION
States
{
Spawn:
TNT1 AAAAAAAAAA 0 A_SpawnItemEx("AcidShotTwo",0,0,0,4,0,0,random(0,360))
Stop
}
}
actor AcidShotTwo
{
PROJECTILE
-NOGRAVITY
+SOLID
Obituary "$OB_ACIDBARRIER"
speed 4
Radius 4
Height 8
damagetype "AcidBarrier"
scale 2.5
gravity 1.8
damage (11)
reactiontime 100
States
{
Spawn:
ACID D 0
ACIB D 1 ThrustThingZ(0,random(50,100), 0, 1)
Goto Fall
Fall:
TNT1 A 1
ACIB D 0 A_SpawnItemEx("AcidShotFX")
ACIB D 3
loop
Death:
TNT1 A 0 A_Explode(11,50,0,50)
TNT1 A 0 A_SpawnItemEx("AcidSplash")
Stop
XDeath:
TNT1 A 0 A_Explode(11,50,0,50)
TNT1 A 0 A_SpawnItemEx("AcidSplash")
Stop
}
}

actor BarrierPop
{
PROJECTILE
Obituary "$OB_BARRIER"
speed 0
Radius 7
Height 14
damagetype "AcidBarrier"
scale 2.5
gravity 1.8
damage (5)
reactiontime 100
States
{
Spawn:
TNT1 A 0 A_Explode(20, 250, 0,0,250)

TNT1 A 1
stop
}
}

actor AcidShotFX
{
scale 2.5
+NOGRAVITY
+CLIENTSIDEONLY
+MISSILE
+DONTSPLASH
Damage (0)
height 0
radius 0
States
{
Spawn:
ACIB D 1 A_Fadeout(0.2)
wait
}
}

actor AcidSplash
{
scale 4
+MISSILE
+NOINTERACTION
Damage (0)
height 0
radius 0
States
{
Spawn:
ACIB EFG 2
stop
}
}

actor AcidBar : Inventory
{
inventory.amount 1
inventory.maxamount 280
}

actor BubbleFlag : Inventory
{
inventory.amount 1
inventory.maxamount 100
}

actor AcidVision : PowerUp
{
	powerup.color "Green", 0.2
	powerup.duration -30
}