mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 05:13:39 -07:00
Split fairy registration per type
This commit is contained in:
parent
b29da0f642
commit
38428f45b1
1 changed files with 8 additions and 4 deletions
|
@ -92,6 +92,10 @@ void RegisterShuffleFairies() {
|
||||||
bool shouldRegister =
|
bool shouldRegister =
|
||||||
IS_RANDO && (RAND_GET_OPTION(RSK_SHUFFLE_FOUNTAIN_FAIRIES) || RAND_GET_OPTION(RSK_SHUFFLE_STONE_FAIRIES) ||
|
IS_RANDO && (RAND_GET_OPTION(RSK_SHUFFLE_FOUNTAIN_FAIRIES) || RAND_GET_OPTION(RSK_SHUFFLE_STONE_FAIRIES) ||
|
||||||
RAND_GET_OPTION(RSK_SHUFFLE_BEAN_FAIRIES) || RAND_GET_OPTION(RSK_SHUFFLE_SONG_FAIRIES));
|
RAND_GET_OPTION(RSK_SHUFFLE_BEAN_FAIRIES) || RAND_GET_OPTION(RSK_SHUFFLE_SONG_FAIRIES));
|
||||||
|
bool shouldRegisterFountain = IS_RANDO && RAND_GET_OPTION(RSK_SHUFFLE_FOUNTAIN_FAIRIES);
|
||||||
|
bool shouldRegisterStone = IS_RANDO && RAND_GET_OPTION(RSK_SHUFFLE_STONE_FAIRIES);
|
||||||
|
bool shouldRegisterBean = IS_RANDO && RAND_GET_OPTION(RSK_SHUFFLE_BEAN_FAIRIES);
|
||||||
|
bool shouldRegisterSong = IS_RANDO && RAND_GET_OPTION(RSK_SHUFFLE_SONG_FAIRIES);
|
||||||
|
|
||||||
// Grant item when picking up fairy.
|
// Grant item when picking up fairy.
|
||||||
COND_VB_SHOULD(VB_FAIRY_HEAL, shouldRegister, {
|
COND_VB_SHOULD(VB_FAIRY_HEAL, shouldRegister, {
|
||||||
|
@ -108,7 +112,7 @@ void RegisterShuffleFairies() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Spawn fairies in fairy fountains
|
// Spawn fairies in fairy fountains
|
||||||
COND_VB_SHOULD(VB_SPAWN_FOUNTAIN_FAIRIES, shouldRegister, {
|
COND_VB_SHOULD(VB_SPAWN_FOUNTAIN_FAIRIES, shouldRegisterFountain, {
|
||||||
Actor* actor = va_arg(args, Actor*);
|
Actor* actor = va_arg(args, Actor*);
|
||||||
bool fairySpawned = false;
|
bool fairySpawned = false;
|
||||||
s16 grottoId = (gPlayState->sceneNum == SCENE_FAIRYS_FOUNTAIN) ? Grotto_CurrentGrotto() : 0;
|
s16 grottoId = (gPlayState->sceneNum == SCENE_FAIRYS_FOUNTAIN) ? Grotto_CurrentGrotto() : 0;
|
||||||
|
@ -124,7 +128,7 @@ void RegisterShuffleFairies() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Spawn 3 fairies when playing Song of Storms next to a planted bean
|
// Spawn 3 fairies when playing Song of Storms next to a planted bean
|
||||||
COND_VB_SHOULD(VB_SPAWN_BEAN_STALK_FAIRIES, shouldRegister, {
|
COND_VB_SHOULD(VB_SPAWN_BEAN_STALK_FAIRIES, shouldRegisterBean, {
|
||||||
ObjBean* objBean = va_arg(args, ObjBean*);
|
ObjBean* objBean = va_arg(args, ObjBean*);
|
||||||
bool fairySpawned = false;
|
bool fairySpawned = false;
|
||||||
for (s16 index = 0; index < 3; index++) {
|
for (s16 index = 0; index < 3; index++) {
|
||||||
|
@ -140,7 +144,7 @@ void RegisterShuffleFairies() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Spawn a fairy from a ShotSun when playing the right song near it
|
// Spawn a fairy from a ShotSun when playing the right song near it
|
||||||
COND_VB_SHOULD(VB_SPAWN_SONG_FAIRY, shouldRegister, {
|
COND_VB_SHOULD(VB_SPAWN_SONG_FAIRY, shouldRegisterSong, {
|
||||||
ShotSun* shotSun = va_arg(args, ShotSun*);
|
ShotSun* shotSun = va_arg(args, ShotSun*);
|
||||||
if (SpawnFairy(shotSun->actor.world.pos.x, shotSun->actor.world.pos.y, shotSun->actor.world.pos.z,
|
if (SpawnFairy(shotSun->actor.world.pos.x, shotSun->actor.world.pos.y, shotSun->actor.world.pos.z,
|
||||||
TWO_ACTOR_PARAMS(0x1000, (int32_t)shotSun->actor.world.pos.z), FAIRY_HEAL_BIG)) {
|
TWO_ACTOR_PARAMS(0x1000, (int32_t)shotSun->actor.world.pos.z), FAIRY_HEAL_BIG)) {
|
||||||
|
@ -149,7 +153,7 @@ void RegisterShuffleFairies() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle playing both misc songs and song of storms in front of a gossip stone.
|
// Handle playing both misc songs and song of storms in front of a gossip stone.
|
||||||
COND_VB_SHOULD(VB_SPAWN_GOSSIP_STONE_FAIRY, shouldRegister, {
|
COND_VB_SHOULD(VB_SPAWN_GOSSIP_STONE_FAIRY, shouldRegisterStone, {
|
||||||
EnGs* gossipStone = va_arg(args, EnGs*);
|
EnGs* gossipStone = va_arg(args, EnGs*);
|
||||||
FairyType fairyType = FAIRY_HEAL;
|
FairyType fairyType = FAIRY_HEAL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue