Merge commit '1f2fe7396b68d82da356b93fca10cc5736d3159c' into merrp-merge

Conflicts:
	include/follower_helper.h
	src/follower_helper.c
This commit is contained in:
Hedara 2025-06-25 17:20:38 +02:00
commit 3ce34c41b6
4 changed files with 23 additions and 2 deletions

View File

@ -1397,6 +1397,7 @@
#define FLAG_SYS_USE_FLASH (SYSTEM_FLAGS + 0x28)
#define FLAG_SYS_USE_STRENGTH (SYSTEM_FLAGS + 0x29)
// Sets abnormal weather on maps that check for it
#define FLAG_SYS_WEATHER_CTRL (SYSTEM_FLAGS + 0x2A)
#define FLAG_SYS_CYCLING_ROAD (SYSTEM_FLAGS + 0x2B)
#define FLAG_SYS_SAFARI_MODE (SYSTEM_FLAGS + 0x2C)

View File

@ -70,7 +70,8 @@ enum MessageCondition
#define MATCH_U16(type, value1, value2) {type, {.split = {.hw = value1, .b = value2}}}
#define MATCH_U8(type, v1, v2, v3) {type, {.bytes = {v1, v2, v3}}}
#define MATCH_SPECIES(species) MATCH_U24(MSG_COND_SPECIES, species)
#define MATCH_SPECIES(species) MATCH_U16(MSG_COND_SPECIES, species, 0)
#define MATCH_NOT_SPECIES(species) MATCH_U16(MSG_COND_SPECIES, species, 1)
#define MATCH_TYPES(type1, type2) MATCH_U8(MSG_COND_TYPE, type1, type2, 0)
// Checks that follower has *neither* of the two types
#define MATCH_NOT_TYPES(type1, type2) MATCH_U8(MSG_COND_TYPE, type1, type2, TYPE_NONE | 1)
@ -118,6 +119,7 @@ enum ConditionalMessage
COND_MSG_BURN,
COND_MSG_DAY,
COND_MSG_NIGHT,
COND_MSG_ABNORMAL_WEATHER,
COND_MSG_COUNT,
};

View File

@ -2335,7 +2335,12 @@ bool32 CheckMsgCondition(const struct MsgCondition *cond, struct Pokemon *mon, u
switch (cond->type)
{
case MSG_COND_SPECIES:
return (cond->data.raw == species);
multi = cond->data.split.hw;
// if byte nonzero, invert; check != species!
if (cond->data.split.b)
return (cond->data.split.hw != species);
else
return (cond->data.split.hw == species);
case MSG_COND_TYPE:
multi = (SpeciesHasType(species, cond->data.bytes[0]) ||
SpeciesHasType(species, cond->data.bytes[1]));

View File

@ -74,6 +74,7 @@ static const u8* const sDayTexts[] = {sCondMsg43, sCondMsg44, NULL};
static const u8 sCondMsg45[] = _("Your POKéMON is staring spellbound\nat the night sky!");
static const u8 sCondMsg46[] = _("Your POKéMON is happily gazing at\nthe beautiful, starry sky!");
static const u8* const sNightTexts[] = {sCondMsg45, sCondMsg46, NULL};
static const u8 sCondMsg50[] = _("{STR_VAR_1} is disturbed by the\nabnormal weather!");
// See the struct definition in follower_helper.h for more info
const struct FollowerMsgInfoExtended gFollowerConditionalMessages[COND_MSG_COUNT] =
@ -378,6 +379,18 @@ const struct FollowerMsgInfoExtended gFollowerConditionalMessages[COND_MSG_COUNT
MATCH_TIME_OF_DAY(TIME_NIGHT),
},
},
[COND_MSG_ABNORMAL_WEATHER] =
{
.text = sCondMsg50,
.emotion = FOLLOWER_EMOTION_SURPRISE,
.conditions =
{
MATCH_MUSIC(MUS_ABNORMAL_WEATHER),
MATCH_NOT_SPECIES(SPECIES_KYOGRE),
MATCH_NOT_SPECIES(SPECIES_GROUDON),
MATCH_NOT_SPECIES(SPECIES_RAYQUAZA),
}
},
};
// Pool of "unconditional" follower messages