From af1df2e18d2995bd4c53537be4ab08fe676edfd0 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Tue, 19 May 2020 14:29:07 +0200 Subject: [PATCH] Allow selling excess weapons/powerups. Change of plans for one DLC weapon choice. Various small fixes and tweaks. Doubled price of Ynykron, since it was too cheap. Fixed Candygun spares not being picked up in coop. Add option to toggle menu fuzz, for streamers concerned about bitrate. Add MAP07 enemies to the vanilla boss enhancer. --- FuturePlans.md | 4 +-- PriceTable.md | 4 +-- TODO.md | 2 +- cvarinfo.txt | 1 + language.def_base | 4 ++- language.def_menu | 4 ++- language.es_base | 2 ++ language.es_menu | 4 ++- language.version | 2 +- menudef.txt | 1 + zscript/dlc/swwm_dlcammo.zsc | 8 +++-- zscript/dlc/swwm_sparkety.zsc | 6 ++++ zscript/dlc/swwm_splattim.zsc | 6 ---- zscript/dlc/swwm_supermarioworld.zsc | 2 +- zscript/swwm_common.zsc | 53 ++++++++++++++++++++++------ zscript/swwm_deathlydeathcannon.zsc | 2 +- zscript/swwm_hud.zsc | 4 +-- zscript/swwm_inventory.zsc | 29 +++++++++++++++ zscript/swwm_menu.zsc | 6 ++-- zscript/swwm_powerup.zsc | 11 +++++- zscript/swwm_shot.zsc | 10 +++--- zscript/swwm_splode.zsc | 20 +++++++++++ zscript/swwm_tastytreat.zsc | 36 +++++++++++++++++++ zscript/swwm_vanillaboss.zsc | 20 ++++++++--- 24 files changed, 197 insertions(+), 44 deletions(-) create mode 100644 zscript/dlc/swwm_sparkety.zsc delete mode 100644 zscript/dlc/swwm_splattim.zsc diff --git a/FuturePlans.md b/FuturePlans.md index fdf683d5c..02f25ff93 100644 --- a/FuturePlans.md +++ b/FuturePlans.md @@ -4,10 +4,10 @@ after the first release. * DLC Weapon Set: - Itamex Reinforced Hammer (UnSX 5) - Gravity Gun (Ultra Suite) - - Splatter (SWWM) + - Puntzer Gamma (Ultra Suite 2) - Skull Launcher (Weirdweapons) - Blackfire Igniter (UnSX 5, Ultra Suite 3) - - Puntzer Gamma (Ultra Suite 2) + - Sparkster x3 (UnSX 2) - Rail Carbine ("Tesla Beamer" in Ultra Suite 2 & 3) - PROWEL & TADEL (Ultra Suite 2 & 3) - Super Happy Fun Ball (SWWM Z) diff --git a/PriceTable.md b/PriceTable.md index a2ddd04b0..2761d22d3 100644 --- a/PriceTable.md +++ b/PriceTable.md @@ -38,7 +38,7 @@ respective weapon. Candygun | 1000000 Candy Mag | 100000 Spare Gun | 600000 - Ynykron | 2500000 + Ynykron | 5000000 Crystal Unit | 1000000 #### DLC weapons and ammo (when available) @@ -62,7 +62,7 @@ These will be available long after the first release. EMP Core | 60000 PROWEL&TADEL | 1600000 Insane Core | 150000 - S.H. Fun Ball | 2000000 + S.H. Fun Ball | 4000000 Fun Stuff | 800000 #### Other items diff --git a/TODO.md b/TODO.md index d6c68bc90..f0a249f37 100644 --- a/TODO.md +++ b/TODO.md @@ -18,7 +18,7 @@ Extra things: - A background with a bit more flair than just the fuzz shader. - Some sort of flyby featuring the Demolitionist booting up, closeups of weapons/items etc. - - Dual wielding Explodium Gun? + - Dual wielding Explodium Gun - Randomized vanilla monster retagging with multiple options - Japanese localization - Keen replacement (need ideas) diff --git a/cvarinfo.txt b/cvarinfo.txt index fccfbcf40..02ca558e8 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -51,3 +51,4 @@ user int swwm_barscale = 0; // target healthbar scaling (0 = use GZDoom scalin user int swwm_scrscale = 0; // score scaling (0 = use GZDoom scaling) user int swwm_numscale = 0; // damnum scaling (0 = use GZDoom scaling) server bool swwm_blood = false; // custom blood/gibbing +user bool swwm_fuzz = true; // allows toggling the fuzz shader on the demolitionist menus, useful if you're streaming/recording since it destroys the encoding quality diff --git a/language.def_base b/language.def_base index cfe973ac9..d6fe9c5de 100644 --- a/language.def_base +++ b/language.def_base @@ -5,6 +5,7 @@ I_PUSHER = "\"Pusher\" Microfusion Rotary Hammer"; T_DEEPIMPACT = "Deep Impact"; I_DEEPIMPACT = "\"Deep Impact\" Airblaster"; T_EXPLODIUM = "Explodium Gun"; +T_EXPLODIUM2 = "Explodium Guns"; T_SPREADGUN = "Spreadgun"; I_SPREADGUN = "\"Rhino Stopper\" Spreadgun"; T_WALLBUSTER = "Wallbuster"; @@ -656,6 +657,7 @@ D_FROGGY2 = "\cj... for \cdFroggy Chair\cj.\c-"; BT_BRUISERS = "Super Bruiser Bros"; BT_CYBIE = "Shoot It Until It Dies"; BT_SPIDER = "Big Brains Idiot"; +BT_DIMPLE = "Lard Lads and Spidey Squad"; BT_IOS = "Goaty McGoatface"; BT_LICHES = "The Jolly Lad Squad"; BT_MINOTAUR = "AWAKEN MY MASTERS"; @@ -672,7 +674,6 @@ SWWM_OVERKILL = "Overkill"; SWWM_MULTIKILL = "Multi Kill"; SWWM_SPREEKILL = "Untouchable"; SWWM_BOSSKILL = "Boss Kill"; -SWWM_MAX = "MAX"; SWWM_EXIT = "Exit: "; SWWM_NEXIT = "Exit"; SWWM_SEXIT = "Secret Exit"; @@ -685,6 +686,7 @@ SWWM_LASTSECRET = "\cf%s\cf found the last secret. +%d\c-"; SWWM_LASTITEM = "\cf%s\cf got the last item. +%d\c-"; SWWM_LASTMONSTER = "\cf%s\cf killed the last monster. +%d\c-"; SWWM_NEWLORE = "New entries have been added to the Library."; +SWWM_SELLEXTRA = "\cf%s\cf sold an extra %s\cf. +%d\c-"; // intermission tips SWWM_NINTERTIP = "30"; SWWM_INTERTIP = "Tip #%d:"; diff --git a/language.def_menu b/language.def_menu index 455a9be3b..baa712c35 100644 --- a/language.def_menu +++ b/language.def_menu @@ -94,6 +94,7 @@ SWWM_NUMSCALE = "Number Scaling"; SWWM_SCRSCALE = "Score Scaling"; SWWM_GZSCALE = "Use GZDoom Setting"; SWWM_BLOOD = "Enable Custom Blood"; +SWWM_FUZZ = "Enable Animated Menu BG"; TOOLTIP_SWWM_VOICETYPE = "Sets the voice pack for the player."; TOOLTIP_SWWM_MUTEVOICE = "Control what gets muted, if you'd rather have a more silent protagonist."; TOOLTIP_SWWM_FLASHSTRENGTH = "Screen flashes usually happen when firing some weapons, you can lower this if these effects are harmful for you."; @@ -135,7 +136,8 @@ TOOLTIP_SWWM_HUDSCALE = "Scaling factor of the HUD. Set to 0 to use GZDoom's own TOOLTIP_SWWM_BARSCALE = "Scaling factor for targetter healthbars. Set to 0 to use GZDoom's own HUD scaling."; TOOLTIP_SWWM_NUMSCALE = "Scaling factor for damage/healing numbers. Set to 0 to use GZDoom's own HUD scaling."; TOOLTIP_SWWM_SCRSCALE = "Scaling factor for score numbers. Set to 0 to use GZDoom's own HUD scaling."; -TOOLTIP_SWWM_BLOOD = "Please note that these effects are kinda cheap. I'd honestly recommend Nashgore instead, it's better."; +TOOLTIP_SWWM_BLOOD = "Please note that these effects are kinda cheap and performance heavy. I'd honestly recommend Nashgore instead, it's better."; +TOOLTIP_SWWM_FUZZ = "Toggling this off is recommended if you're recording/streaming as this effect can harm video quality."; // knowledge base SWWM_COMINGSOON = "(coming soon)"; SWWM_MISSTAB = "Mission"; diff --git a/language.es_base b/language.es_base index 9245374a6..523ee3086 100644 --- a/language.es_base +++ b/language.es_base @@ -3,6 +3,7 @@ I_PUSHER = "Taladro Percutor de Microfusión \"Pusher\""; I_DEEPIMPACT = "Pistola de Aire \"Deep Impact\""; T_EXPLODIUM = "Pistola de Explodium"; +T_EXPLODIUM2 = "Pistolas de Explodium"; T_SPREADGUN = "Trabuco"; I_SPREADGUN = "Trabuco \"Rhino Stopper\""; I_WALLBUSTER = "Escopeta Pesada Perforadora \"Wallbuster\""; @@ -644,6 +645,7 @@ D_FROGGY2 = "\cj... por una \cdSilla Rana\cj.\c-"; // boss tags BT_CYBIE = "Dispara Hasta Que Muera"; BT_SPIDER = "Cerebrito Idiota"; +BT_DIMPLE = "Gordos Grasientos y Armada Arácnida"; BT_IOS = "Cabra Emparedada"; BT_LICHES = "El Escuadrón Risitas"; BT_DSPARIL = "El Brujo Rojo Ese y Lagarto"; diff --git a/language.es_menu b/language.es_menu index 7fe5b3457..9bb53cb68 100644 --- a/language.es_menu +++ b/language.es_menu @@ -91,6 +91,7 @@ SWWM_NUMSCALE = "Escala de Números"; SWWM_SCRSCALE = "Escala de Puntuaciones"; SWWM_GZSCALE = "Usar Opción de GZDoom"; SWWM_BLOOD = "Habilitar Sangre Personalizada"; +SWWM_FUZZ = "Habilitar Fondo Animado de Menú"; TOOLTIP_SWWM_VOICETYPE = "Selecciona el pack de voz para el jugador."; TOOLTIP_SWWM_MUTEVOICE = "Controla lo que se mutea, si prefieres tener un protagonista más silencioso."; TOOLTIP_SWWM_FLASHSTRENGTH = "Los destellos en pantalla suelen ocurrir al disparar algunas armas, puedes reducirlo si este tipo de effectos te causan malestar."; @@ -132,7 +133,8 @@ TOOLTIP_SWWM_HUDSCALE = "Factor de escalado del HUD. Pon a 0 para usar el escala TOOLTIP_SWWM_BARSCALE = "Factor de escalado para las barras de salud. Pon a 0 para usar el escalado de HUD de GZDoom."; TOOLTIP_SWWM_NUMSCALE = "Factor de escalado para los números de daño/salud. Pon a 0 para usar el escalado de HUD de GZDoom."; TOOLTIP_SWWM_SCRSCALE = "Factor de escalado para los números de puntuación. Pon a 0 para usar el escalado de HUD de GZDoom."; -TOOLTIP_SWWM_BLOOD = "Ten en cuenta que estos efectos son un poco cutres. Sinceramente, recomendaría usar Nashgore, es mejor."; +TOOLTIP_SWWM_BLOOD = "Ten en cuenta que estos efectos son un poco cutres y bajan los frames. Sinceramente, recomendaría usar Nashgore, es mejor."; +TOOLTIP_SWWM_FUZZ = "Desactivar ésto es recomendado si estás grabando o haciendo streaming, ya que este effecto puede dañar la calidad del vídeo."; // knowledge base SWWM_COMINGSOON = "(próximamente)"; SWWM_MISSTAB = "Misión"; diff --git a/language.version b/language.version index c7c166555..bfeb9279b 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\cxSWWM GZ\c- r246 (Sun 17 May 20:50:55 CEST 2020)"; +SWWM_MODVER="\cxSWWM GZ\c- r248 (Tue 19 May 14:30:35 CEST 2020)"; diff --git a/menudef.txt b/menudef.txt index 0e8a7469e..3f160734a 100644 --- a/menudef.txt +++ b/menudef.txt @@ -56,6 +56,7 @@ OptionMenu "SWWMOptionMenu" ScaleSlider "$SWWM_SCRSCALE", "swwm_scrscale", 0, 8, 1, "$SWWM_GZSCALE" Option "$SWWM_SHADERS", "swwm_shaders", "YesNo" Option "$SWWM_INTERTYPE", "swwm_intertype", "SWWMInterType" + Option "$SWWM_FUZZ", "swwm_fuzz", "YesNo" StaticText " " StaticText "$SWWM_BTITLE", "Gold" Option "$SWWM_EXTRAALERT", "swwm_extraalert", "YesNo" diff --git a/zscript/dlc/swwm_dlcammo.zsc b/zscript/dlc/swwm_dlcammo.zsc index 64f260b1d..c97b133bb 100644 --- a/zscript/dlc/swwm_dlcammo.zsc +++ b/zscript/dlc/swwm_dlcammo.zsc @@ -4,7 +4,7 @@ Class GravityCell : Ammo { } -Class SplatCore : Ammo +Class SMW05Ammo : Ammo { } @@ -20,7 +20,11 @@ Class DarkCanister : Ammo { } -Class SMW05Ammo : Ammo +Class KinylumUnit : Ammo +{ +} + +Class NokronUnit : Ammo { } diff --git a/zscript/dlc/swwm_sparkety.zsc b/zscript/dlc/swwm_sparkety.zsc new file mode 100644 index 000000000..9c2a27b3f --- /dev/null +++ b/zscript/dlc/swwm_sparkety.zsc @@ -0,0 +1,6 @@ +// Tach-Engine Technologies Series x3 Sparkster Carbine (UnSX 2) +// Slot 7, spawns shared with Legacy Sparkster + +Class ModernSparkster : SWWMWeapon +{ +} diff --git a/zscript/dlc/swwm_splattim.zsc b/zscript/dlc/swwm_splattim.zsc deleted file mode 100644 index 21e035116..000000000 --- a/zscript/dlc/swwm_splattim.zsc +++ /dev/null @@ -1,6 +0,0 @@ -// Dr. Locke's Instant Room Painter aka "Splatter" (from SWWM Series) -// Slot 4, spawns shared with Wallbuster - -Class Splatter : SWWMWeapon -{ -} diff --git a/zscript/dlc/swwm_supermarioworld.zsc b/zscript/dlc/swwm_supermarioworld.zsc index 100f20200..daf87be1d 100644 --- a/zscript/dlc/swwm_supermarioworld.zsc +++ b/zscript/dlc/swwm_supermarioworld.zsc @@ -1,5 +1,5 @@ // Blackmann Arms "Puntzer Gamma" SMW.05 Assault Carbine (was planned for SWWM Z) -// Slot 7, spawns shared with Legacy Sparkster +// Slot 4, spawns shared with Wallbuster Class PuntzerGamma : SWWMWeapon { diff --git a/zscript/swwm_common.zsc b/zscript/swwm_common.zsc index 9c1abd524..ed137de8d 100644 --- a/zscript/swwm_common.zsc +++ b/zscript/swwm_common.zsc @@ -209,6 +209,11 @@ Class SWWMUtility a.roll = -fpitch*ddiff1; a.angle = dang; } + + static clearscope int Round100( double x ) + { + return int(ceil(x/100.)*100.); + } } // Stats @@ -805,7 +810,7 @@ Class SWWMCombatTracker : Thinker t = new("SWWMCombatTracker"); t.ChangeStatNum(STAT_USER); t.mytarget = target; - if ( target.player || target.bISMONSTER ) + if ( target.player || target.bISMONSTER || (target is 'BossBrain') ) t.mytag = target.player?target.player.GetUserName():target.GetTag(); else t.mytag = ""; if ( target.player ) @@ -897,6 +902,11 @@ Class SWWMCombatTracker : Thinker // any visible enemies within 600mu if ( (mytarget.Vec3To(players[consoleplayer].mo).length() < 600) && players[consoleplayer].mo.CheckSight(mytarget) ) updated = level.maptime; } + else if ( mytarget is 'BossBrain' ) + { + // teh romero, only if visible + if ( (mytarget.Vec3To(players[consoleplayer].mo).length() < 600) && players[consoleplayer].mo.CheckSight(mytarget) ) updated = level.maptime; + } lasthealth = newhealth; intp.Update(lasthealth); } @@ -2328,11 +2338,14 @@ Class SWWMHandler : EventHandler } if ( spawnme ) SWWMScoreObj.Spawn(-e.Damage,e.Thing.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+e.Thing.Height/2),Font.CR_RED,e.Thing); // update combat tracker for it - for ( SWWMCombatTracker t=trackers; t; t=t.next ) + if ( !(e.Thing is 'BossBrain') ) { - if ( t.mytarget != e.Thing ) continue; - t.updated = level.maptime+35; - break; + for ( SWWMCombatTracker t=trackers; t; t=t.next ) + { + if ( t.mytarget != e.Thing ) continue; + t.updated = level.maptime+35; + break; + } } } if ( e.Thing.player ) @@ -2415,7 +2428,7 @@ Class SWWMHandler : EventHandler { scr.xscore[ofs] = 0; scr.xtcolor[ofs] = Font.CR_FIRE; - scr.xstr[ofs] = "$SWWM_OVERKILL"; + scr.xstr[ofs] = StringTable.Localize("$SWWM_OVERKILL"); scr.xcnt = ++ofs; } } @@ -2426,7 +2439,7 @@ Class SWWMHandler : EventHandler { scr.xscore[ofs] = (multilevel[pnum]>=16)?int.max:(multilevel[pnum]+1); scr.xtcolor[ofs] = Font.CR_FIRE; - scr.xstr[ofs] = "$SWWM_MULTIKILL"; + scr.xstr[ofs] = StringTable.Localize("$SWWM_MULTIKILL"); scr.xcnt = ++ofs; } } @@ -2440,7 +2453,7 @@ Class SWWMHandler : EventHandler { scr.xscore[ofs] = spreecount[pnum]+1; scr.xtcolor[ofs] = Font.CR_FIRE; - scr.xstr[ofs] = "$SWWM_SPREEKILL"; + scr.xstr[ofs] = StringTable.Localize("$SWWM_SPREEKILL"); scr.xcnt = ++ofs; } } @@ -2451,7 +2464,7 @@ Class SWWMHandler : EventHandler { scr.xscore[ofs] = 0; scr.xtcolor[ofs] = Font.CR_FIRE; - scr.xstr[ofs] = "$SWWM_BOSSKILL"; + scr.xstr[ofs] = StringTable.Localize("$SWWM_BOSSKILL"); scr.xcnt = ++ofs; } } @@ -2502,14 +2515,34 @@ Class SWWMHandler : EventHandler if ( hnd ) hnd.DoKeyTagFix(a); } + // spreads apart overlapping inventory items, since they'll look bad otherwise + private void CheckSpreadOut( Actor a ) + { + let bt = BlockThingsIterator.Create(a,16); + while ( bt.Next() ) + { + let t = bt.Thing; + if ( !t || (t == a) || !(t is 'Inventory') || !(t.spawnpoint ~== a.spawnpoint) ) continue; + double ang = FRandom[Spreading](0,360); + a.vel += (cos(ang)*4,sin(ang)*4,3); + break; + } + } + override void WorldThingSpawned( WorldEvent e ) { + if ( e.Thing is 'Inventory' ) + CheckSpreadOut(e.Thing); if ( e.Thing is 'Key' ) { DoKeyTagFix(e.Thing); SWWMInterest.Spawn(thekey:Key(e.Thing)); } - else if ( e.Thing is 'BossBrain' ) e.Thing.SetTag("$FN_BOSSBRAIN"); + else if ( e.Thing is 'BossBrain' ) + { + e.Thing.SetTag("$FN_BOSSBRAIN"); + e.Thing.A_SetSize(20,70); + } else if ( e.Thing is 'CommanderKeen' ) e.Thing.SetTag("$FN_KEEN"); if ( (e.Thing.bSHOOTABLE || e.Thing.bISMONSTER) && !(e.Thing is 'LampMoth') && !(e.Thing is 'CompanionLamp') ) SWWMCombatTracker.Spawn(e.Thing); } diff --git a/zscript/swwm_deathlydeathcannon.zsc b/zscript/swwm_deathlydeathcannon.zsc index 3ec407704..b25a9ceef 100644 --- a/zscript/swwm_deathlydeathcannon.zsc +++ b/zscript/swwm_deathlydeathcannon.zsc @@ -30,7 +30,7 @@ Class Ynykron : SWWMWeapon Obituary "$O_YNYKRON"; Weapon.SlotNumber 0; Weapon.SelectionOrder 1000; - Stamina 2500000; + Stamina 5000000; Weapon.AmmoType1 "YnykronAmmo"; Weapon.AmmoGive1 1; +SWWMWEAPON.NOFIRSTGIVE; diff --git a/zscript/swwm_hud.zsc b/zscript/swwm_hud.zsc index b773e9817..e5f27289c 100644 --- a/zscript/swwm_hud.zsc +++ b/zscript/swwm_hud.zsc @@ -635,8 +635,8 @@ Class SWWMStatusBar : BaseStatusBar fnt = LangFont(mMiniwiFont); for ( int i=0; i 0 ) tag.AppendFormat(" x%d",snum.xscore[i]); Screen.DrawText(fnt,snum.xtcolor[i],(vpos.x-hss.x*(fo.x+fnt.StringWidth(tag)/2.))/hss.x,(vpos.y-hss.y*(fo.y+(fnt.GetHeight()/2.)))/hss.y,tag,DTA_VirtualWidthF,sss.x,DTA_VirtualHeightF,sss.y,DTA_KeepRatio,true,DTA_Alpha,alph); fo.y += fnt.GetHeight(); diff --git a/zscript/swwm_inventory.zsc b/zscript/swwm_inventory.zsc index 02bcd9a4b..238715435 100644 --- a/zscript/swwm_inventory.zsc +++ b/zscript/swwm_inventory.zsc @@ -5,6 +5,15 @@ Mixin Class SWWMAutoUseFix { if ( GetClass() == item.GetClass() ) { + // sell excess if there's a price + if ( bALWAYSPICKUP && (Amount+item.Amount > MaxAmount) && (Stamina > 0) ) + { + int sellprice = SWWMUtility.Round100(Stamina*.7); + SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2),Font.CR_GOLD); + SWWMCredits.Give(Owner.player,sellprice); + if ( Owner.player ) + Console.Printf(StringTable.Localize("$SWWM_SELLEXTRA"),Owner.player.GetUserName(),GetTag(),sellprice); + } if ( Use(true) ) Amount--; } return Super.HandlePickup(item); @@ -906,6 +915,26 @@ Class SWWMWeapon : Weapon abstract FlagDef NoFirstGive : SWeaponFlags, 0; // don't give ammo on first pickup (for weapons with a clip count) + override bool HandlePickup( Inventory item ) + { + if ( (GetClass() == item.GetClass()) ) + { + if ( Weapon(item).PickupForAmmo(self) ) + item.bPickupGood = true; + if ( (Amount+item.Amount > MaxAmount) && (Stamina > 0) ) + { + // sell excess + int sellprice = SWWMUtility.Round100(Stamina*.7); + SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2),Font.CR_GOLD); + SWWMCredits.Give(Owner.player,sellprice); + if ( Owner.player ) + Console.Printf(StringTable.Localize("$SWWM_SELLEXTRA"),Owner.player.GetUserName(),GetTag(),sellprice); + item.bPickupGood = true; + } + return true; + } + return Super.HandlePickup(item); + } override void AttachToOwner( Actor other ) { Inventory.AttachToOwner(other); diff --git a/zscript/swwm_menu.zsc b/zscript/swwm_menu.zsc index 3b3f87d5f..94e634be3 100644 --- a/zscript/swwm_menu.zsc +++ b/zscript/swwm_menu.zsc @@ -17,7 +17,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu TextureID MainWindow, TabSeparator, WindowSeparator, WindowSeparatorH, FancyBg, EasterEgg, LoreSeparator, LoreSeparatorW; - transient CVar lang; + transient CVar lang, fuzz; transient Font TewiFont, MPlusFont; int curtab, oldtab; // for scrolling @@ -1833,7 +1833,9 @@ Class SWWMKnowledgeBaseMenu : GenericMenu double hs = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/400.)),1.); Vector2 ss = (Screen.GetWidth(),Screen.GetHeight())/hs; Vector2 origin = (ss.x-640,ss.y-400)/2.; - Screen.DrawTexture(FancyBg,false,origin.x,origin.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,.5); + if ( !fuzz ) fuzz = CVar.GetCvar('swwm_fuzz',players[consoleplayer]); + if ( fuzz.GetBool() ) + Screen.DrawTexture(FancyBg,false,origin.x,origin.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,.5); Screen.DrawTexture(MainWindow,false,origin.x,origin.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); // draw tabs double xx = 3, yy = 0; diff --git a/zscript/swwm_powerup.zsc b/zscript/swwm_powerup.zsc index 16ec34cb2..76a3fcd61 100644 --- a/zscript/swwm_powerup.zsc +++ b/zscript/swwm_powerup.zsc @@ -1450,7 +1450,16 @@ Class SWWMLamp : Inventory // add charge if ( item.GetClass() == GetClass() ) { - if ( Charge > 0 ) + if ( (Charge >= Default.Charge) && (Amount+item.Amount > MaxAmount) ) + { + // sell excess + int sellprice = SWWMUtility.Round100(Stamina*.7); + SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2),Font.CR_GOLD); + SWWMCredits.Give(Owner.player,sellprice); + if ( Owner.player ) + Console.Printf(StringTable.Localize("$SWWM_SELLEXTRA"),Owner.player.GetUserName(),GetTag(),sellprice); + } + else if ( Charge > 0 ) { int AddCharge = Charge+SWWMLamp(item).Charge; Charge = min(Default.Charge,AddCharge); diff --git a/zscript/swwm_shot.zsc b/zscript/swwm_shot.zsc index 64e0b74ba..ea11f1c3f 100644 --- a/zscript/swwm_shot.zsc +++ b/zscript/swwm_shot.zsc @@ -1564,8 +1564,8 @@ Class GoldenImpact : Actor { Super.PostBeginPlay(); A_AlertMonsters(40000); - SWWMHandler.DoBlast(self,200,120000); - A_Explode(7777,200); + SWWMHandler.DoBlast(self,600,1200000); + A_Explode(7777,600); A_QuakeEx(9,9,9,40,0,5000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:500,rollintensity:1.5); A_StartSound("spreadgun/goldexpl",CHAN_VOICE,attenuation:.3); A_StartSound("spreadgun/goldexpl",CHAN_WEAPON,attenuation:.15); @@ -1691,8 +1691,8 @@ Class GoldenSubImpact : Actor override void PostBeginPlay() { Super.PostBeginPlay(); - SWWMHandler.DoBlast(self,200,90000); - A_Explode(777,200); + SWWMHandler.DoBlast(self,400,900000); + A_Explode(777,400); A_QuakeEx(7,7,7,20,0,2000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:200,rollintensity:.8); A_SprayDecal("BigScorch",-172); Scale *= FRandom[ExploS](0.8,1.1); @@ -1816,7 +1816,7 @@ Class GoldenSubSubImpact : Actor override void PostBeginPlay() { Super.PostBeginPlay(); - SWWMHandler.DoBlast(self,200,60000); + SWWMHandler.DoBlast(self,200,600000); A_Explode(77,200); A_QuakeEx(4,4,4,15,0,1000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:100,rollintensity:.4); A_SprayDecal("Scorch",-172); diff --git a/zscript/swwm_splode.zsc b/zscript/swwm_splode.zsc index 8a1214623..4e03d6866 100644 --- a/zscript/swwm_splode.zsc +++ b/zscript/swwm_splode.zsc @@ -427,6 +427,8 @@ Class ExplodiumGun : SWWMWeapon Weapon.UpSound "explodium/select"; Weapon.SlotNumber 2; Weapon.SelectionOrder 2600; + //Inventory.MaxAmount 2; + //Weapon.SisterWeapon "DualExplodiumGun"; Stamina 8000; ExplodiumGun.ClipCount 7; } @@ -568,3 +570,21 @@ Class ExplodiumGun : SWWMWeapon Stop; } } + +// TODO Dual Explodium Guns (eventually) +/* +Class DualExplodiumGun : ExplodiumGun +{ + override bool CheckAmmo( int firemode, bool autoswitch, bool requireammo, int ammocount ) + { + if ( (firemode == PrimaryFire) || (firemode == AltFire) ) + return (SisterWeapon&&(SisterWeapon.Amount > 1)); + return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount); + } + + Default + { + Tag "$T_EXPLODIUM2"; + Weapon.SisterWeapon "ExplodiumGun"; + } +}*/ diff --git a/zscript/swwm_tastytreat.zsc b/zscript/swwm_tastytreat.zsc index 6909361f8..fbe5a282f 100644 --- a/zscript/swwm_tastytreat.zsc +++ b/zscript/swwm_tastytreat.zsc @@ -838,6 +838,42 @@ Class CandyGun : SWWMWeapon Property ClipCount : ClipCount; + // re-edit to allow picking up spares in coop + override bool HandlePickup( Inventory item ) + { + if ( item.GetClass() == GetClass() ) + { + bool ammoget, spareget; + [ammoget, spareget] = CandyGun(item).PickupForAmmoAndSpares(self); + if ( ammoget ) + { + item.bPickupGood = true; + if ( !spareget ) + { + // sell excess + int sellprice = SWWMUtility.Round100(Stamina*.7); + SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2),Font.CR_GOLD); + SWWMCredits.Give(Owner.player,sellprice); + if ( Owner.player ) + Console.Printf(StringTable.Localize("$SWWM_SELLEXTRA"),Owner.player.GetUserName(),GetTag(),sellprice); + } + return true; + } + } + return Super.HandlePickup(item); + } + protected bool, bool PickupForAmmoAndSpares( Weapon ownedWeapon ) + { + bool gotstuff = false, gotspares = false; + int oldamount = ownedWeapon.Ammo1.Amount; + gotstuff = AddExistingAmmo(ownedWeapon.Ammo1,AmmoGive1); + gotspares = AddExistingAmmo(ownedWeapon.Ammo2,AmmoGive2); + let Owner = ownedWeapon.Owner; + if ( gotstuff && Owner && Owner.player && (oldamount == 0) ) + PlayerPawn(Owner).CheckWeaponSwitch(ownedWeapon.Ammo1.GetClass()); + return gotstuff, gotspares; + } + override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) { if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/CandygunDisplay.png",TexMan.Type_Any); diff --git a/zscript/swwm_vanillaboss.zsc b/zscript/swwm_vanillaboss.zsc index 040eac691..f5e67f063 100644 --- a/zscript/swwm_vanillaboss.zsc +++ b/zscript/swwm_vanillaboss.zsc @@ -57,6 +57,16 @@ Class SWWMVanillaBossHandler : EventHandler } bosstag = "$BT_SPIDER"; } + else if ( level.mapname ~== "MAP07" ) + { + if ( (e.Thing is 'Fatso') || (e.Thing is 'Arachnotron') ) + { + bossactors.Push(e.Thing); + if ( upgrademe ) + e.Thing.Health *= 2; + } + bosstag = "$BT_DIMPLE"; + } else if ( level.mapname ~== "MAP30" ) { if ( e.Thing is 'BossBrain' ) @@ -116,19 +126,19 @@ Class SWWMVanillaBossHandler : EventHandler if ( e.Thing is 'ClericBoss' ) { bossactors.Push(e.Thing); - if ( upgrademe ) e.Thing.Health *= 3; + if ( upgrademe ) e.Thing.Health *= 2; bosstag = "$BT_CLERIC"; } else if ( e.Thing is 'FighterBoss' ) { bossactors.Push(e.Thing); - if ( upgrademe ) e.Thing.Health *= 3; + if ( upgrademe ) e.Thing.Health *= 2; bosstag = "$BT_FIGHTER"; } else if ( e.Thing is 'MageBoss' ) { bossactors.Push(e.Thing); - if ( upgrademe ) e.Thing.Health *= 3; + if ( upgrademe ) e.Thing.Health *= 2; bosstag = "$BT_MAGE"; } else if ( e.Thing is 'Dragon' ) @@ -175,7 +185,7 @@ Class SWWMVanillaBossHandler : EventHandler for ( int i=0; i