// REQUIRES SHIELDCHECK FROM LEAFSHIELD.TXT

actor PlantBarrierWep : MegaBuster 10069
{
Weapon.AmmoGive 28
Weapon.SlotNumber 7
Obituary "%o became girlified by %k's Plant Barrier."
Inventory.Pickupmessage "Power up! Plant Barrier!"
weapon.ammotype "PlantBarrierAmmo"
weapon.ammouse 4
inventory.pickupsound "weapon/weaponup"
inventory.icon "PLANTSI"
+WEAPON.AMMO_OPTIONAL
Scale 2.0
States
{
Spawn:
WEA2 T 1
loop
Ready:
PLAN T 0 ACS_ExecuteAlways(998,0,39)
PLAN T 0 A_ClearRefire
PLAN T 1 A_WeaponReady
Goto Ready+2
Deselect:
PLAN T 0 A_JumpIfInventory("ShieldCheck",1,24)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
PLAN T 1 A_Lower
Goto Deselect+1
PLAN T 0
PLAN T 0 A_TakeInventory("ShieldCheck",1)
Goto Deselect+1
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
PLAN T 1 A_Raise
Loop
Fire:
PLAN S 0 ACS_Execute(194,0)
PLAN T 0 A_JumpIfInventory("ShieldCheck",1,"ShieldThrow")
PLAN T 0 A_JumpIf(health==100,"NoAmmo")
PLAN T 0 A_JumpIfNoAmmo("NoAmmo")
PLAN T 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PLAN T 1 A_GiveInventory("ShieldCheck",1)//A_SpawnItemEx("BubbleLeadStart",6,0,0,8,0,8,0,0,0)
goto ShieldActive
Hold:
PLAN T 1
goto Ready+1
ShieldActive:
PLAN S 1 A_SpawnItemEx("PlantBarrier1", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_SpawnItemEx("PlantBarrier2", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_SpawnItemEx("PlantBarrier3", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_SpawnItemEx("PlantBarrier4", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_SpawnItemEx("PlantBarrier5", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_SpawnItemEx("PlantBarrier6", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_SpawnItemEx("PlantBarrier7", 0, 0, 0, 0, 0, 0, 0, 0, 0)
Goto Shield
Shield:
PLAN S 0 A_TakeInventory("PlantBarrierAmmo",4)
PLAN S 0 HealThing(8)
PLAN S 0 A_JumpIf(health==100,"NoAmmo")
PLAN S 0 A_JumpIfNoAmmo("NoAmmo")
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier8", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier9", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier10", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier11", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier12", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier13", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier14", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier15", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier16", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier17", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier18", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier1", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier2", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier3", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier4", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier5", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier6", 0, 0, 0, 0, 0, 0, 0, 0, 0)
PLAN S 1 A_WeaponReady
PLAN S 0 A_SpawnItemEx("PlantBarrier7", 0, 0, 0, 0, 0, 0, 0, 0, 0)
loop
ShieldThrow:
PLAN S 8 A_TakeInventory("ShieldCheck",999)
goto Ready+1
NoAmmo:
PLAN T 0 ACS_Execute(979,0)
PLAN T 1 A_TakeInventory("ShieldCheck",999)
PLAN T 0 A_Refire
goto Ready+1
}
}

actor PlantBarrier1
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN A 1
PLAN A 1
stop
}
}

actor PlantBarrier2
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN B 1
PLAN B 1
stop
}
}

actor PlantBarrier3
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN C 1
PLAN C 1
stop
}
}

actor PlantBarrier4
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN D 1
PLAN D 1
stop
}
}

actor PlantBarrier5
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN E 1
PLAN E 1
stop
}
}

actor PlantBarrier6
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN F 1
PLAN F 1
stop
}
}

actor PlantBarrier7
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN G 1
PLAN G 1
stop
}
}

actor PlantBarrier8
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN H 1
PLAN H 1
stop
}
}

actor PlantBarrier9
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN I 1
PLAN I 1
stop
}
}

actor PlantBarrier10
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN J 1
PLAN J 1
stop
}
}

actor PlantBarrier11
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN K 1
PLAN K 1
stop
}
}

actor PlantBarrier12
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN L 1
PLAN L 1
stop
}
}

actor PlantBarrier13
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN M 1
PLAN M 1
stop
}
}

actor PlantBarrier14
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN N 1
PLAN N 1
stop
}
}

actor PlantBarrier15
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN O 1
PLAN O 1
stop
}
}

actor PlantBarrier16
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN P 1
PLAN P 1
stop
}
}

actor PlantBarrier17
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN Q 1
PLAN Q 1
stop
}
}

actor PlantBarrier18
{
scale 2.5
- SOLID
+NOGRAVITY
+NONETID
States
{
Spawn:
PLAN R 1
PLAN R 1
stop
}
}

actor PlantBarrierAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
}