actor PlantBarrierBoss : Weapon
{
Weapon.AmmoGive 28
Weapon.SlotNumber 1
Obituary "%o became girlified by %k's Plant Barrier."
Inventory.Pickupmessage "Power up! Plant Barrier!"
weapon.ammotype "PlantbossAmmo"
weapon.ammotype2 "PlantbossAmmo"
weapon.ammouse 1
Weapon.AmmoUse2 1
inventory.pickupsound "weapon/weaponup"
+WEAPON.DONTBOB
Scale 2.0
States
{
Spawn:
TNT1 A 0
stop
Ready:
PBUS A 0 ACS_ExecuteAlways(991,0,303)
PBUS A 0 A_GunFlash
Ready2:
PBUS A 0 A_ClearRefire
PBUS A 6 A_WeaponReady(WRF_NOSWITCH)
PBUS A 0 A_GiveInventory("PlantbossAmmo",1)
Goto Ready2+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
PBUS A 1 A_Lower
Goto Ready+1
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
PBUS A 1 A_Raise
Loop
Fire:
PBUS A 0 A_JumpIfInventory("ShieldCheck",1,"ShieldThrow")
//PBUS A 0 A_JumpIfNoAmmo("NoAmmo")
PBUS A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PBUS A 0 A_FireCustomMissile("PlantShot",random(-5,5),0,8,0)
PBUS BC 1
PBUS A 0 A_Refire
goto Ready2
AltFire:
PBUS A 0 A_JumpIfInventory("ShieldCheck",1,"ShieldThrow")
PBUS B 0 A_JumpIfNoAmmo("ShieldThrow")
PBUS B 0 A_TakeInventory("BasicArmor",9999)
//PBUS B 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PBUS B 0 A_PlaySoundEx("weapon/blizzboss","Weapon")
PBUS A 1 A_GiveInventory("ShieldCheck",1)//A_SpawnItemEx("BubbleLeadStart",6,0,0,8,0,8,0,0,0)
goto ShieldActive
Hold:
PBUS B 1
goto Ready2
ShieldActive:
PBUS B 1 A_SpawnItemEx("PlantBarrier1B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_SpawnItemEx("PlantBarrier2B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_SpawnItemEx("PlantBarrier3B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_SpawnItemEx("PlantBarrier4B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_SpawnItemEx("PlantBarrier5B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_SpawnItemEx("PlantBarrier6B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_SpawnItemEx("PlantBarrier7B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_SpawnItemEx("PlantBarrier8B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
Goto Shield
Shield:
PBUS B 0 A_TakeInventory("PlantbossAmmo",3)
PBUS B 0 A_JumpIfNoAmmo("ShieldThrow")
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier9B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
SHDW D 0 A_GiveInventory("PlantDrain",1)
PBUS B 0 A_SpawnItemEx("PlantDrainer1",0,0,0)
PBUS B 0 A_SpawnItemEx("PlantDrainer2",0,0,0)
PBUS B 0 ACS_ExecuteAlways(208,0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier10B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier11B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier12B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier13B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier14B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier15B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier16B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier17B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier18B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
SHDW D 0 A_GiveInventory("PlantDrain",1)
PBUS B 0 A_SpawnItemEx("PlantDrainer1",0,0,0)
PBUS B 0 A_SpawnItemEx("PlantDrainer2",0,0,0)
PBUS B 0 ACS_ExecuteAlways(208,0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier1B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier2B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier3B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier4B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier5B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier6B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier7B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
PBUS B 1 A_WeaponReady(WRF_NOSWITCH)
PBUS B 0 A_SpawnItemEx("PlantBarrier8B", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
loop
ShieldThrow:
SHDW D 0 A_GiveInventory("PlantDrain",1)
PBUS B 0 A_TakeInventory("ShieldCheck",999)
PBUS B 0 A_FireCustomMissile("PlantShield",0,0,0,0)
PBUS CCCCC 1 A_GiveInventory("PlantDrain",1)
PBUS BBBBB 1 A_GiveInventory("PlantDrain",1)
PBUS AAAAAAAAAAAAAAAAAAA 1 A_GiveInventory("PlantDrain",1)
PBUS A 1
SHDW D 0 A_TakeInventory("PowerDrain",1)
SHDW D 0 A_TakeInventory("PlantDrain",1)
goto Ready2
NoAmmo:
PBUS A 0
//PBUS A 1
goto Ready2
Flash:
TNT1 A 10
TNT1 A 0 A_GiveInventory("Regen",1)
loop
NoFlash:
TNT1 A 0
stop
}
}


actor PlantShield
{
//translation "217:255=174:174","173:173=218:218"
//translation "217:255=174:174","173:173=219:219"
scale 2.5
PROJECTILE
Damagetype "Plant"
Damage (20)
+DONTBLAST
Speed 20
Radius 12
Height 12
States
{
Spawn:
PLAB ABCDEFGHIJKLMNOPQR 1
loop
}
}

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

actor PlantShot
{
PROJECTILE
+LOOKALLAROUND
+SKYEXPLODE
-NOGRAVITY
+DONTBLAST
damagetype "Buster"
Obituary "%o was blasted by %k's Plant Buster."
Speed 43
Damage (5)
radius 5
height 5
scale 2.5
States
{
Spawn:
TNT1 A 0 ThrustThingZ(0,4,0,1)
CBUL A 1
goto spawn+1
Death:
CBUL A 1
stop
}
}

actor PlantDrainer1
{
PROJECTILE
+DONTSPLASH
+RIPPER
Damagetype "Plant"
Obituary "%o had his life sapped by %k's Plant Barrier"
radius 160
height 160
Damage (6)
States
{
Spawn:
TNT1 A 1
stop
}
}

actor PlantDrainer2
{
PROJECTILE
+DONTSPLASH
Damagetype "Plant"
Obituary "%o had his life sapped by %k's Plant Barrier"
Damage 0
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(7,160,0)
stop
}
}

actor Healing : Health
{
inventory.amount 5
inventory.maxamount 100
}

actor Regen : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
states
{
Spawn:
TNT1 A 1
stop
Pickup:
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(975,0)==2,"Death")
TNT1 A 0 A_GiveInventory("Health",1)
stop
Death:
TNT1 A 1
stop
}
}

actor TeamRegen : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
states
{
Spawn:
TNT1 A 1
stop
Pickup:
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(975,0)==2,"Death")
PLAA A 0 A_JumpIf(!(health>0),"Death")
TNT1 A 0 A_GiveInventory("Health",2)
stop
Death:
TNT1 A 1
stop
}
}

actor PlantDrain : PowerupGiver
{
 +AUTOACTIVATE
 inventory.maxamount 0
 powerup.type "Drain"

   states
 {
 Spawn:
   TNT1 A 4
   loop
 }
}

actor PlantBarrier1B : PlantBarrier1
{
States
{
Spawn:
PLAB A 1
PLAB A 1
stop
}
}
actor PlantBarrier2B : PlantBarrier1
{
States
{
Spawn:
PLAB B 1
PLAB B 1
stop
}
}
actor PlantBarrier3B : PlantBarrier1
{
States
{
Spawn:
PLAB C 1
PLAB C 1
stop
}
}
actor PlantBarrier4B : PlantBarrier1
{
States
{
Spawn:
PLAB D 1
PLAB D 1
stop
}
}
actor PlantBarrier5B : PlantBarrier1
{
States
{
Spawn:
PLAB E 1
PLAB E 1
stop
}
}
actor PlantBarrier6B : PlantBarrier1
{
States
{
Spawn:
PLAB F 1
PLAB F 1
stop
}
}
actor PlantBarrier7B : PlantBarrier1
{
States
{
Spawn:
PLAB G 1
PLAB G 1
stop
}
}
actor PlantBarrier8B : PlantBarrier1
{
States
{
Spawn:
PLAB H 1
PLAB H 1
stop
}
}
actor PlantBarrier9B : PlantBarrier1
{
States
{
Spawn:
PLAB I 1
PLAB I 1
stop
}
}
actor PlantBarrier10B : PlantBarrier1
{
States
{
Spawn:
PLAB J 1
PLAB J 1
stop
}
}
actor PlantBarrier11B : PlantBarrier1
{
States
{
Spawn:
PLAB K 1
PLAB K 1
stop
}
}
actor PlantBarrier12B : PlantBarrier1
{
States
{
Spawn:
PLAB L 1
PLAB L 1
stop
}
}
actor PlantBarrier13B : PlantBarrier1
{
States
{
Spawn:
PLAB M 1
PLAB M 1
stop
}
}
actor PlantBarrier14B : PlantBarrier1
{
States
{
Spawn:
PLAB N 1
PLAB N 1
stop
}
}
actor PlantBarrier15B : PlantBarrier1
{
States
{
Spawn:
PLAB O 1
PLAB O 1
stop
}
}
actor PlantBarrier16B : PlantBarrier1
{
States
{
Spawn:
PLAB P 1
PLAB P 1
stop
}
}
actor PlantBarrier17B : PlantBarrier1
{
States
{
Spawn:
PLAB Q 1
PLAB Q 1
stop
}
}
actor PlantBarrier18B : PlantBarrier1
{
States
{
Spawn:
PLAB R 1
PLAB R 1
stop
}
}