//thank you ecl1p5e

actor ReboundStrikerWep : BaseMM8BDMWep 10094
{
//$Category MM8BDM-Weapons
//$Title Rebound Striker
//$Sprite STRIA0
Weapon.AmmoUse 3
Weapon.AmmoGive 33
Weapon.SlotNumber 2
Obituary "$OB_REBOUNDSTRIKER"
Tag "$TAG_REBOUNDSTRIKER"
Inventory.Pickupmessage "$PU_REBOUNDSTRIKER"
weapon.ammotype "ReboundStrikerAmmo"
inventory.icon "STRIKI"
States
{
SpawnLoop:
STRI A -1
loop
Ready:
RSHD A 0 ACS_ExecuteAlways(998,0,200)
RSHD A 0 A_JumpIfNoAmmo("ReadyNoAmmo")
RSHD A 1 A_WeaponReady
Goto Ready+1
ReadyNoAmmo:
RSHD J 1 A_WeaponReady
RSHD J 0 A_JumpIfNoAmmo("ReadyNoAmmo")
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
RSHD A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
RSHD A 1 A_Raise
Loop
Fire:
RSHD A 0 A_JumpIfNoAmmo("NoAmmo")
RSHD A 0 A_PlaySoundEx("weapon/concreteshot", "weapon")
RSHD A 0 A_FireCustomMissile("ReboundStriker", 0, 1, 8, -10)
RSHD BCDEFG 2
TNT1 A 13
RSHD HI 2
RSHD A 0 A_Refire
Goto Ready+1
NoAmmo:
RSHD J 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor ReboundStrikerAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 33
+INVENTORY.IGNORESKILL
}

actor ReboundStriker
{
PROJECTILE
+FORCEXYBILLBOARD
+HEXENBOUNCE
+CANBOUNCEWATER
-ALLOWBOUNCEONACTORS
+USEBOUNCESTATE
+FORCEXYBILLBOARD
+NOTARGETSWITCH
bouncefactor 1.0
wallbouncefactor 0.9
Obituary "$OB_REBOUNDSTRIKER"
damagetype "ReboundStriker"
seesound "weapon/reboundstriker"
Radius 10
Height 20
scale 2.5
speed 40
bouncecount 7
var int user_bouncenum;
damage (40+user_bouncenum)
States
{
Spawn:
STRI BC 2 
loop
BounceNoTarget:
Goto Bounce+5

Bounce:
STRI "#" 0 A_ChangeFlag("NOGRAVITY",0)
STRI "#" 1 A_SetUserVar(user_bouncenum, user_bouncenum+30)
STRI "#" 0 A_JumpIf(user_bouncenum > 60, 2)
goto Spawn2
STRI "#" 0
STRI "#" 0
goto Spawn3
Spawn2:
STRI DF 2
loop
Spawn3:
STRI EG 2 BRIGHT
loop
Death:
TNT1 A 0 A_SpawnItemEx("ExplosionEffect1",0,0,10)
stop
}
}

actor ReboundStrikerWallhumpCheck : Powerup
{
	powerup.duration 10
}
