Browse Source

add new mechanics to wanderer's magnum

master
Alison Watson 2 months ago
parent
commit
8859b5ef67
12 changed files with 95 additions and 31 deletions
  1. BIN
      pk7/acs/lithmain.bin
  2. +3
    -0
      pk7/language.gfx.txt
  3. BIN
      pk7/lsounds/WeaponsW/Magnum/FireBacking
  4. +42
    -16
      pk7/lzscript/4_Wanderer/2_Magnum.zsc
  5. +1
    -1
      pk7/lzscript/5_Assassin/2_DualPistols.zsc
  6. +1
    -1
      pk7/lzscript/6_DarkLord/0_Weapon.zsc
  7. +1
    -1
      pk7/lzscript/6_DarkLord/4_Minigun.zsc
  8. +6
    -0
      pk7/lzscript/Effects/BulletPuff.zsc
  9. +16
    -2
      pk7/lzscript/Playsim/Events.zsc
  10. +18
    -5
      pk7/lzscript/Weapons/Base.zsc
  11. +2
    -1
      pk7/sndinfo.txt
  12. +5
    -4
      text/sound/weapons.w.txt

BIN
pk7/acs/lithmain.bin View File


+ 3
- 0
pk7/language.gfx.txt View File

@@ -96,6 +96,9 @@ identifier,default
:HUD:RifleScope,lgfx/HUD/RifleScope.png
:HUD:Vignette,lgfx/HUD/Vignette.png
:HUD:ZoomOverlay,lgfx/HUD/ZoomOverlay.png
:HUD_A:LeftBack,lgfx/HUD_A/LeftBack.png
:HUD_A:LeftBar,lgfx/HUD_A/LeftBar.png
:HUD_A:RightBack,lgfx/HUD_A/RightBack.png
:HUD_C:AMMO,lgfx/HUD_C/AMMO.png
:HUD_C:ARM,lgfx/HUD_C/ARM.png
:HUD_C:ARM_B,lgfx/HUD_C/ARM_B.png


BIN
pk7/lsounds/WeaponsW/Magnum/FireBacking View File


+ 42
- 16
pk7/lzscript/4_Wanderer/2_Magnum.zsc View File

@@ -20,32 +20,55 @@ default {
+WEAPON.NOAUTOFIRE;
}

uint m_rampage;
uint m_multiShot;
uint m_buffCooldown;

action(Weapon) void lith_fireMagnum() {
A_GunFlash("DummyFlash");
A_Recoil(1.5);
A_Quake(2, 3, 0, 128);
Lith_FireBullets(0, 0, -1, 77, FBF_NORANDOM);
A_StartSound("weapons/magnum/fire", lch_weapon);
a_gunFlash("DummyFlash");
a_recoil(1.5);
a_quake(2, 3, 0, 128);
uint rampage = invoker.m_rampage;
uint multiShot = invoker.m_multiShot;
int dmg;
/**/ if(rampage) dmg = int(21.39 * (float(rampage) * 1.2 + 4.0));
else if(multiShot) dmg = int(21.39 * (float(multiShot) * 1.0 + 0.0));
else dmg = 21;
lith_fireBullets(0, 0, -1, dmg, FBF_NORANDOM, tracer: _tr_slow);
a_startSound("weapons/magnum/fire", lch_weapon);
a_startSound("weapons/magnum/fireback", lch_weapon2);
lith_a_gunSmokeSmall();
a_fireProjectile("Lith_LightProjectileRedShort", 0);
}

override void tick() {
super.tick();
if(m_buffCooldown) {
m_buffCooldown--;
} else {
m_rampage = 0;
m_multiShot = 0;
}
}

states(Weapon) {
Ready:
MAGN A 1 Lith_A_Ready(WRF_ALLOWRELOAD);
MAGN A 1 lith_a_ready(WRF_ALLOWRELOAD);
loop;

Deselect:
MAGN A 1 A_Lower(18);
MAGN A 1 a_lower(18);
wait;
Select:
MAGN A 1 A_Raise(18);
MAGN A 1 a_raise(18);
wait;

Fire:
#### # 0 Lith_A_JumpIfMagEmpty;
#### # 0 Lith_A_MagIncr;
#### # 0 lith_a_jumpIfMagEmpty;
#### # 0 lith_a_magIncr;
MAGN A 1 offset(2, 32);
MAGN B 1 bright lith_fireMagnum();
MAGN B 1 bright offset(10, 28) Lith_A_RecoilUp(1.7);
MAGN B 1 bright offset(10, 28) lith_a_recoilUp(1.7);
MAGN BB 1 bright;
MAGN CC 1 bright offset(9, 28);
MAGN C 1 bright offset(7, 30);
@@ -64,23 +87,26 @@ FireEmpty:
MAGN A 1;
MAGN AA 1 offset(3, 38);
MAGN A 1 offset(7, 40);
MAGN A 1 offset(5, 37) A_StartSound("weapons/cshotgun/empty", lch_dryweapon);
MAGN A 1 offset(5, 37) a_startSound("weapons/cshotgun/empty", lch_dryweapon);
MAGN A 1 offset(4, 34);
MAGN A 1 offset(2, 33);
MAGN AAAAA 1 offset(1, 32);
goto ReadySelector;

Reload:
MAGN A 1 Lith_A_JumpIfMagFull;
MAGN F 3 A_StartSound("weapons/magnum/reload", lch_reload);
MAGN A 1 lith_a_jumpIfMagFull;
MAGN F 3 {
a_startSound("weapons/magnum/reload", lch_reload);
lith_a_reloadBobDn(0.5);
}
MAGN F 4 offset(7, 32);
MAGN G 3 offset(1, 32);
MAGN G 4 offset(7, 32);
MAGN H 5 offset(1, 32);
MAGN H 5 offset(1, 32) lith_a_reloadBobUp(0.3);
MAGN H 5 offset(7, 32);
MAGN F 3 offset(7, 32);
MAGN F 4 offset(1, 32);
MAGN A 5 Lith_A_ReloadFinish;
MAGN A 5 lith_a_reloadFinish;
goto ReadySelector;
}



+ 1
- 1
pk7/lzscript/5_Assassin/2_DualPistols.zsc View File

@@ -20,7 +20,7 @@ default {
action(Weapon) void Lith_A_FireDualPistols(int xofs) {
Lith_A_MagIncr();
A_GunFlash("DummyFlash");
Lith_FireBullets(2, 1, -1, 10, FBF_NORANDOM, tracer_x: xofs);
Lith_FireBullets(2, 1, -1, 10, FBF_NORANDOM, tracerX: xofs);
Lith_A_GunSmokeSmall();
Lith_A_RecoilUp(1.5);
A_FireProjectile("Lith_LightProjectileRedShort", 0);


+ 1
- 1
pk7/lzscript/6_DarkLord/0_Weapon.zsc View File

@@ -109,7 +109,7 @@ action(Weapon) void Lith_SubGunFire() {
player.getPSprite(_psp_d_subweapon).frame = randomPick(0, 2);
A_StartSound("weapons/subweapon/armgun", lch_altweapon);
A_AlertMonsters();
Lith_FireBullets(1, 2, -1, 15, pufftype: "Lith_BulletPuffPainful", tracer_x: -6);
Lith_FireBullets(1, 2, -1, 15, puffType: "Lith_BulletPuffPainful", tracerX: -6);
}

action(Weapon) void Lith_SubDagFire() {


+ 1
- 1
pk7/lzscript/6_DarkLord/4_Minigun.zsc View File

@@ -118,7 +118,7 @@ action(Weapon) void Lith_A_MinigunFire()
A_AlertMonsters();
A_StartSound("weapons/minigun/fire", lch_weapon);
A_WeaponOffset(FRandom(3, 8), FRandom(34, 39), WOF_INTERPOLATE);
Lith_FireBullets(7, 1.7, 2, 7, tracer_x: 1);
Lith_FireBullets(7, 1.7, 2, 7, tracerX: 1);
Lith_A_RecoilUp(0.15);
A_Recoil(0.07);
}


+ 6
- 0
pk7/lzscript/Effects/BulletPuff.zsc View File

@@ -153,6 +153,12 @@ class Lith_BulletTracer : FastProjectile
}
}

class Lith_BulletTracerSlow : Lith_BulletTracer {
default {
Speed 43;
}
}

class Lith_BulletRicochetSpark : Actor
{
default


+ 16
- 2
pk7/lzscript/Playsim/Events.zsc View File

@@ -343,10 +343,24 @@ override void WorldThingDamaged(WorldEvent ev)

let player = Lith_Player(src);

if(player)
if(player) {
player.Lith_AddDamageNum(pos, dst.radius/2, ev.damage);
else if(src.CountInv("Lith_MonsterID") && (dst.bCOUNTKILL || dst.Player))

let magnum = Lith_Magnum(player.player.readyWeapon);
if(magnum) {
uint rampage = magnum.m_rampage;
if(dst.health <= 0) {
magnum.m_rampage = min(rampage + 1, 3);
magnum.m_multiShot = 0;
magnum.m_buffCooldown = 35 * 4;
} else if(rampage == 0) {
magnum.m_multiShot = min(magnum.m_multiShot + 1, 4);
magnum.m_buffCooldown = 35 * 2;
}
}
} else if(src.CountInv("Lith_MonsterID") && (dst.bCOUNTKILL || dst.Player)) {
src.ACS_ScriptCall("Lith_GiveMonsterEXP", ev.Damage);
}
}

override void WorldThingDied(WorldEvent ev)


+ 18
- 5
pk7/lzscript/Weapons/Base.zsc View File

@@ -37,6 +37,12 @@ enum Lith_Oscillate {
_oscillate,
}

enum Lith_TracerType {
_tr_normal,
_tr_slow,
_tr_none
}

default {
Inventory.PickupMessage "";
Inventory.PickupSound "";
@@ -255,15 +261,22 @@ action void Lith_A_Casing(class<Lith_CasingBase> cas, double px, double py, doub
A_SpawnItemEx(cas, Cos(Pitch)*px, py, pz-Sin(Pitch)*px+vh, vx, vy, vz);
}

action(Weapon) void Lith_FixedBullets(int numbullets, int damage, int flags = 0, class<Actor> pufftype = "Lith_BulletPuff", double tracer_x = 0, double range = 8192) {
for(int i = 0; i < numbullets; i++) {
action(Weapon) void Lith_FixedBullets(int numBullets, int damage, int flags = 0, class<Actor> puffType = "Lith_BulletPuff", double tracerX = 0, double range = 8192) {
for(int i = 0; i < numBullets; i++) {
double p, y; [p, y] = invoker.GetFirePattern();
Lith_FireBullets(p, y, -1, damage, FBF_EXPLICITANGLE | FBF_NORANDOM | flags, pufftype, tracer_x, range);
Lith_FireBullets(p, y, -1, damage, FBF_EXPLICITANGLE | FBF_NORANDOM | flags, puffType, tracerX, range);
}
}

action(Weapon) void Lith_FireBullets(double spread_horz, double spread_vert, int numbullets, int damage, int flags = 0, class<Actor> pufftype = "Lith_BulletPuff", double tracer_x = 0, double range = 8192) {
A_FireBullets(spread_horz, spread_vert, numbullets, damage, pufftype, flags, range, "Lith_BulletTracer", 7 + FRandom(-1, 0), tracer_x + FRandom(-0.7, 0.7));
action(Weapon) void Lith_FireBullets(double spreadHorz, double spreadVert, int numBullets, int damage, int flags = 0, class<Actor> puffType = "Lith_BulletPuff", double tracerX = 0, double range = 8192, Lith_TracerType tracer = _tr_normal) {
class<Actor> tracerType;
switch(tracer) {
default:
case _tr_normal: tracerType = "Lith_BulletTracer"; break;
case _tr_slow: tracerType = "Lith_BulletTracerSlow"; break;
case _tr_slow: tracerType = null; break;
}
A_FireBullets(spreadHorz, spreadVert, numBullets, damage, puffType, flags, range, tracerType, 7 + FRandom(-1, 0), tracerX + FRandom(-0.7, 0.7));
}

states(Actor) {


+ 2
- 1
pk7/sndinfo.txt View File

@@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------|
*
* This file was generated by compilesnd.
* This file was generated by sndc.
* Edit only if you aren't going to recompile.
*
* ---------------------------------------------------------------------------|
@@ -773,6 +773,7 @@ weapons/redrifle/fire lsounds/WeaponsT/RedRifle/Fire
weapons/redrifle/bolt lsounds/WeaponsT/RedRifle/Bolt
weapons/magnum/fire1 lsounds/WeaponsW/Magnum/Fire
weapons/magnum/fire2 lsounds/WeaponsW/Magnum/Fire2
weapons/magnum/fireback lsounds/WeaponsW/Magnum/FireBacking
weapons/magnum/reload lsounds/WeaponsW/Magnum/Reload
weapons/magnum/pickup lsounds/WeaponsW/Magnum/Pickup
$random weapons/magnum/fire { weapons/magnum/fire1 weapons/magnum/fire2 }


+ 5
- 4
text/sound/weapons.w.txt View File

@@ -9,10 +9,11 @@
weapons {
magnum {
== lsounds/WeaponsW/Magnum
fire1 Fire # Marathon 2
fire2 Fire2 # //
reload Reload # //
pickup Pickup # Fallout 4
fire1 Fire # Marathon 2
fire2 Fire2 # //
fireback FireBacking # //
reload Reload # //
pickup Pickup # Fallout 4

$random fire { fire1, fire2, }
$alias draw = pickup


Loading…
Cancel
Save