From 9ea1ce62108cd43de7bac7f2af9003fcde343b9d Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Tue, 26 Apr 2022 18:52:56 +0200 Subject: [PATCH] Melee tweaks. --- language.def_lore | 2 +- language.es_lore | 2 +- language.version | 4 +- lore/default/itamexhammer.txt | 2 +- lore/es/itamexhammer.txt | 2 +- zscript/weapons/swwm_baseweapon_melee.zsc | 162 +++++++++++++------- zscript/weapons/swwm_deathlydeathcannon.zsc | 2 +- zscript/weapons/swwm_thiccboolet.zsc | 4 +- 8 files changed, 118 insertions(+), 62 deletions(-) diff --git a/language.def_lore b/language.def_lore index d77fe08f5..68e1d2915 100644 --- a/language.def_lore +++ b/language.def_lore @@ -1738,7 +1738,7 @@ SWWM_LORETXT_ITAMEXHAMMER = "\n" "\cfPrimary Fire:\c- Rapid swings, from side to side. Good for quickly plowing through enemy hordes.\n" "\n" -"\cfSecondary Fire:\c- Hold to ready up a vertical swing, release to let the hammer drop on whatever poor fool is standing in front of you. The longer you hold, the stronger the hit.\n" +"\cfSecondary Fire:\c- Hold to ready up a vertical swing, release to let the hammer drop on whatever poor fool is standing in front of you. The longer you hold, the stronger the hit. This attack can potentially break down doors, among other things.\n" "\n" "\cfTertiary Fire:\c- Hold to ready up a wide horizontal swing, release to perform a potent spin attack, smashing away everything around you. Consecutive presses of tertiary fire while spinning will keep the motion going for longer. Being a combat robot, you should be free from any motion sickness that a human would typically develop while performing this action.\n" "\n" diff --git a/language.es_lore b/language.es_lore index bf0997980..9133601d8 100644 --- a/language.es_lore +++ b/language.es_lore @@ -1611,7 +1611,7 @@ SWWM_LORETXT_ITAMEXHAMMER = "\n" "\cfFuego Primario:\c- Golpes rápidos, de lado a lado. Bueno para cargar a través de hordas enemigas.\n" "\n" -"\cfFuego Secundario:\c- Mantén para preparar un golpe vertical, suelta para dejar caer el martillo sobre cualquier pobre insensato que se te ponga delante. Cuanto más lo mantengas, más fuerte será el golpe.\n" +"\cfFuego Secundario:\c- Mantén para preparar un golpe vertical, suelta para dejar caer el martillo sobre cualquier pobre insensato que se te ponga delante. Cuanto más lo mantengas, más fuerte será el golpe. Este ataque puede potencialmente echar abajo puertas, entre otras cosas.\n" "\n" "\cfFuego Terciario\c- Mantén para preparar un largo golpe vertical, suelta para ejecutar un potente ataque giratorio, destrozando todo a tu alrededor. Las pulsaciones consecutivas del fuego terciario mientras giras harán que se mantenga el movimiento durante más tiempo. Siendo un robot de combate, deberías estar libre de cualquier mareo por el movimiento que un humano típicamente desarrollaría haciendo algo así.\n" "\n" diff --git a/language.version b/language.version index cce3375f7..176451576 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.2.14 \cu(Wed 27 Apr 17:22:20 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.2.14 \cu(2022-04-27 17:22:20)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.2.14 \cu(Sun 1 May 20:24:25 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.2.14 \cu(2022-05-01 20:24:25)\c-"; diff --git a/lore/default/itamexhammer.txt b/lore/default/itamexhammer.txt index 3fbe43e4b..525904e0b 100644 --- a/lore/default/itamexhammer.txt +++ b/lore/default/itamexhammer.txt @@ -18,7 +18,7 @@ The Reinforced Combat Hammer is primarily meant to be used in quickly dismantlin \cfPrimary Fire:\c- Rapid swings, from side to side. Good for quickly plowing through enemy hordes. -\cfSecondary Fire:\c- Hold to ready up a vertical swing, release to let the hammer drop on whatever poor fool is standing in front of you. The longer you hold, the stronger the hit. +\cfSecondary Fire:\c- Hold to ready up a vertical swing, release to let the hammer drop on whatever poor fool is standing in front of you. The longer you hold, the stronger the hit. This attack can potentially break down doors, among other things. \cfTertiary Fire:\c- Hold to ready up a wide horizontal swing, release to perform a potent spin attack, smashing away everything around you. Consecutive presses of tertiary fire while spinning will keep the motion going for longer. Being a combat robot, you should be free from any motion sickness that a human would typically develop while performing this action. diff --git a/lore/es/itamexhammer.txt b/lore/es/itamexhammer.txt index 6a0d95def..e4ad5e6fb 100644 --- a/lore/es/itamexhammer.txt +++ b/lore/es/itamexhammer.txt @@ -14,7 +14,7 @@ El Martillo de Combate Reforzado es principalmente usado para desmantelar rápid \cfFuego Primario:\c- Golpes rápidos, de lado a lado. Bueno para cargar a través de hordas enemigas. -\cfFuego Secundario:\c- Mantén para preparar un golpe vertical, suelta para dejar caer el martillo sobre cualquier pobre insensato que se te ponga delante. Cuanto más lo mantengas, más fuerte será el golpe. +\cfFuego Secundario:\c- Mantén para preparar un golpe vertical, suelta para dejar caer el martillo sobre cualquier pobre insensato que se te ponga delante. Cuanto más lo mantengas, más fuerte será el golpe. Este ataque puede potencialmente echar abajo puertas, entre otras cosas. \cfFuego Terciario\c- Mantén para preparar un largo golpe vertical, suelta para ejecutar un potente ataque giratorio, destrozando todo a tu alrededor. Las pulsaciones consecutivas del fuego terciario mientras giras harán que se mantenga el movimiento durante más tiempo. Siendo un robot de combate, deberías estar libre de cualquier mareo por el movimiento que un humano típicamente desarrollaría haciendo algo así. diff --git a/zscript/weapons/swwm_baseweapon_melee.zsc b/zscript/weapons/swwm_baseweapon_melee.zsc index bbd6b8212..655f72fcf 100644 --- a/zscript/weapons/swwm_baseweapon_melee.zsc +++ b/zscript/weapons/swwm_baseweapon_melee.zsc @@ -303,10 +303,75 @@ Class MHitList Vector3 dir, pos; } +Class MeleeTracer : LineTracer +{ + Actor ignoreme; + Array hits; + Vector3 x; // used to get closest hit to center + bool dorip; + + override ETraceStatus TraceCallback() + { + if ( Results.HitType == TRACE_HitActor ) + { + if ( !Results.HitActor.bSHOOTABLE + || (Results.HitActor == ignoreme) + || Results.HitActor.FindInventory("ParriedBuff") ) return TRACE_Skip; + bool addme = true; + for ( int k=0; k hits; - hits.Clear(); - FLineTraceData d; + if ( !invoker.mt ) invoker.mt = new("MeleeTracer"); + let mt = invoker.mt; // for convenience + mt.ignoreme = self; + mt.hits.Clear(); + mt.dorip = !!(flags&MELEE_Rip); int rings = 1; double step = spread/20.; double range = 1.5*DEFMELEERANGE*rangemul; bool raging = CountInv("RagekitPower"); + double widemul = (flags&MELEE_ExtraWide)?(flags&MELEE_Wider)?5:3:(flags&MELEE_Wider)?2.5:1.5; for ( double i=0; i