add fuel/calamity blade/incinerator from id24

This commit is contained in:
Ricardo Luís Vaz Silva 2025-01-13 12:04:43 -03:00
parent e543e26bdc
commit 987a07bcdf
8 changed files with 416 additions and 2 deletions

View file

@ -456,3 +456,17 @@ $alias intermission/nextstage weapons/rocklx
$alias intermission/paststats weapons/shotgr
$alias intermission/pastcoopstats weapons/shotgr
$alias intermission/pastdmstats *gibbed
// id24 sounds
weapons/incinerator/fire1 DSINCFI1
weapons/incinerator/fire2 DSINCFI2
weapons/incinerator/burn DSINCBRN
weapons/incinerator/hot1 DSINCHT1
weapons/incinerator/hot2 DSINCHT2
weapons/incinerator/hot3 DSINCHT3
weapons/calamityblade/charge DSHETCHG
weapons/calamityblade/shoot DSHETSHT
weapons/calamityblade/explode DSHETXPL

View file

@ -149,4 +149,8 @@ DoomEdNums
9109 = MarinePlasma
9110 = MarineRailgun
9111 = MarineBFG
-28622 = ID24Fuel
-28621 = ID24FuelTank
-28620 = ID24CalamityBlade
-28619 = ID24Incinerator
}

View file

@ -124,6 +124,10 @@ version "4.12"
#include "zscript/actors/doom/weaponbfg.zs"
#include "zscript/actors/doom/dehacked.zs"
#include "zscript/actors/doom/id24/id24ammo.zs"
#include "zscript/actors/doom/id24/id24incinerator.zs"
#include "zscript/actors/doom/id24/id24calamityblade.zs"
#include "zscript/actors/doom/deadthings.zs"
#include "zscript/actors/doom/doomammo.zs"
#include "zscript/actors/doom/doomarmor.zs"

View file

@ -23,8 +23,8 @@ class DoomPlayer : PlayerPawn
Player.WeaponSlot 3, "Shotgun", "SuperShotgun";
Player.WeaponSlot 4, "Chaingun";
Player.WeaponSlot 5, "RocketLauncher";
Player.WeaponSlot 6, "PlasmaRifle";
Player.WeaponSlot 7, "BFG9000";
Player.WeaponSlot 6, "ID24Incinerator", "PlasmaRifle";
Player.WeaponSlot 7, "ID24CalamityBlade", "BFG9000";
Player.ColorRange 112, 127;
Player.Colorset 0, "$TXT_COLOR_GREEN", 0x70, 0x7F, 0x72;

View file

@ -0,0 +1,57 @@
/*****************************************************************************
* Copyright (C) 1993-2024 id Software LLC, a ZeniMax Media company.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
****************************************************************************/
/*****************************************************************************
* id1 - decohack - ammo
****************************************************************************/
//converted from DECOHACK and from id24data.cpp
class ID24Fuel : Ammo
{
Default
{
Inventory.PickupMessage "$ID24_GOTFUELCAN";
Inventory.Amount 10;
Inventory.MaxAmount 150;
Ammo.BackpackAmount 10;
Ammo.BackpackMaxAmount 300;
Inventory.Icon "FTNKA0";
Tag "$AMMO_ID24FUEL";
}
States
{
Spawn:
FCPU A -1;
Stop;
}
}
class ID24FuelTank : ID24Fuel
{
Default
{
Inventory.PickupMessage "$ID24_GOTFUELTANK";
Inventory.Amount 50;
Ammo.DropAmmoFactorMultiplier 0.8; // tank has 20 drop amount, not 25, so multiply the factor by a further 0.8
// -- for custom dehacked ammo this can be calculated based on the drop amount and the default factor
Tag "$AMMO_ID24FUELTANK";
}
States
{
Spawn:
FTNK A -1;
Stop;
}
}

View file

@ -0,0 +1,213 @@
/*****************************************************************************
* Copyright (C) 1993-2024 id Software LLC, a ZeniMax Media company.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
****************************************************************************/
/*****************************************************************************
* id1 - decohack - heatwave generator
****************************************************************************/
class ID24CalamityBlade : DoomWeapon // Heatwave Generator
{
Default
{
Weapon.SelectionOrder 1000;
Weapon.AmmoUse 10;
Weapon.AmmoGive 40;
Weapon.AmmoType "ID24Fuel";
Inventory.PickupMessage "$ID24_GOTCALAMITYBLADE";
Tag "$TAG_ID24CALAMITYBLADE";
}
action void A_CheckAmmo(StateLabel st, int amount)
{
MBF21_CheckAmmo(ResolveState(st), amount);
}
action void A_GunFlashTo(StateLabel st, int dontchangeplayer)
{
MBF21_GunFlashTo(ResolveState(st), dontchangeplayer);
}
action void A_RefireTo(StateLabel st, int skipcheck)
{
MBF21_RefireTo(ResolveState(st), skipcheck);
}
States
{
Spawn:
CBLD A -1;
Stop;
Ready:
HETG A 1 A_WeaponReady;
Loop;
Deselect:
HETG A 1 A_Lower;
Loop;
Select:
HETG A 1 A_Raise;
Loop;
Fire:
Hold0:
HETG A 0 MBF21_ConsumeAmmo(0);
HETG A 0 A_GunFlashTo("Hold0Flash", 1);
HETG A 20 A_StartSound("weapons/calamityblade/charge", CHAN_WEAPON);
HETG A 0 A_CheckAmmo("Hold0FireProjectiles", 0);
HETG A 0 A_RefireTo("Hold1", 0);
Goto Hold0FireProjectiles;
Hold1:
HETG A 0 MBF21_ConsumeAmmo(0);
HETG A 0 A_GunFlashTo("Hold1Flash", 1);
HETG A 20 A_StartSound("weapons/calamityblade/charge", CHAN_WEAPON);
HETG A 0 A_CheckAmmo("Hold1FireProjectiles", 0);
HETG A 0 A_RefireTo("Hold2", 0);
Goto Hold1FireProjectiles;
Hold2:
HETG A 0 MBF21_ConsumeAmmo(0);
HETG A 0 A_GunFlashTo("Hold2Flash", 1);
HETG A 20 A_StartSound("weapons/calamityblade/charge", CHAN_WEAPON);
HETG A 0 A_CheckAmmo("Hold2FireProjectiles", 0);
HETG A 0 A_RefireTo("Hold3", 0);
Goto Hold2FireProjectiles;
Hold3:
HETG A 0 MBF21_ConsumeAmmo(0);
HETG A 0 A_GunFlashTo("Hold3Flash", 1);
HETG A 20 A_StartSound("weapons/calamityblade/charge", CHAN_WEAPON);
HETG A 0 A_CheckAmmo("Hold3FireProjectiles", 0);
HETG A 0 A_RefireTo("Hold4", 0);
Goto Hold3FireProjectiles;
Hold4:
HETG A 0 MBF21_ConsumeAmmo(0);
HETG A 0 A_GunFlashTo("Hold4Flash", 1);
HETG A 20 A_StartSound("weapons/calamityblade/charge", CHAN_WEAPON);
Goto Hold4FireProjectiles;
Hold4FireProjectiles:
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -35, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -30, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -25, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -20, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -15, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -10, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 0, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 10, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 15, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 20, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 25, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 30, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 35, 0, 0, 0);
Goto FireAnim;
Hold3FireProjectiles:
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -27.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -22.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -17.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -12.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -7.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -2.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 2.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 7.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 12.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 17.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 22.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 27.5, 0, 0, 0);
Goto FireAnim;
Hold2FireProjectiles:
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -20, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -15, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -10, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 0, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 10, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 15, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 20, 0, 0, 0);
Goto FireAnim;
Hold1FireProjectiles:
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -12.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -7.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -2.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 2.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 7.5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 12.5, 0, 0, 0);
Goto FireAnim;
Hold0FireProjectiles:
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", -5, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 0, 0, 0, 0);
HETF A 0 BRIGHT MBF21_WeaponProjectile("ID24IncineratorProjectile", 5, 0, 0, 0);
Goto FireAnim;
FireAnim:
HETF A 0 BRIGHT A_StartSound("weapons/calamityblade/shoot", CHAN_WEAPON);
HETF A 3 BRIGHT A_GunFlash;
HETF B 5 BRIGHT;
HETG D 4;
HETG C 4;
HETG B 4;
HETG A 0 A_ReFire;
Goto Ready;
Hold0Flash:
HETC A 6 BRIGHT;
HETC BCD 5 BRIGHT;
Goto LightDone;
Hold1Flash:
HETC E 6 BRIGHT;
HETC FGH 5 BRIGHT;
Goto LightDone;
Hold2Flash:
HETC I 6 BRIGHT;
HETC JKL 5 BRIGHT;
Goto LightDone;
Hold3Flash:
HETC M 6 BRIGHT;
HETC NOP 5 BRIGHT;
Goto LightDone;
Hold4Flash:
HETC Q 6 BRIGHT;
HETC RST 5 BRIGHT;
Goto LightDone;
Flash:
TNT1 A 3 A_Light1;
TNT1 A 5 A_Light2;
Goto LightDone;
}
}
class ID24IncineratorProjectile : Actor // Heatwave Ripper
{
Default
{
Damage 10;
Speed 20;
Radius 16;
Height 8;
+NOBLOCKMAP;
+NOGRAVITY;
+DROPOFF;
+MISSILE;
+ZDOOMTRANS;
+RIPPER;
DeathSound "weapons/calamityblade/explode";
}
States
{
Spawn:
HETB ABC 3 Bright;
Loop;
Death:
HETB DEFGHI 3 Bright;
Stop;
}
}

View file

@ -0,0 +1,116 @@
/*****************************************************************************
* Copyright (C) 1993-2024 id Software LLC, a ZeniMax Media company.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
****************************************************************************/
/*****************************************************************************
* id1 - decohack - incinerator
****************************************************************************/
class ID24Incinerator : DoomWeapon // Incinerator
{
Default
{
Weapon.SelectionOrder 120;
Weapon.AmmoUse 1;
Weapon.AmmoGive 40;
Weapon.AmmoType "ID24Fuel";
Inventory.PickupMessage "$ID24_GOTINCINERATOR";
Tag "$TAG_ID24INCINERATOR";
}
States
{
Spawn:
INCN A -1;
Stop;
Ready:
FLMG A 1 A_WeaponReady;
Loop;
Deselect:
FLMG A 1 A_Lower;
Loop;
Select:
FLMG A 1 A_Raise;
Loop;
Fire:
FLMF A 0 BRIGHT A_Jump(128, "FireAltSound");
FLMF A 0 BRIGHT A_StartSound("weapons/incinerator/fire1", CHAN_WEAPON);
Goto DoFire;
FireAltSound:
FLMF A 0 BRIGHT A_StartSound("weapons/incinerator/fire2", CHAN_WEAPON);
Goto DoFire;
DoFire:
FLMF A 0 BRIGHT A_GunFlash;
FLMF A 0 BRIGHT MBF21_ConsumeAmmo(1);
FLMF A 1 BRIGHT MBF21_WeaponProjectile("ID24IncineratorFlame", 0, 0, 0, 0);
FLMF B 1 BRIGHT;
FLMG A 1;
FLMG A 0 A_ReFire;
Goto Ready;
Flash:
TNT1 A 2 A_Light2;
TNT1 A 1 A_Light1;
Goto LightDone;
}
}
class ID24IncineratorFlame : Actor // Incinerator Flame
{
Default
{
Damage 5;
Speed 40;
Radius 13;
Height 8;
+NOBLOCKMAP;
+NOGRAVITY;
+DROPOFF;
+MISSILE;
+ZDOOMTRANS;
+FORCERADIUSDMG;
}
States
{
Spawn:
TNT1 A 1 BRIGHT;
IFLM A 2 BRIGHT;
IFLM B 2 BRIGHT A_StartSound("weapons/incinerator/burn", CHAN_BODY);
IFLM CDEFGH 2 BRIGHT;
Stop;
Death:
IFLM A 0 BRIGHT A_Jump(128, "DeathSoundAlt");
IFLM A 0 BRIGHT A_StartSound("weapons/incinerator/hot1", CHAN_BODY);
Goto DeathExplosion;
DeathSoundAlt:
IFLM A 0 BRIGHT A_StartSound("weapons/incinerator/hot2", CHAN_BODY);
Goto DeathExplosion;
DeathExplosion:
IFLM I 2 BRIGHT A_RadiusDamage(5, 64);
IFLM JI 2 BRIGHT;
IFLM J 2 BRIGHT A_RadiusDamage(5, 64);
IFLM KJ 2 BRIGHT;
IFLM K 2 BRIGHT A_RadiusDamage(5, 64);
IFLM L 2 BRIGHT;
IFLM K 2 BRIGHT A_StartSound("weapons/incinerator/hot3", CHAN_BODY);
IFLM L 2 BRIGHT A_RadiusDamage(5, 64);
IFLM ML 2 BRIGHT;
IFLM M 2 BRIGHT A_RadiusDamage(5, 64);
IFLM NM 2 BRIGHT;
IFLM N 2 BRIGHT A_RadiusDamage(5, 64);
IFLM ONO 2 BRIGHT;
IFLM POP 2 BRIGHT;
Stop;
}
}

View file

@ -38,15 +38,19 @@ class Ammo : Inventory
int BackpackAmount;
int BackpackMaxAmount;
meta int DropAmount;
meta double DropAmmoFactorMultiplier;
property BackpackAmount: BackpackAmount;
property BackpackMaxAmount: BackpackMaxAmount;
property DropAmount: DropAmount;
property DropAmmoFactorMultiplier: DropAmmoFactorMultiplier;
Default
{
+INVENTORY.KEEPDEPLETED
Inventory.PickupSound "misc/ammo_pkup";
Ammo.DropAmmoFactorMultiplier 1;
}
//===========================================================================
@ -202,6 +206,8 @@ class Ammo : Inventory
ignoreskill = false;
}
dropammofactor *= DropAmmoFactorMultiplier;
if (dropamount > 0)
{
if (ignoreskill)