Browse Source

wandering

master
Alison Watson 3 months ago
parent
commit
dbc558df3b
22 changed files with 274 additions and 42 deletions
  1. BIN
      pk7/acs/lithmain.bin
  2. +1
    -0
      pk7/language.txt
  3. BIN
      pk7/lsounds/PlayerW/ShadowWalk
  4. BIN
      pk7/lsounds/WeaponsW/Magnum/Fire
  5. BIN
      pk7/lsounds/WeaponsW/Magnum/Fire2
  6. +17
    -17
      pk7/lzscript/3_Informant/Informant.zsc
  7. +80
    -0
      pk7/lzscript/4_Wanderer/2_Magnum.zsc
  8. +99
    -10
      pk7/lzscript/4_Wanderer/Wanderer.zsc
  9. +1
    -0
      pk7/lzscript/Constants/p_weaponinfo.zsc
  10. +4
    -0
      pk7/sndinfo.txt
  11. BIN
      pk7/sprites/Effects/SWLKA0.png
  12. BIN
      pk7/sprites/WeaponsW/Magnum/MAGNA0.png
  13. +1
    -0
      source/include/p_weaponinfo.h
  14. +15
    -0
      source/u_reflexwetw.c
  15. +0
    -11
      text/Sounds.txt
  16. +4
    -0
      text/Weapons.txt
  17. +1
    -0
      text/en/Misc/UI.txt
  18. +4
    -4
      text/sound/player.m.txt
  19. +7
    -0
      text/sound/player.txt
  20. +14
    -0
      text/sound/player.w.txt
  21. +8
    -0
      text/sound/weapons.txt
  22. +18
    -0
      text/sound/weapons.w.txt

BIN
pk7/acs/lithmain.bin View File


+ 1
- 0
pk7/language.txt View File

@@ -1711,6 +1711,7 @@
"LITH_TAB_ARSENAL_Stan" = "Arsenal";
"LITH_TAB_ARSENAL_Jem" = "Directives";
"LITH_TAB_ARSENAL_Ari" = "Gear";
"LITH_TAB_ARSENAL_Luke" = "Presages";
"LITH_TAB_ARSENAL_Mod" = "$LITH_TAB_ARSENAL_Stan";
"LITH_TAB_STATUS" = "Status";
"LITH_TAB_INVENTORY" = "Inventory";


BIN
pk7/lsounds/PlayerW/ShadowWalk View File


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


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


+ 17
- 17
pk7/lzscript/3_Informant/Informant.zsc View File

@@ -24,45 +24,45 @@ class Lith_InformantPlayer : Lith_Player
+NOBLOOD;
}

private int m_DodgeDbc;
private int m_IFrames;
int m_Overdrive;
private int m_dodgeDbc;
private int m_iFrames;
int m_overdrive;

override void GiveDefaultInventory()
override void giveDefaultInventory()
{
Super.GiveDefaultInventory();
Lith_GiveDefWeapon("Lith_Flintlock");
super.giveDefaultInventory();
lith_giveDefWeapon("Lith_Flintlock");
}

override void Tick()
override void tick()
{
if(m_IFrames) m_IFrames--;
if(m_iFrames) m_iFrames--;

if(health > 0)
{
if(m_DodgeDbc)
m_DodgeDbc--;
if(m_dodgeDbc)
m_dodgeDbc--;
else if(player && player.buttons & BT_SPEED)
{
let a = angle - atan2(player.cmd.sidemove, player.cmd.forwardmove);
let c = cos(a) * 32;
let s = sin(a) * 32;
CallACS("Lith_DodgeView");
callACS("Lith_DodgeView");
A_ChangeVelocity(c, s);
m_IFrames = 20;
m_DodgeDbc = TICRATE;
m_iFrames = 20;
m_dodgeDbc = TICRATE;
}
}

Super.Tick();
super.tick();
}

override int DamageMobj(Actor inflictor, Actor source, int damage, name mod, int flags, double angle)
override int damageMobj(Actor inflictor, Actor source, int damage, name mod, int flags, double angle)
{
if(m_IFrames)
if(m_iFrames)
return 0;
else
return Super.DamageMobj(inflictor, source, damage, mod, flags, angle);
return super.damageMobj(inflictor, source, damage, mod, flags, angle);
}
}



+ 80
- 0
pk7/lzscript/4_Wanderer/2_Magnum.zsc View File

@@ -0,0 +1,80 @@
/* ---------------------------------------------------------------------------|
*
* Distributed under the CC0 public domain license.
* By Alison G. Watson. Attribution is encouraged, though not required.
* See licenses/cc0.txt for more information.
*
* ---------------------------------------------------------------------------|
*/

class Lith_Magnum : Lith_WWeapon;

default {
Lith_Weapon.SpawnType "Lith_PistolPickup";
Lith_Weapon.MagSize 7;
Tag "$LITH_INFO_SHORT_Magnum";
Weapon.SlotNumber 2;
Weapon.SlotPriority 1;
Weapon.UpSound "weapons/magnum/draw";

+WEAPON.NOAUTOFIRE;
}

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);
}

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

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

Fire:
#### # 0 Lith_A_JumpIfMagEmpty;
#### # 0 Lith_A_MagIncr;
MAGN A 1 offset(2, 32);
MAGN A 1 bright lith_fireMagnum();
MAGN A 1 bright offset(10, 28) Lith_A_RecoilUp(2);
MAGN AA 1 bright;
MAGN AA 1 offset(9, 28);
MAGN A 1 offset(7, 30);
MAGN A 1 offset(5, 31);
MAGN A 1 offset(4, 31);
MAGN A 1 offset(3, 32);
MAGN AAA 1 offset(2, 32);
MAGN AAA 1 offset(1, 32);
MAGN A 1;
MAGN A 1;
MAGN A 1 offset(0, 32);
MAGN A 1 offset(0, 32);
goto ReadySelector;

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(4, 34);
MAGN A 1 offset(2, 33);
MAGN AAAAA 1 offset(1, 32);
goto ReadySelector;

Reload:
MAGN A 1 Lith_A_JumpIfMagFull;
MAGN A 1 offset(2, 31) A_StartSound("weapons/magnum/reload", lch_reload);
MAGN A 2 Lith_A_ReloadFinish;
goto ReadySelector;
}

/* EOF */

+ 99
- 10
pk7/lzscript/4_Wanderer/Wanderer.zsc View File

@@ -7,32 +7,121 @@
* ---------------------------------------------------------------------------|
*/

class Lith_WandererPlayer : Lith_Player
{
default
{
class Lith_WandererPlayer : Lith_Player {
default {
Player.DisplayName "$LITH_CLASS_WANDERER";
Player.SoundClass "wanderer";
Player.Portrait "lgfx/Portraits/Wanderer.png";
Tag "Wanderer";
Health 50;
}

int m_dodgeDbc;
int m_iFrames;

override void giveDefaultInventory() {
super.giveDefaultInventory();
lith_giveDefWeapon("Lith_Magnum");
}

override void tick() {
if(m_iFrames) m_iFrames--;

if(health > 0) {
if(m_dodgeDbc) {
m_dodgeDbc--;
} else if(player && player.buttons & BT_SPEED) {
A_StartSound("player/wanderer/shadowwalk", lch_voice);
m_iFrames = 105;
m_dodgeDbc = 525;
callACS("Lith_DodgeViewShadowWalk");
}

if(m_iFrames) {
let a = angle - atan2(player.cmd.sidemove, player.cmd.forwardmove);
let c = cos(a) * 0.7;
let s = sin(a) * 0.7;
A_ChangeVelocity(c, s);
for(int i = 0; i < 4; ++i) {
A_SpawnItemEx("Lith_ShadowWalkEffect", frandom(-1,1),frandom(-1,1),frandom(-1,1), frandom(-0.8,0.8),frandom(-0.8,0.8),frandom(-0.4,0.4));
}
}
}

super.tick();
}

override int damageMobj(Actor inflictor, Actor source, int damage, name mod, int flags, double angle) {
if(m_iFrames)
return 0;
else
return super.damageMobj(inflictor, source, damage, mod, flags, angle);
}
}

class Lith_ItemSpriteW : Lith_ItemSprite
{
default
{
class Lith_ItemSpriteW : Lith_ItemSprite {
default {
VisibleToPlayerClass "Lith_WandererPlayer";
}
}

class Lith_WWeapon : Lith_Weapon
class Lith_WWeapon : Lith_Weapon {
default {
Inventory.RestrictedTo "Lith_WandererPlayer";
}

override state lith_ready(int flags) {
if(Lith_WandererPlayer(owner).m_iFrames != 0)
return resolveState("_ShadowWalk");
else
return null;
}

states(Weapon) {
_ShadowWalk:
#### # 1 offset(1, 34);
#### # 1 offset(4, 40);
#### # 1 offset(10, 55);
#### # 1 offset(21, 90);
#### # 1 offset(25, 160);
TNT1 A 1 offset(1, 32);
_ShadowWalkLoop:
TNT1 A 1 A_JumpIf(Lith_WandererPlayer(invoker.owner).m_iFrames == 0, "_ShadowWalkDone");
loop;
_ShadowWalkDone:
TNT1 A 1 offset(1, 32) A_Lower(60);
TNT1 A 0 resolveState("Select");
stop;
}
}

class Lith_ShadowWalkEffect : Actor
{
default
{
Inventory.RestrictedTo "Lith_WandererPlayer";
Alpha 0.7;
RenderStyle "Subtract";
Scale 0.5;

+NOINTERACTION
}

override void postBeginPlay() {
super.postBeginPlay();
scale.x *= frandom(0.5, 1.5);
scale.y *= frandom(0.5, 1.5);
alpha *= frandom(0.5, 1.5);
}

states
{
Spawn:
SWLK A random(15, 20);
SWLK A 1 A_FadeOut;
wait;
}
}

#include "lzscript/4_Wanderer/2_Magnum.zsc"

/* EOF */

+ 1
- 0
pk7/lzscript/Constants/p_weaponinfo.zsc View File

@@ -45,6 +45,7 @@ enum Lith_WeaponNum {
weapon_d_fatmac,
weapon_d_railgun,
weapon_i_flintlock,
weapon_w_magnum,
weapon_a_dualpist,
weapon_a_burstrif,
weapon_t_riotshot,


+ 4
- 0
pk7/sndinfo.txt View File

@@ -377,6 +377,7 @@ player/rarmor/damage lsounds/PlayerM/RArmor/Damage
player/rocketboost lsounds/PlayerM/RocketBoost
player/adren/inj lsounds/PlayerM/Adrenaline/Inject
player/adren/ready lsounds/PlayerM/Adrenaline/Ready
player/wanderer/shadowwalk lsounds/PlayerW/ShadowWalk
marathon/pickup lsounds/Marathon/Pickup
marathon/explode lsounds/Marathon/Explode
marathon/hitsolid lsounds/Marathon/HitSolid
@@ -770,6 +771,9 @@ $random weapons/dark/impact { weapons/dark/impact1 weapons/dark/impact2 weapons/
$limit weapons/dark/impact 0
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
$random weapons/magnum/fire { weapons/magnum/fire1 weapons/magnum/fire2 }
weapons/cfist/pickup lsounds/Weapons/ChargeFist/Pickup
weapons/cfist/fire1 lsounds/Weapons/ChargeFist/Fire1
weapons/cfist/fire2 lsounds/Weapons/ChargeFist/Fire2


BIN
pk7/sprites/Effects/SWLKA0.png View File

Before After
Width: 74  |  Height: 104  |  Size: 5.9KB

BIN
pk7/sprites/WeaponsW/Magnum/MAGNA0.png View File

Before After
Width: 74  |  Height: 104  |  Size: 2.1KB

+ 1
- 0
source/include/p_weaponinfo.h View File

@@ -57,6 +57,7 @@ enum ZscName(WeaponNum) {
weapon_d_fatmac,
weapon_d_railgun,
weapon_i_flintlock,
weapon_w_magnum,
weapon_a_dualpist,
weapon_a_burstrif,
weapon_t_riotshot,


+ 15
- 0
source/u_reflexwetw.c View File

@@ -98,4 +98,19 @@ void Sc_DodgeView(void)
with_player(LocalPlayer) DodgeView(p);
}

script_str ext("ACS") addr(OBJ "DodgeViewShadowWalk")
void Sc_DodgeViewShadowWalk(void) {
with_player(LocalPlayer) {
k32 vh = p->viewheight;

for(i32 i = 0; i < 105; i++) {
k32 mul = 1.0k - (ACS_Sin(i / 105.0k / 2.0k) * 0.3k) - 0.1k;
SetViewHeight(0, vh * mul);
ACS_Delay(1);
}

SetViewHeight(0, vh);
}
}

/* EOF */

+ 0
- 11
text/Sounds.txt View File

@@ -18,19 +18,8 @@ $include "sound/monsters.txt"
$include "sound/phantoms.txt"
$include "sound/pickups.txt"
$include "sound/player.txt"
$include "sound/player.a.txt"
$include "sound/player.c.txt"
$include "sound/player.d.txt"
$include "sound/player.i.txt"
$include "sound/player.m.txt"
$include "sound/marathon.txt"
$include "sound/weapons.txt"
$include "sound/weapons.a.txt"
$include "sound/weapons.c.txt"
$include "sound/weapons.d.txt"
$include "sound/weapons.m.txt"
$include "sound/weapons.t.txt"
$include "sound/weapons.go.txt"
$include "sound/world.txt"

## EOF

+ 4
- 0
text/Weapons.txt View File

@@ -69,6 +69,10 @@
+i_flintlock 2 Flintlock Placeholder2 AMag A "Shell"
;fist fist i_flintlock fist fist fist fist fist fist

:wanderer
+w_magnum 2 Magnum Placeholder2 NMag
;fist fist w_magnum fist fist fist fist fist fist

:assassin
+a_dualpist 2 DualPistols Placeholder2 NMag
+a_burstrif 4 BurstRifle Placeholder2 NMag


+ 1
- 0
text/en/Misc/UI.txt View File

@@ -46,6 +46,7 @@
== \#TAB_ARSENAL_Stan | Arsenal
== \#TAB_ARSENAL_Jem | Directives
== \#TAB_ARSENAL_Ari | Gear
== \#TAB_ARSENAL_Luke | Presages
== \#TAB_ARSENAL_Mod | $\#TAB_ARSENAL_Stan

== \#TAB_STATUS | Status


+ 4
- 4
text/sound/player.m.txt View File

@@ -12,12 +12,12 @@ player {

# Upgrades
== lsounds/PlayerM
rarmor/mode RArmor/ChangeMode # Halo 3
rarmor/damage RArmor/Damage # Touhou 13
rarmor.mode RArmor/ChangeMode # Halo 3
rarmor.damage RArmor/Damage # Touhou 13

rocketboost RocketBoost # ???
adren/inj Adrenaline/Inject # Killing Floor
adren/ready Adrenaline/Ready # //
adren.inj Adrenaline/Inject # Killing Floor
adren.ready Adrenaline/Ready # //
}

# EOF

+ 7
- 0
text/sound/player.txt View File

@@ -109,4 +109,11 @@ player {
wings Wings # Hexen
}

$include "sound/player.a.txt"
$include "sound/player.c.txt"
$include "sound/player.d.txt"
$include "sound/player.i.txt"
$include "sound/player.m.txt"
$include "sound/player.w.txt"

# EOF

+ 14
- 0
text/sound/player.w.txt View File

@@ -0,0 +1,14 @@
## -*-Agw-LithSnd-*-----------------------------------------------------------|
##
## Distributed under the CC0 public domain license.
## By Alison G. Watson. Attribution is encouraged, though not required.
## See licenses/cc0.txt for more information.
##
## ---------------------------------------------------------------------------|

player.wanderer {
== lsounds/PlayerW
shadowwalk ShadowWalk # Self-made
}

# EOF

+ 8
- 0
text/sound/weapons.txt View File

@@ -229,4 +229,12 @@ effects {
}
}

$include "sound/weapons.a.txt"
$include "sound/weapons.c.txt"
$include "sound/weapons.d.txt"
$include "sound/weapons.m.txt"
$include "sound/weapons.t.txt"
$include "sound/weapons.w.txt"
$include "sound/weapons.go.txt"

# EOF

+ 18
- 0
text/sound/weapons.w.txt View File

@@ -0,0 +1,18 @@
## -*-Agw-LithSnd-*-----------------------------------------------------------|
##
## Distributed under the CC0 public domain license.
## By Alison G. Watson. Attribution is encouraged, though not required.
## See licenses/cc0.txt for more information.
##
## ---------------------------------------------------------------------------|

weapons {
magnum {
== lsounds/WeaponsW/Magnum
fire1 Fire # Marathon 2
fire2 Fire2 # //
$random fire { fire1, fire2, }
}
}

# EOF

Loading…
Cancel
Save