actor PlantBarrierBoss : BaseMM8BDMWep_CBM
{
dropitem "PlantBarrierWepCDropped"
Weapon.AmmoGive 28
Weapon.SlotNumber 1
Obituary "$OB_PLANTBARRIER"
Inventory.Pickupmessage "Power up! Plant Barrier!"
weapon.ammotype "PsychedelicAmmo"
weapon.ammotype2 "PsychedelicAmmo"
weapon.ammouse 1
Weapon.AmmoUse2 1
+WEAPON.NOAUTOAIM
States
{
Spawn:
C_06 E 1
loop
Ready:
PBUS A 0 ACS_ExecuteAlways(998,0,824)
PBUS A 0 A_GunFlash
Ready2:
PBUS A 0 //A_ClearRefire
PBUS A 3 A_WeaponReady
PBUS A 0 A_GiveInventory("PsychedelicAmmo",1)
Goto Ready2+1
Deselect:
PBUS A 0 A_JumpIfInventory("ShieldCheck",1,24)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
PBUS A 1 A_Lower
Goto Deselect+1
PBUS A 0 A_TakeInventory("PlantDrainPower",99)
PBUS A 0 A_TakeInventory("ShieldCheck",99)
PBUS A 0 //A_FireCustomMissile("",0,0,0,0)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
Goto Deselect+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_GiveInventory("PlantmanMain_CI",1)
PBUS BC 2
PBUS A 0 A_Refire
goto Ready2
AltFire:
PBUS A 0 A_JumpIfInventory("ShieldCheck",1,"ShieldThrow")
PBUS A 0 A_PlaySoundEx("weapon/blizzboss","Weapon")
PBUS A 1 offset(0,38) A_GiveInventory("ShieldCheck",1)
goto ShieldActive
ShieldActive:
PBUS A 1 offset(0,44)A_SpawnItemEx("PlantBarrier1B",0,0,28,momx,momy,momz,0,9,0)//SXF_ABSOLUTEMOMENTUM|SXF_TRANSFERTRANSLATION
PBUS A 1 offset(0,58)A_SpawnItemEx("PlantBarrier2B",0,0,28,momx,momy,momz,0,9,0)
PBUS A 1 offset(0,74)A_SpawnItemEx("PlantBarrier3B",0,0,28,momx,momy,momz,0,9,0)
PBUS A 1 offset(0,92)A_SpawnItemEx("PlantBarrier4B",0,0,28,momx,momy,momz,0,9,0)
PBUS D 1 offset(0,80)A_SpawnItemEx("PlantBarrier5B",0,0,28,momx,momy,momz,0,9,0)
PBUS D 1 offset(0,66)A_SpawnItemEx("PlantBarrier6B",0,0,28,momx,momy,momz,0,9,0)
PBUS D 1 offset(0,52)A_SpawnItemEx("PlantBarrier7B",0,0,28,momx,momy,momz,0,9,0)
PBUS D 1 offset(0,40)A_SpawnItemEx("PlantBarrier8B",0,0,28,momx,momy,momz,0,9,0)
PBUS D 0 A_JumpIfNoAmmo("ShieldThrow")
PBUS E 0 A_WeaponReady
Goto Shield
Shield:
PBUS E 0 A_GiveInventory("PlantDrainPower",1)
PBUS E 0 A_SpawnItemEx("PlantDrainer1",0,0,28)
PBUS E 0 A_SpawnItemEx("PlantDrainer2",0,0,28)
PBUS E 0 ACS_ExecuteAlways(208,0,160,0)

PBUS E 0 A_SpawnItemEx("PlantBarrier9B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier10B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier11B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier12B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier13B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier14B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier15B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier16B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady

PBUS E 0 A_GiveInventory("PlantDrainPower",1)
PBUS E 0 A_SpawnItemEx("PlantDrainer1",0,0,28)
PBUS E 0 A_SpawnItemEx("PlantDrainer2",0,0,28)
PBUS E 0 ACS_ExecuteAlways(208,0,160,0)

PBUS E 0 A_SpawnItemEx("PlantBarrier17B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier18B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier19B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier20B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier21B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier22B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier23B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier24B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady

PBUS E 0 A_TakeInventory("PsychedelicAmmo",3)
PBUS E 0 A_JumpIfNoAmmo("ShieldThrow")

PBUS E 0 A_GiveInventory("PlantDrainPower",1)
PBUS E 0 A_SpawnItemEx("PlantDrainer1",0,0,28)
PBUS E 0 A_SpawnItemEx("PlantDrainer2",0,0,28)
PBUS E 0 ACS_ExecuteAlways(208,0,160,0)

PBUS E 0 A_SpawnItemEx("PlantBarrier25B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier26B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier27B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier28B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier29B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier30B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier31B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier32B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady

PBUS E 0 A_GiveInventory("PlantDrainPower",1)
PBUS E 0 A_SpawnItemEx("PlantDrainer1",0,0,28)
PBUS E 0 A_SpawnItemEx("PlantDrainer2",0,0,28)
PBUS E 0 ACS_ExecuteAlways(208,0,160,0)

PBUS E 0 A_SpawnItemEx("PlantBarrier1B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier2B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier3B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier4B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier5B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier6B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier7B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady
PBUS E 0 A_SpawnItemEx("PlantBarrier8B",0,0,28,momx,momy,momz,0,9,0)PBUS E 1 A_WeaponReady

PBUS E 0 A_TakeInventory("PsychedelicAmmo",3)
PBUS E 0 A_JumpIfNoAmmo("ShieldThrow")
loop

ShieldThrow:
PBUS E 0 A_GiveInventory("PlantDrainPower",1)
PBUS E 0 A_TakeInventory("ShieldCheck",999)
PBUS E 0 A_GiveInventory("PlantmanAlt_CI",1)
PBUS E 1 offset(0,38)
PBUS E 1 offset(0,46)
PBUS E 1 offset(0,54)
PBUS D 1 offset(0,62)
PBUS D 1 offset(0,70)

PBUS D 1 offset(0,78)
PBUS D 1 offset(0,86)
PBUS D 1 offset(0,94)
PBUS D 1 offset(0,102)
PBUS D 1 offset(0,110)

PBUS A 1 offset(0,102)
PBUS A 1 offset(0,98)
PBUS A 1 offset(0,94)
PBUS A 1 offset(0,90)
PBUS A 1 offset(0,85)
PBUS A 1 offset(0,80)
PBUS A 1 offset(0,75)
PBUS A 1 offset(0,70)
PBUS A 1 offset(0,64)
PBUS A 1 offset(0,58)
PBUS A 1 offset(0,52)
PBUS A 1 offset(0,46)
PBUS A 1 offset(0,39)
PBUS A 8 A_WeaponReady(12)

PBUS A 0 A_TakeInventory("PlantDrainPower",1)
goto Ready2
NoAmmo:
PBUS A 0
//PBUS A 1
goto Ready2
Flash:
TNT1 A 9
TNT1 A 1 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_GiveInventory("Regen",1)
loop
NoFlash:
TNT1 A 0
stop
}
}


actor PlantShield
{
Translation "199:199=41:41", "202:202=248:248"
//translation "217:255=174:174","173:173=218:218"
//translation "217:255=174:174","173:173=219:219"
PROJECTILE
Obituary "$OB_PLANTBARRIER"
Damagetype "PlantDrain"
Damage (20)
Speed 20
Radius 12
Height 12
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32)
Y_6E ABCDEFGHIJKLMNOPQRSTUVWXYZ 1
Y_6F EFGHIJ 1
goto Spawn+2
}
}

actor PlantShieldB : PlantShield{translation "202:202=205:205", "199:199=74:74"}
actor PlantShieldR : PlantShield{translation "202:202=171:171", "199:199=41:41"}
actor PlantShieldO : PlantShield{translation "202:202=104:104", "199:199=128:128"}
actor PlantShieldP : PlantShield{translation "202:202=229:229", "199:199=232:232"}

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

actor PlantShot
{
Translation "204:204=210:210"
PROJECTILE
-NOGRAVITY
damagetype "PlantBuster"
Obituary "$OB_PLANTBUSTER"
Speed 43
Damage (5)
radius 5
height 5
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 ThrustThingZ(0,8,0,1)
CBUL E 1
wait
Death:
CBUL E 1
stop
}
}

actor PlantShotB : PlantShot{translation "204:204=205:205"}
actor PlantShotR : PlantShot{translation "204:204=171:171"}
actor PlantShotO : PlantShot{translation "204:204=104:104"}
actor PlantShotP : PlantShot{translation "204:204=229:229"}


actor PlantDrainer1 : BasicExplosion
{
Damagetype "PlantDrain"
Obituary "$OB_PLANTDRAIN"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(6,160,0,0,160)
stop
}
}

actor PlantDrainer2 : BasicExplosion
{
Damagetype "PlantDrain"
Obituary "$OB_PLANTDRAIN"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(5,160,0,0,20)
stop
}
}

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

actor Regen : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(975,0)==2,"Death")
TNT1 A 0 HealThing(1)
stop
Death:
TNT1 A 1
stop
}
}

actor LMSRegen : Regen
{
states
{
Pickup:
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(975,0)==2,"Pickup2")
stop
Pickup2:
TNT1 A 0 HealThing(1)
stop
}
}

actor TeamRegen : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(975,0)==2,"Death")
PLAA A 0 A_JumpIf(!(health>0),"Death")
TNT1 A 0 HealThing(2)
stop
Death:
TNT1 A 1
stop
}
}

actor TeamRegenX : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIf(!(health>0),"Death")
TNT1 A 0 HealThing(2)
stop
Death:
TNT1 A 1
stop
}
}

actor PlantDrainPower : PowerDrain
{
Powerup.Duration -30
}

actor PlantBarrier1B : PlantBarrier1
{
States
{
Spawn:
Y_6E A 0
Y_6E A 1
stop
}
}

actor PlantBarrier2B : PlantBarrier1{States{Spawn:Y_6E B 0
Y_6E B 1
stop}}
actor PlantBarrier3B : PlantBarrier1{States{Spawn:Y_6E C 0
Y_6E C 1
stop}}
actor PlantBarrier4B : PlantBarrier1{States{Spawn:Y_6E D 0
Y_6E D 1
stop}}
actor PlantBarrier5B : PlantBarrier1{States{Spawn:Y_6E E 0
Y_6E E 1
stop}}
actor PlantBarrier6B : PlantBarrier1{States{Spawn:Y_6E F 0
Y_6E F 1
stop}}
actor PlantBarrier7B : PlantBarrier1{States{Spawn:Y_6E G 0
Y_6E G 1
stop}}
actor PlantBarrier8B : PlantBarrier1{States{Spawn:Y_6E H 0
Y_6E H 1
stop}}
actor PlantBarrier9B : PlantBarrier1{States{Spawn:Y_6E I 0
Y_6E I 1
stop}}
actor PlantBarrier10B : PlantBarrier1{States{Spawn:Y_6E J 0
Y_6E J 1
stop}}
actor PlantBarrier11B : PlantBarrier1{States{Spawn:Y_6E K 0
Y_6E K 1
stop}}
actor PlantBarrier12B : PlantBarrier1{States{Spawn:Y_6E L 0
Y_6E L 1
stop}}
actor PlantBarrier13B : PlantBarrier1{States{Spawn:Y_6E M 0
Y_6E M 1
stop}}
actor PlantBarrier14B : PlantBarrier1{States{Spawn:Y_6E N 0
Y_6E N 1
stop}}
actor PlantBarrier15B : PlantBarrier1{States{Spawn:Y_6E O 0
Y_6E O 1
stop}}
actor PlantBarrier16B : PlantBarrier1{States{Spawn:Y_6E P 0
Y_6E P 1
stop}}
actor PlantBarrier17B : PlantBarrier1{States{Spawn:Y_6E Q 0
Y_6E Q 1
stop}}
actor PlantBarrier18B : PlantBarrier1{States{Spawn:Y_6E R 0
Y_6E R 1
stop}}
actor PlantBarrier19B : PlantBarrier1{States{Spawn:Y_6E S 0
Y_6E S 1
stop}}
actor PlantBarrier20B : PlantBarrier1{States{Spawn:Y_6E T 0
Y_6E T 1
stop}}
actor PlantBarrier21B : PlantBarrier1{States{Spawn:Y_6E U 0
Y_6E U 1
stop}}
actor PlantBarrier22B : PlantBarrier1{States{Spawn:Y_6E V 0
Y_6E V 1
stop}}
actor PlantBarrier23B : PlantBarrier1{States{Spawn:Y_6E W 0
Y_6E W 1
stop}}
actor PlantBarrier24B : PlantBarrier1{States{Spawn:Y_6E X 0
Y_6E X 1
stop}}
actor PlantBarrier25B : PlantBarrier1{States{Spawn:Y_6E Y 0
Y_6E Y 1
stop}}
actor PlantBarrier26B : PlantBarrier1{States{Spawn:Y_6E Z 0
Y_6E Z 1
stop}}
actor PlantBarrier27B : PlantBarrier1{States{Spawn:Y_6F E 0
Y_6F E 1
stop}}
actor PlantBarrier28B : PlantBarrier1{States{Spawn:Y_6F F 0
Y_6F F 1
stop}}
actor PlantBarrier29B : PlantBarrier1{States{Spawn:Y_6F G 0
Y_6F G 1
stop}}
actor PlantBarrier30B : PlantBarrier1{States{Spawn:Y_6F H 0
Y_6F H 1
stop}}
actor PlantBarrier31B : PlantBarrier1{States{Spawn:Y_6F I 0
Y_6F I 1
stop}}
actor PlantBarrier32B : PlantBarrier1{States{Spawn:Y_6F J 0
Y_6F J 1
stop}}

actor PlantmanMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("PlantShot",random(-5,5),0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("PlantShotB",random(-5,5),0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("PlantShotR",random(-5,5),0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("PlantShotO",random(-5,5),0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("PlantShotP",random(-5,5),0,8,0)
goto Done
}
}

actor PlantmanAlt_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("PlantShield",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("PlantShieldB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("PlantShieldR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("PlantShieldO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("PlantShieldP",0,0,0,0)
goto Done
Done:
TNT1 A 0 A_TakeInventory("PsychedelicAmmo",3)
stop
}
}