From a7940684f63a405672aa231c60a67498098a251d Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 18 Oct 2023 01:18:34 +0100 Subject: [PATCH] UCRP_WHIPHYUU Insta-Whip another racer while you yourself are invisible from Hyuudoro, it's shrimple Also updates the phrasing used for UCRP_TRIPWIREHYUU to match ("afflicted by Hyudoro") --- src/d_player.h | 1 + src/deh_soc.c | 1 + src/k_collide.cpp | 8 ++++++++ src/m_cond.c | 6 +++++- src/m_cond.h | 1 + 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/d_player.h b/src/d_player.h index ad9adf9b7..afe193528 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -414,6 +414,7 @@ struct roundconditions_t // Basically the same, but it's a specific event where no is an easy default boolean tripwire_hyuu; + boolean whip_hyuu; boolean spb_neuter; boolean landmine_dunk; boolean hit_midair; diff --git a/src/deh_soc.c b/src/deh_soc.c index 468f1d6c0..4f47e1480 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -2993,6 +2993,7 @@ static void readcondition(UINT16 set, UINT32 id, char *word2) re = 0; } else if ((offset=0) || fastcmp(params[0], "TRIPWIREHYUU") + || (++offset && fastcmp(params[0], "WHIPHYUU")) || (++offset && fastcmp(params[0], "SPBNEUTER")) || (++offset && fastcmp(params[0], "LANDMINEDUNK")) || (++offset && fastcmp(params[0], "HITMIDAIR")) diff --git a/src/k_collide.cpp b/src/k_collide.cpp index 5afd75d18..503481bb3 100644 --- a/src/k_collide.cpp +++ b/src/k_collide.cpp @@ -910,6 +910,14 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim) K_AddHitLag(victim, victimHitlag, true); K_AddHitLag(attacker, attackerHitlag, false); shield->hitlag = attacker->hitlag; + + if (attackerPlayer->roundconditions.whip_hyuu == false + && attackerPlayer->hyudorotimer > 0) + { + attackerPlayer->roundconditions.whip_hyuu = true; + attackerPlayer->roundconditions.checkthisframe = true; + } + return true; } return false; diff --git a/src/m_cond.c b/src/m_cond.c index 87f97d298..a0ac581be 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -1634,6 +1634,8 @@ boolean M_CheckCondition(condition_t *cn, player_t *player) case UCRP_TRIPWIREHYUU: return (player->roundconditions.tripwire_hyuu); + case UCRP_WHIPHYUU: + return (player->roundconditions.whip_hyuu); case UCRP_SPBNEUTER: return (player->roundconditions.spb_neuter); case UCRP_LANDMINEDUNK: @@ -2417,7 +2419,9 @@ static const char *M_GetConditionString(condition_t *cn) return (cn->requirement == 1) ? "FAULT during POSITION" : "don't FAULT during POSITION"; case UCRP_TRIPWIREHYUU: - return "go through Tripwire after getting snared by Hyudoro"; + return "go through Tripwire while afflicted by Hyudoro"; + case UCRP_WHIPHYUU: + return "Insta-Whip a racer while afflicted by Hyudoro"; case UCRP_SPBNEUTER: return "shock a Self-Propelled Bomb into submission"; case UCRP_LANDMINEDUNK: diff --git a/src/m_cond.h b/src/m_cond.h index 6f23f7953..d78ea4791 100644 --- a/src/m_cond.h +++ b/src/m_cond.h @@ -125,6 +125,7 @@ typedef enum UCRP_FAULTED, // FAULT UCRP_TRIPWIREHYUU, // Go through tripwire with Hyudoro + UCRP_WHIPHYUU, // Use Insta-Whip with Hyudoro UCRP_SPBNEUTER, // Kill an SPB with Lightning UCRP_LANDMINEDUNK, // huh? you died? that's weird. all i did was try to hug you... UCRP_HITMIDAIR, // Hit another player mid-air with a kartfielditem