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).
This commit is contained in:
Mari the Deer 2023-10-16 13:58:36 +02:00
commit f78b747ff7
7 changed files with 71 additions and 31 deletions

View file

@ -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";

View file

@ -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-";

View file

@ -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"
{

View file

@ -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<numpt; i++ )
{
double a = FRandom[ExtraMissiles](0,360);
@ -46,12 +45,11 @@ extend Class SWWMHandler
}
}
if ( !e.Thing.bISMONSTER || (e.Thing is 'PlayerPawn') ) return;
e.Thing.GiveInventory("GOTTAGOFAST",1);
// avoid if it has some sort of special handling
if ( e.Thing.special || e.Thing.tid || e.Thing.bDORMANT ) return;
// random chance to spawn doubles
if ( e.Thing.FindInventory("DontDuplicate") || Random[ExtraMissiles](0,2) ) return;
int numpt = Random[ExtraMissiles](1,2);
int numpt = Random[ExtraMissiles](1,dmult);
for ( int i=0; i<numpt; i++ )
{
// three attempts for each

View file

@ -232,7 +232,12 @@ Class LampMoth : Actor
Loop;
See.Entranced: // follow the lamp
XZW1 B 0 A_JumpIf(!isEntranced(),"Spawn");
XZW1 BC 1 A_FollowLamp();
XZW1 BC 1
{
A_FollowLamp();
// allow moths to still target enemies while following the lamp, but only if they get really close
A_LookEx(LOF_NOSOUNDCHECK|LOF_NOJUMP,maxseedist:150);
}
Loop;
Melee:
XZW1 B 0 A_Scrape();

View file

@ -782,6 +782,9 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
Font mFont;
int mColor;
int mColorSelected;
bool kyni;
double alph;
bool isSel;
void Init( ListMenuDescriptor desc, String text, String hotkey, Name child, int param = 0 )
{
@ -791,6 +794,9 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
mColor = desc.mFontColor;
mColorSelected = desc.mFontcolor2;
mHotkey = hotkey.GetNextCodePoint(0);
kyni = (text == "$SWWM_SKDRAGON");
if ( kyni ) alph = 0.;
else alph = 1.;
}
void InitDirect( double x, double y, int height, int hotkey, String text, Font font, int color, int color2, Name child, int param = 0 )
@ -801,6 +807,17 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
mColor = color;
mColorSelected = color2;
mHotkey = hotkey;
kyni = (text == "$SWWM_SKDRAGON");
if ( kyni ) alph = 0.;
else alph = 1.;
}
override void Ticker()
{
Super.Ticker();
if ( !kyni ) return;
if ( isSel ) alph = min(1.,alph+.05);
else alph = 0.;
}
override int GetWidth()
@ -813,6 +830,8 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
override void Draw( bool selected, ListMenuDescriptor desc )
{
isSel = selected;
if ( kyni && !isSel ) return;
int w = desc?desc.DisplayWidth():ListMenuDescriptor.CleanScale;
int h = desc?desc.DisplayHeight():-1;
String text = StringTable.Localize(mText);
@ -841,7 +860,7 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
int ch;
[ch, pos] = text.GetNextCodePoint(pos);
double yy = y+4*sin(32*i+8*(Menu.MenuTime()+System.GetTimeFrac()))*CleanYFac_1;
Screen.DrawChar(font,mColorSelected,xx,yy,ch,DTA_ScaleX,CleanXFac_1*scl,DTA_ScaleY,CleanYFac_1*scl);
Screen.DrawChar(font,kyni?Font.CR_BLACK:mColorSelected,xx,yy,ch,DTA_ScaleX,CleanXFac_1*scl,DTA_ScaleY,CleanYFac_1*scl,DTA_Alpha,alph);
xx += (font.GetCharWidth(ch)+kern)*CleanXFac_1*scl;
}
}
@ -852,7 +871,7 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
int ch;
[ch, pos] = text.GetNextCodePoint(pos);
double yy = y+4*sin(32*i+8*(Menu.MenuTime()+System.GetTimeFrac()));
Screen.DrawChar(mFont,mColorSelected,xx,yy,ch,DTA_VirtualWidth,w,DTA_VirtualHeight,h,DTA_FullscreenScale,FSMode_ScaleToFit43,DTA_ScaleX,scl,DTA_ScaleY,scl);
Screen.DrawChar(mFont,kyni?Font.CR_BLACK:mColorSelected,xx,yy,ch,DTA_VirtualWidth,w,DTA_VirtualHeight,h,DTA_FullscreenScale,FSMode_ScaleToFit43,DTA_ScaleX,scl,DTA_ScaleY,scl,DTA_Alpha,alph);
xx += (font.GetCharWidth(ch)+kern)*scl;
}
}

View file

@ -312,7 +312,7 @@ extend Class Demolitionist
else if ( (player.cmd.buttons&BT_ATTACK) && (deadtimer > 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;