From 186229c42136359e71569b0cfea5444a511000af Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Thu, 15 Sep 2022 01:59:10 +0200 Subject: [PATCH] Special Devastation Sigil behavior for Mortal Rifle damage. --- language.version | 4 ++-- zscript/items/swwm_powerups.zsc | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/language.version b/language.version index 2882be1f0..5ca88c31f 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r458 \cu(Thu 15 Sep 01:28:07 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r458 \cu(2022-09-15 01:28:07)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r459 \cu(Thu 15 Sep 01:59:10 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r459 \cu(2022-09-15 01:59:10)\c-"; diff --git a/zscript/items/swwm_powerups.zsc b/zscript/items/swwm_powerups.zsc index d1d61a36e..23a15dbe2 100644 --- a/zscript/items/swwm_powerups.zsc +++ b/zscript/items/swwm_powerups.zsc @@ -3303,9 +3303,18 @@ Class AngeryPower : Powerup override void ModifyDamage( int damage, Name damageType, out int newdamage, bool passive, Actor inflictor, Actor source, int flags ) { if ( passive || (damage <= 0) ) return; - // (2^31-1)/25 : guarantee that it caps rather than overflowing - if ( damage > 85899345 ) newdamage = int.max; - else newdamage = damage*25; + if ( damageType == 'Mortal' ) // can only be in 4s + { + // max cap is the closest combination of 4s smaller than (2^31-1) + if ( damage > 44444444 ) newdamage = 444444444; + else newdamage = damage*10+4; + } + else + { + // (2^31-1)/25 : guarantee that it caps rather than overflowing + if ( damage > 85899345 ) newdamage = int.max; + else newdamage = damage*25; + } // don't play hit fx for wall busting, as it'll be done manually if the bust goes through if ( damageType != 'Wallbust' ) DoHitFX(); }