2016-10-18 13:15:06 +00:00
|
|
|
|
|
|
|
// The Cleric's Mace --------------------------------------------------------
|
|
|
|
|
|
|
|
class CWeapMace : ClericWeapon
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Weapon.SelectionOrder 3500;
|
|
|
|
Weapon.KickBack 150;
|
|
|
|
Weapon.YAdjust -8;
|
|
|
|
+BLOODSPLATTER
|
|
|
|
Obituary "$OB_MPCWEAPMACE";
|
|
|
|
Tag "$TAG_CWEAPMACE";
|
|
|
|
}
|
|
|
|
|
|
|
|
States
|
|
|
|
{
|
|
|
|
Select:
|
|
|
|
CMCE A 1 A_Raise;
|
|
|
|
Loop;
|
|
|
|
Deselect:
|
|
|
|
CMCE A 1 A_Lower;
|
|
|
|
Loop;
|
|
|
|
Ready:
|
|
|
|
CMCE A 1 A_WeaponReady;
|
|
|
|
Loop;
|
|
|
|
Fire:
|
|
|
|
CMCE B 2 Offset (60, 20);
|
|
|
|
CMCE B 1 Offset (30, 33);
|
|
|
|
CMCE B 2 Offset (8, 45);
|
|
|
|
CMCE C 1 Offset (8, 45);
|
|
|
|
CMCE D 1 Offset (8, 45);
|
|
|
|
CMCE E 1 Offset (8, 45);
|
|
|
|
CMCE E 1 Offset (-11, 58) A_CMaceAttack;
|
|
|
|
CMCE F 1 Offset (8, 45);
|
|
|
|
CMCE F 2 Offset (-8, 74);
|
|
|
|
CMCE F 1 Offset (-20, 96);
|
|
|
|
CMCE F 8 Offset (-33, 160);
|
|
|
|
CMCE A 2 Offset (8, 75) A_ReFire;
|
|
|
|
CMCE A 1 Offset (8, 65);
|
|
|
|
CMCE A 2 Offset (8, 60);
|
|
|
|
CMCE A 1 Offset (8, 55);
|
|
|
|
CMCE A 2 Offset (8, 50);
|
|
|
|
CMCE A 1 Offset (8, 45);
|
|
|
|
Goto Ready;
|
|
|
|
}
|
2016-11-26 18:23:22 +00:00
|
|
|
|
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// A_CMaceAttack
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
action void A_CMaceAttack()
|
|
|
|
{
|
|
|
|
FTranslatedLineTarget t;
|
|
|
|
|
|
|
|
if (player == null)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
int damage = 25+(random[MaceAtk]()&15);
|
|
|
|
for (int i = 0; i < 16; i++)
|
|
|
|
{
|
|
|
|
for (int j = 1; j >= -1; j -= 2)
|
|
|
|
{
|
|
|
|
double ang = angle + j*i*(45. / 16);
|
2016-12-10 15:35:48 +00:00
|
|
|
double slope = AimLineAttack(ang, 2 * DEFMELEERANGE, t);
|
2016-11-26 18:23:22 +00:00
|
|
|
if (t.linetarget)
|
|
|
|
{
|
2016-12-10 15:35:48 +00:00
|
|
|
LineAttack(ang, 2 * DEFMELEERANGE, slope, damage, 'Melee', "HammerPuff", true, t);
|
2016-11-26 18:23:22 +00:00
|
|
|
if (t.linetarget != null)
|
|
|
|
{
|
|
|
|
AdjustPlayerAngle(t);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// didn't find any creatures, so try to strike any walls
|
|
|
|
weaponspecial = 0;
|
|
|
|
|
2016-12-10 15:35:48 +00:00
|
|
|
double slope = AimLineAttack (angle, DEFMELEERANGE);
|
|
|
|
LineAttack (angle, DEFMELEERANGE, slope, damage, 'Melee', "HammerPuff");
|
2016-11-26 18:23:22 +00:00
|
|
|
}
|
2016-10-18 13:15:06 +00:00
|
|
|
}
|