From 191a9a5bb9db83c0f0da6897d698e5594a5b2c47 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Fri, 28 Feb 2020 00:18:19 +0100 Subject: [PATCH] Can't remember what I just changed, oh well. --- ExtendedLore.md | 5 +++-- FuturePlans.md | 7 +++---- README.md | 3 --- zscript/swwm_ammo.zsc | 14 +++++++++----- zscript/swwm_common.zsc | 19 ++++++++++++++++++- zscript/swwm_player.zsc | 5 +++-- zscript/swwm_shot.zsc | 2 +- zscript/swwm_title.zsc | 17 ++++++++++++----- 8 files changed, 49 insertions(+), 23 deletions(-) diff --git a/ExtendedLore.md b/ExtendedLore.md index 56853c58e..966eab77a 100644 --- a/ExtendedLore.md +++ b/ExtendedLore.md @@ -443,8 +443,9 @@ SWWM GZ effectively blends together the Doom and Unreal universes. - ????: A Sidhe thief infiltrates the mansion of one of D'Sparil's old associates, stealing the Heart of D'Sparil and putting an end to the plans for resurrecting him. The mansion is sold off, most of its valuables, - including the corporeal remains of the serpent rider, being passed around, - until being eventually acquired by the "Cult of the Viridescent Lord". + including the corporeal remains of the serpent rider, passed around among + several parties, until being eventually acquired by the "Cult of the + Viridescent Lord". - ????: The three heroes who defeated Korax are called into the Winter Nexus, they gather the four elemental gems and defeat the "Viridescent Lord". A diff --git a/FuturePlans.md b/FuturePlans.md index ebfa2a4cc..e94fc4df0 100644 --- a/FuturePlans.md +++ b/FuturePlans.md @@ -15,11 +15,10 @@ after the first release. - Per-monster kill tracker in stats tab - Music player with a selection of Saya's favourite tracks - Pong minigame +* Actually make a fancy titlemap +* Mod trailer * Additional HUD stuff - Minimap with radar like in SWWM Z * Character and item images for the library * Full Mashiro model for Lämp easter egg -* Option to hear other players' voice lines -* Localization - - Spanish - - Japanese??? +* Japanese Localization??? diff --git a/README.md b/README.md index c7bea2d2a..b29027458 100644 --- a/README.md +++ b/README.md @@ -158,9 +158,6 @@ on replaced item, may also come in bundles: rare drop from boss monsters, and as a rare spawn for chaos/banishment devices in Heretic and Hexen. -The two first standard types will also pop up in Hammerspace Embiggeners and -Ammo Fabricators. - ### Wallbuster (slot 4), replaces SSG, Ethereal Crossbow, Frost Shards A ludicrously overkill weapon, courtesy of the always-overkill Blackmann Arms. diff --git a/zscript/swwm_ammo.zsc b/zscript/swwm_ammo.zsc index 43dcb9069..c429c0280 100644 --- a/zscript/swwm_ammo.zsc +++ b/zscript/swwm_ammo.zsc @@ -767,10 +767,11 @@ Class YnykronAmmo : Ammo Class AmmoFabricator : Inventory abstract { - int budget, pertype; + int budget, pertype, maxunitprice; Property Budget : budget; Property PerType : pertype; + Property MaxUnitPrice : maxunitprice; override Inventory CreateCopy( Actor other ) { @@ -786,10 +787,10 @@ Class AmmoFabricator : Inventory abstract for ( int i=0; i)(AllActorClasses[i]); - // only direct descendants of ammo with a set price below our budget + // only direct descendants of ammo with a set price below our max unit price if ( !a || (a.GetParentClass() != 'Ammo') ) continue; let def = GetDefaultByType(a); - if ( !(def.Stamina) || (def.Stamina > budget) ) continue; + if ( !(def.Stamina) || (def.Stamina > maxunitprice) ) continue; available.Push(a); } // start from lowest to highest needed until we fill the inventory or run out of budget @@ -873,8 +874,9 @@ Class FabricatorTier1 : AmmoFabricator Inventory.Icon "graphics/HUD/Icons/I_Fabricator1.png"; Inventory.PickupMessage "$T_FABRICATOR1"; Inventory.MaxAmount 30; - AmmoFabricator.Budget 2000; + AmmoFabricator.Budget 5000; AmmoFabricator.PerType 2; + AmmoFabricator.MaxUnitPrice 2500; Stamina 3000; } } @@ -888,6 +890,7 @@ Class FabricatorTier2 : AmmoFabricator Inventory.MaxAmount 20; AmmoFabricator.Budget 15000; AmmoFabricator.PerType 4; + AmmoFabricator.MaxUnitPrice 10000; Stamina 12000; } } @@ -899,8 +902,9 @@ Class FabricatorTier3 : AmmoFabricator Inventory.Icon "graphics/HUD/Icons/I_Fabricator3.png"; Inventory.PickupMessage "$T_FABRICATOR3"; Inventory.MaxAmount 10; - AmmoFabricator.Budget 100000; + AmmoFabricator.Budget 120000; AmmoFabricator.PerType 8; + AmmoFabricator.MaxUnitPrice 80000; Stamina 150000; } } diff --git a/zscript/swwm_common.zsc b/zscript/swwm_common.zsc index 94a1312e1..118bd5073 100644 --- a/zscript/swwm_common.zsc +++ b/zscript/swwm_common.zsc @@ -1876,7 +1876,24 @@ Class SWWMHandler : EventHandler } else if ( e.Replacee is 'CWeaponPiece2' ) e.Replacement = 'CandyGun'; else if ( e.Replacee is 'MWeaponPiece1' ) e.Replacement = 'Ynykron'; - else if ( (e.Replacee == 'Clip') || (e.Replacee == 'GoldWandAmmo') || (e.Replacee == 'GoldWandHefty') || (e.Replacee is 'ArtiPoisonBag') ) + else if ( e.Replacee is 'ArtiPoisonBag' ) + { + switch( Random[Replacement](0,6) ) + { + case 0: + case 1: + case 2: + e.Replacement = redpool[!Random[Replacement](0,2)]; + break; + case 3: + case 4: + e.Replacement = greenpool[!Random[Replacement](0,2)]; + break; + default: + e.Replacement = 'SWWMNothing'; + } + } + else if ( (e.Replacee == 'Clip') || (e.Replacee == 'GoldWandAmmo') || (e.Replacee == 'GoldWandHefty') ) { switch( Random[Replacement](0,6) ) { diff --git a/zscript/swwm_player.zsc b/zscript/swwm_player.zsc index 7b47214e3..6a31ed0e0 100644 --- a/zscript/swwm_player.zsc +++ b/zscript/swwm_player.zsc @@ -247,6 +247,7 @@ Class Demolitionist : PlayerPawn Super.PostBeginPlay(); mystats = SWWMStats.Find(player); oldpos = pos; + lastground = true; } void A_Dash() { @@ -549,14 +550,14 @@ Class Demolitionist : PlayerPawn guideangle *= .9; guidepitch *= .9; guideroll *= .9; - if ( player.onground ) lastgroundtic = gametic; // anchor to ground when going down steps if ( !player.onground && !bFly && !bFlyCheat && (waterlevel < 2) && (abs(pos.z-floorz) <= maxdropoffheight) && (player.jumptics == 0) && (vel.z < 0) ) { ssup = max(0,(pos.z-floorz)); SetOrigin(Vec2OffsetZ(0,0,floorz),true); - player.onground = true; + lastground = player.onground = true; } + if ( player.onground ) lastgroundtic = gametic; if ( !(player.cheats & CF_PREDICTING) && !(player.cmd.forwardmove|player.cmd.sidemove) ) PlayIdle(); Vector3 dodge = (0,0,0), x, y, z; diff --git a/zscript/swwm_shot.zsc b/zscript/swwm_shot.zsc index 137204af5..35929138b 100644 --- a/zscript/swwm_shot.zsc +++ b/zscript/swwm_shot.zsc @@ -1289,7 +1289,7 @@ Class Spreadgun : SWWMWeapon next = ridx; break; } - if ( rev && (invoker.nextammo == types[next]) ) + if ( rev && ((invoker.nextammo == types[next]) || (CountInv(invoker.nextammo) <= 0)) ) { A_SwitchAmmoType(false); // recheck forward return; diff --git a/zscript/swwm_title.zsc b/zscript/swwm_title.zsc index 0e8f4c303..833689045 100644 --- a/zscript/swwm_title.zsc +++ b/zscript/swwm_title.zsc @@ -2,7 +2,7 @@ Class SWWMTitleStuff : EventHandler { - transient ui TextureID tex[2]; + transient ui TextureID tex[3]; transient ui Font TewiFont; override void WorldTick() @@ -15,12 +15,19 @@ Class SWWMTitleStuff : EventHandler if ( gamestate != GS_TITLELEVEL ) return; if ( !tex[0] ) tex[0] = TexMan.CheckForTexture("graphics/UnSXLogo.png",TexMan.Type_Any); if ( !tex[1] ) tex[1] = TexMan.CheckForTexture("graphics/SWWMGZLogo.png",TexMan.Type_Any); + if ( !tex[2] ) tex[2] = TexMan.CheckForTexture("graphics/tempbg.png",TexMan.Type_Any); if ( !TewiFont ) TewiFont = Font.GetFont('TewiShadedInverse'); - Screen.Dim("Black",clamp(1.-((level.maptime+e.FracTic)/Thinker.TICRATE)*.1,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); double ar = Screen.GetAspectRatio(); - Vector2 tsize = TexMan.GetScaledSize(tex[0]); + Vector2 tsize = TexMan.GetScaledSize(tex[2]); double sar = tsize.x/tsize.y; Vector2 vsize; + if ( sar < ar ) vsize = (tsize.x,tsize.x/ar); + else if ( sar > ar ) vsize = (tsize.y*ar,tsize.y); + else vsize = tsize; + Screen.DrawTexture(tex[2],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0)); + Screen.Dim("Black",clamp(1.-((level.maptime+e.FracTic)/Thinker.TICRATE)*.05,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); + tsize = TexMan.GetScaledSize(tex[0]); + sar = tsize.x/tsize.y; if ( sar > ar ) vsize = (tsize.x,tsize.x/ar); else if ( sar < ar ) vsize = (tsize.y*ar,tsize.y); else vsize = tsize; @@ -30,11 +37,11 @@ Class SWWMTitleStuff : EventHandler String str = "presents"; alf = clamp(((level.maptime+e.FracTic)/Thinker.TICRATE)-10,0.,1.); alf *= 1.-clamp(((level.maptime+e.FracTic)/Thinker.TICRATE)-16,0.,1.); - Screen.DrawText(TewiFont,Font.CR_WHITE,(160-TewiFont.StringWidth(str))/2,(100-TewiFont.GetHeight())/2,str,DTA_VirtualWidth,160,DTA_VirtualHeight,100,DTA_Alpha,alf); + Screen.DrawText(TewiFont,Font.CR_WHITE,(320-TewiFont.StringWidth(str))/2,(200-TewiFont.GetHeight())/2,str,DTA_VirtualWidth,320,DTA_VirtualHeight,200,DTA_Alpha,alf); str = "a mod by \cxMarisa Kirisame"; alf = clamp(((level.maptime+e.FracTic)/Thinker.TICRATE)-18,0.,1.); alf *= 1.-clamp(((level.maptime+e.FracTic)/Thinker.TICRATE)-24,0.,1.); - Screen.DrawText(TewiFont,Font.CR_WHITE,(160-TewiFont.StringWidth(str))/2,(100-TewiFont.GetHeight())/2,str,DTA_VirtualWidth,160,DTA_VirtualHeight,100,DTA_Alpha,alf); + Screen.DrawText(TewiFont,Font.CR_WHITE,(320-TewiFont.StringWidth(str))/2,(200-TewiFont.GetHeight())/2,str,DTA_VirtualWidth,320,DTA_VirtualHeight,200,DTA_Alpha,alf); tsize = TexMan.GetScaledSize(tex[1]); sar = tsize.x/tsize.y; if ( sar > ar ) vsize = (tsize.x,tsize.x/ar);