mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
050acc9271
* all new things got either an sctor definition or are explicitly deleted through the 'doomednums' section in MAPINFO. CTC related actors are non-functional! * added a 'noskillflags' option to 'doomednums' so that the lightmap definition things in the maps can be repurposed as dynamic lights. * added the new dagger powerup. * added MAPINFO entries for the added maps.
77 lines
1.4 KiB
Text
77 lines
1.4 KiB
Text
|
|
// Punch Dagger -------------------------------------------------------------
|
|
|
|
class PunchDagger : StrifeWeapon
|
|
{
|
|
Default
|
|
{
|
|
Weapon.SelectionOrder 3900;
|
|
+WEAPON.NOALERT
|
|
Obituary "$OB_MPPUNCHDAGGER";
|
|
Tag "$TAG_PUNCHDAGGER";
|
|
}
|
|
|
|
States
|
|
{
|
|
Ready:
|
|
PNCH A 1 A_WeaponReady;
|
|
Loop;
|
|
Deselect:
|
|
PNCH A 1 A_Lower;
|
|
Loop;
|
|
Select:
|
|
PNCH A 1 A_Raise;
|
|
Loop;
|
|
Fire:
|
|
PNCH B 4;
|
|
PNCH C 4 A_JabDagger;
|
|
PNCH D 5;
|
|
PNCH C 4;
|
|
PNCH B 5 A_ReFire;
|
|
Goto Ready;
|
|
}
|
|
|
|
//============================================================================
|
|
//
|
|
// A_JabDagger
|
|
//
|
|
//============================================================================
|
|
|
|
action void A_JabDagger ()
|
|
{
|
|
FTranslatedLineTarget t;
|
|
int damage;
|
|
|
|
if (FindInventory("SVETalismanPowerup"))
|
|
{
|
|
damage = 1000;
|
|
}
|
|
else
|
|
{
|
|
int power = MIN(10, stamina / 10);
|
|
damage = (random[JabDagger]() % (power + 8)) * (power + 2);
|
|
|
|
if (FindInventory("PowerStrength"))
|
|
{
|
|
damage *= 10;
|
|
}
|
|
}
|
|
|
|
double angle = angle + random2[JabDagger]() * (5.625 / 256);
|
|
double pitch = AimLineAttack (angle, 80.);
|
|
LineAttack (angle, 80., pitch, damage, 'Melee', "StrifeSpark", true, t);
|
|
|
|
// turn to face target
|
|
if (t.linetarget)
|
|
{
|
|
A_PlaySound (t.linetarget.bNoBlood ? sound("misc/metalhit") : sound("misc/meathit"), CHAN_WEAPON);
|
|
angle = t.angleFromSource;
|
|
bJustAttacked = true;
|
|
t.linetarget.DaggerAlert (self);
|
|
}
|
|
else
|
|
{
|
|
A_PlaySound ("misc/swish", CHAN_WEAPON);
|
|
}
|
|
}
|
|
}
|