actor FrostShardWep_NormalBar : NormalBar{args 4,74}
actor FrostShardWep : BaseMM8BDMWep
{
Weapon.AmmoUse 4
Weapon.AmmoGive 28
Weapon.SlotNumber 2
Inventory.Pickupmessage "$PU_FROSTSHARD"
Obituary "$OB_FROSTSHARD"
Tag "$TAG_FROSTSHARD"
weapon.ammotype "FrostShardAmmo"
inventory.icon "FSHDICON"
States
{
SpawnLoop:
FSHD Z -1
loop
Ready:
FSHD A 0 ACS_NamedExecuteWithResult("core_weaponcolor", COLOR_FROSTSHARD)
FSHD A 1 A_WeaponReady
Goto Ready+1
ReadyC: Goto Ready+1
Deselect:
FSHD A 0 
goto DeselectSwap
Select:
FSHD A 0 
goto SelectSwap
Fire:
FSHD B 0 A_JumpIfNoAmmo("NoAmmo")
FSHD B 0 A_PlaySoundEx("weapon/icewavespawn","Weapon")
FSHD B 1 A_FireCustomMissile("FrostShard",0,1,8,0)
FSHD B 8
FSHD C 12
FSHD A 5
Goto Ready+1
NoAmmo:
FSHD A 1 ACS_NamedExecuteAlways("core_noammo",0)
Goto Ready+1
}
}

actor FrostShard : BasicProjectile
{
Translation "199:199=74:74", "192:192=4:4"
PROJECTILE
Damagetype "FrostShard"
Obituary "$OB_FROSTSHARD"
+DONTREFLECT
+SKYEXPLODE
+HEXENBOUNCE
-BOUNCEONWALLS
-BOUNCEONCEILINGS
+DONTSPLASH
+THRUGHOST
+THRUACTORS
+RIPPER
BounceFactor 1.0
Reactiontime 48//13
damage (0)
Radius 15
Height 15
speed 24
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_CountDown
Spawn2:
TNT1 A 2 A_SpawnItemEx("FrostShardIcicle",0,0,0,0,0,0,0,1)
TNT1 A 0 A_CountDown
TNT1 A 2 A_SpawnItemEx("FrostShardIcicle2",0,0,0,0,0,0,0,1)
Goto Spawn
Death:
TNT1 A 1
stop
}
}

actor FrostShardIcicle : BasicProjectile
{
PROJECTILE
renderstyle "translucent"
Damagetype "FrostShard"
Obituary "$OB_FROSTSHARD"
+DONTBLAST
+RIPPER
Damage (CallACS("vile_cbm_damage",8))
Radius 15
Height 15
Scale 2.5
States
{
Spawn:
FSHD D 0
FSHD D 0 ACS_NamedExecuteWithResult("core_alphaprojectile", CallACS("core_getptrtid", AAPTR_TARGET), APROJ_TEAM, 6553, 512) // 6553 = 0.1 * 65536
FSHD D 0 A_PlaySoundEx("weapons/mm8/icewaveloop","weapon")
FSHD DEFFF 3 A_SpawnItemEx("IcePitFreeze")
Goto Death
Death:
TNT1 A 0 A_PlaySound("weapons/mm8/icewavebreak",1,1.0)
TNT1 AA 0 A_SpawnItemEx("FrostShardFX",Random(-16,16),Random(-16,16),Random(-16,16),Random(-4,4),Random(-4,4),Random(2,8),0,1)
TNT1 A 1
stop
}
}

actor FrostShardIcicle2 : FrostShardIcicle
{
States
{
Spawn:
FSHD D 0
FSHD D 0 ACS_NamedExecuteWithResult("core_alphaprojectile", CallACS("core_getptrtid", AAPTR_TARGET), APROJ_TEAM, 6553, 512) // 6553 = 0.1 * 65536
FSHD DEFFF 3 A_SpawnItemEx("IcePitFreeze")
Goto Death
Death:
TNT1 AA 0 A_SpawnItemEx("FrostShardFX",Random(-16,16),Random(-16,16),Random(-16,16),Random(-4,4),Random(-4,4),Random(2,8),0,1)
TNT1 A 1
stop
}
}


actor FrostShardProtect : PowerProtection
{Damagefactor "FrostShard", 0.0 Powerup.Duration 4}

actor FrostShardFX : BasicGraphicEffect
{
+NOINTERACTION
+DONTSPLASH
+CLIENTSIDEONLY
Gravity 0.75
Damage (0)
height 2
radius 2
scale 2.5
States
{
SpawnFrame:
TNT1 A 1
TNT1 A 0 A_Jump(256,"U","V","W","X")
U:
FSHD G 0 ThrustThingZ(0,4,1,1)
FSHD G 1 A_FadeOut
loop
V:
FSHD H 0 ThrustThingZ(0,4,1,1)
FSHD H 1 A_FadeOut
loop
W:
FSHD I 0 ThrustThingZ(0,4,1,1)
FSHD I 1 A_FadeOut
loop
X:
FSHD J 0 ThrustThingZ(0,4,1,1)
FSHD J 1 A_FadeOut
loop
}
}

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