From f78b747ff7eb99144fa0bd2de6232ed541d5ac90 Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Mon, 16 Oct 2023 13:58:36 +0200 Subject: [PATCH] Add secret difficulty for a dragon. Remove 2x speed mult from hardest skill(s) (causes glitches). Allow moths to still attack while following the lamp. (Still do not know what causes moths to print "asin domain error" to terminal). --- language.def_menu | 4 ++- language.version | 4 +-- zmapinfo.txt | 32 +++++++++++++++++------ zscript/handler/swwm_handler_iwantdie.zsc | 30 ++++++++++----------- zscript/items/swwm_lamp.zsc | 7 ++++- zscript/menu/swwm_menus.zsc | 23 ++++++++++++++-- zscript/player/swwm_player_think.zsc | 2 +- 7 files changed, 71 insertions(+), 31 deletions(-) diff --git a/language.def_menu b/language.def_menu index 016ea8a75..0687dbefd 100644 --- a/language.def_menu +++ b/language.def_menu @@ -26,7 +26,9 @@ SWWM_SKHARDCONFIRM = "\ciNot your usual Ultra-Violence.\nThings will be slightly SWWM_SKHARDCORE = "\cgPain Sandwich\c-"; SWWM_SKHARDCORECONFIRM = "\cgThis is the Nightmare equivalent.\nPrepare to get your ass kicked.\c-\n\n\cf1.5x monster damage\n50% extra aggressiveness\nCheats are disabled\nCoop monsters will spawn\nThe store is disabled\nCan only revive once\c-\n\n(Press Y for a challenge)"; SWWM_SKLUNATIC = "\crDemo Must Die\c-"; -SWWM_SKLUNATICCONFIRM = "\crAre you sure you want that?\nYou're gonna have a REAL bad time.\c-\n\n\cfAll changes from \cgPain Sandwich\cf\n+\n2x speedup for all enemy actions\nEnemy projectiles will multiply\nAdditional enemies may spawn\nEnemies react instantly\nEnemies don't flinch\nInfighting is disabled\c-\n\n(Press Y to die instantly)"; +SWWM_SKLUNATICCONFIRM = "\crAre you sure you want that?\nYou're gonna have a REAL bad time.\c-\n\n\cfAll changes from \cgPain Sandwich\cf\n+\n2x monster damage\nFast monsters\nEnemy projectiles will multiply\nAdditional enemies may spawn\nEnemies react instantly\nEnemies don't flinch\nInfighting is disabled\c-\n\n(Press Y for an ass kicking)"; +SWWM_SKDRAGON = "\cmΚυνικός Δράκων\c-"; +SWWM_SKDRAGONCONFIRM = "\cmThis skill level\nwas made for him.\c-\n\n(Press Y for certain death)"; // mod menu SWWM_MTITLE = "DEMOLITIONIST Options"; SWWM_PTITLE = "Player Options"; diff --git a/language.version b/language.version index 9944efd28..eae9c92f6 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r984 \cu(Sun 15 Oct 11:03:23 CEST 2023)\c-"; -SWWM_SHORTVER="\cw1.3pre r984 \cu(2023-10-15 11:03:23)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r986 \cu(Mon 16 Oct 14:00:46 CEST 2023)\c-"; +SWWM_SHORTVER="\cw1.3pre r986 \cu(2023-10-16 14:00:46)\c-"; diff --git a/zmapinfo.txt b/zmapinfo.txt index ca596747c..b7a835cf9 100644 --- a/zmapinfo.txt +++ b/zmapinfo.txt @@ -144,13 +144,13 @@ ClearSkills Skill easy { DamageFactor = 0.75 - SpawnFilter = easy + SpawnFilter = 2 ACSReturn = 1 Name = "$SWWM_SKEASY" } Skill normal { - SpawnFilter = normal + SpawnFilter = 3 ACSReturn = 2 Name = "$SWWM_SKNORMAL" DefaultSkill @@ -159,7 +159,7 @@ Skill hard { DamageFactor = 1.25 Aggressiveness = 0.25 - SpawnFilter = hard + SpawnFilter = 4 ACSReturn = 3 Name = "$SWWM_SKHARD" MustConfirm = "$SWWM_SKHARDCONFIRM" @@ -169,7 +169,7 @@ Skill hardcore DisableCheats DamageFactor = 1.5 Aggressiveness = 0.5 - SpawnFilter = nightmare + SpawnFilter = 5 SpawnMulti ACSReturn = 4 Name = "$SWWM_SKHARDCORE" @@ -178,17 +178,33 @@ Skill hardcore Skill lunatic { DisableCheats - DamageFactor = 1.5 - Aggressiveness = .5 - SpawnFilter = nightmare + DamageFactor = 2.0 + Aggressiveness = 0.5 + SpawnFilter = 5 SpawnMulti + FastMonsters NoInfighting InstantReaction NoPain - ACSReturn = 4 + ACSReturn = 5 Name = "$SWWM_SKLUNATIC" MustConfirm = "$SWWM_SKLUNATICCONFIRM" } +Skill kynikoss +{ + DisableCheats + DamageFactor = 2.0 + Aggressiveness = 1.0 + SpawnFilter = 5 + SpawnMulti + FastMonsters + NoInfighting + InstantReaction + NoPain + ACSReturn = 6 + Name = "$SWWM_SKDRAGON" + MustConfirm = "$SWWM_SKDRAGONCONFIRM" +} Map TITLEMAP "Title Map" { diff --git a/zscript/handler/swwm_handler_iwantdie.zsc b/zscript/handler/swwm_handler_iwantdie.zsc index 51fae4a45..2c46d55ee 100644 --- a/zscript/handler/swwm_handler_iwantdie.zsc +++ b/zscript/handler/swwm_handler_iwantdie.zsc @@ -3,31 +3,30 @@ // tokens Class DontDuplicate : Inventory {} Class DontDuplicate2 : Inventory {} -Class GOTTAGOFAST : Inventory -{ - override void DoEffect() - { - Super.DoEffect(); - if ( !Owner || (Owner.Health <= 0) ) return; - if ( (Owner.tics > 1) && (Owner.tics > max(1,Owner.CurState.tics/2)) ) - Owner.tics = max(1,Owner.CurState.tics/2); - } -} extend Class SWWMHandler { + double smult; + int dmult; + private void IWantDieSpawn( WorldEvent e ) { - if ( iwantdie == -1 ) iwantdie = (G_SkillName() == StringTable.Localize("$SWWM_SKLUNATIC")); + if ( iwantdie == -1 ) + { + int acsre = G_SkillPropertyInt(SKILLP_ACSReturn); + iwantdie = (acsre >= 5); + smult = 2.-(acsre-5)*.5; // reduced in Kynikoss skill because it'd stack with FastMonsters + dmult = acsre-3; + } if ( iwantdie <= 0 ) return; if ( SWWMUtility.ValidProjectile(e.Thing) && !e.Thing.FindInventory("DontDuplicate") && (e.Thing.target && e.Thing.target.bISMONSTER && !e.Thing.target.player) ) { - e.Thing.speed *= 2; - e.Thing.vel *= 2; + e.Thing.speed *= smult; + e.Thing.vel *= smult; double ang = e.Thing.target.target?e.Thing.AngleTo(e.Thing.target.target):e.Thing.angle; double pt = e.Thing.target.target?e.Thing.PitchTo(e.Thing.target.target,e.Thing.target.missileheight,e.Thing.target.target.Height/2.):e.Thing.pitch; let [x, y, z] = SWWMUtility.GetAxes(ang,pt,e.Thing.roll); - int numpt = Random[ExtraMissiles](1,2); + int numpt = Random[ExtraMissiles](1,dmult); for ( int i=0; i 120) && (!hnd || !hnd.gdat.disablerevive) && swwm_revive ) { // reboot (if possible) - if ( !FindInventory("ReviveCooldown") && (((swwm_revivecooldown >= 0) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4)) || !hasrevived) ) + if ( !FindInventory("ReviveCooldown") && (((swwm_revivecooldown >= 0) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4)) || !hasrevived) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 6) ) { if ( hasrevived ) SWWMUtility.MarkAchievement("sekiro",player); hasrevived = true;