Reduce frequency of combat comments.

This commit is contained in:
Mari the Deer 2022-02-19 23:51:04 +01:00
commit 33b338899e
5 changed files with 7 additions and 8 deletions

View file

@ -8,7 +8,7 @@ nosave int swwm_maxpickup = 5; // total pickup messages visible
nosave int swwm_mutevoice = 0; // mute demolitionist voice
// 0 - none
// 1 - combat comments
// 2 - item/secret comments
// 2 - interaction comments
// 3 - map start comment
// 4 - pain/death and grunts
nosave int swwm_voiceamp = 2; // additional voice line amplification, up to 4x

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2pre r168 \cu(Sat 19 Feb 16:08:32 CET 2022)\c-";
SWWM_SHORTVER="\cw1.2pre r168 \cu(2022-02-19 16:08:32)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2pre r169 \cu(Sat 19 Feb 23:51:04 CET 2022)\c-";
SWWM_SHORTVER="\cw1.2pre r169 \cu(2022-02-19 23:51:04)\c-";

View file

@ -141,7 +141,7 @@ extend Class SWWMHandler
{
if ( e.Thing.IsFriend(e.DamageSource) )
lastcombat = AddOneliner("friendhit",1,10);
else if ( (!lastcombat || (gametic > lastcombat+80)) && !Random[DemoLines](0,(e.DamageSource.bBOSS||e.DamageSource.FindInventory("BossMarker"))?1:3) && !SWWMHDoomHandler.IsCuteGirl(e.DamageSource) ) // [HDoom] don't shout at the girls
else if ( (!lastcombat || (gametic > lastcombat+180)) && !Random[DemoLines](0,(e.DamageSource.bBOSS||e.DamageSource.FindInventory("BossMarker"))?1:4) && !SWWMHDoomHandler.IsCuteGirl(e.DamageSource) ) // [HDoom] don't shout at the girls
lastcombat = AddOneliner("gethit",1,15);
}
highesttic = gametic;
@ -180,7 +180,7 @@ extend Class SWWMHandler
{
if ( e.Thing.IsFriend(src) )
lastcombat = AddOneliner("friendkill",1,5);
else if ( (!lastcombat || (gametic > lastcombat+80)) && !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory("BossMarker"))?0:2) && !SWWMHDoomHandler.IsCuteGirl(e.Thing) ) // [HDoom] don't shout at the girls
else if ( (!lastcombat || (gametic > lastcombat+120)) && !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory("BossMarker"))?1:4) && !SWWMHDoomHandler.IsCuteGirl(e.Thing) ) // [HDoom] don't shout at the girls
lastcombat = AddOneliner("scorekill",1,15);
}
}

View file

@ -19,7 +19,6 @@ extend Class SWWMHandler
int lastorder;
bool lastloop;
transient ThinkerIterator cti;
Actor tauntedboss;
private void LangRefresh()
{
@ -132,7 +131,7 @@ extend Class SWWMHandler
}
}
// be smart, demo-chan, don't shout if you're invisible, or you'll make it worse
if ( enteredcombat && ((bossfound && (!lastcombat || (gametic > lastcombat+120))) || (!bossfound && (!highesttic || (gametic > highesttic+700)))) && !players[consoleplayer].mo.FindInventory("GhostPower") )
if ( enteredcombat && ((bossfound && (!lastcombat || (gametic > lastcombat+240))) || (!bossfound && (!highesttic || (gametic > highesttic+700)))) && !players[consoleplayer].mo.FindInventory("GhostPower") )
lastcombat = AddOneliner("fightstart",1,10);
}

View file

@ -889,7 +889,7 @@ Class Demolitionist : PlayerPawn
if ( (gametic == lastuse) && IsActorPlayingSound(CHAN_VOICE,"*usefail") )
{
failcounter++;
if ( (failcounter > 8) && !Random[DemoLines](0,max(0,12-failcounter/3)) && (gametic > failcooldown) )
if ( (failcounter > 8) && !Random[DemoLines](0,max(0,12-failcounter/3)) && (gametic > failcooldown) && (swwm_mutevoice < 2) )
{
failcooldown = SWWMHandler.AddOneliner("usefail",2,20);
failcounter = max(4,failcounter-10);