Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4 new species flags #2293

Merged
18 changes: 11 additions & 7 deletions include/constants/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,17 @@
#define NUM_HIDDEN_ABILITY_SLOTS 1

// Species Flags
#define FLAG_LEGENDARY (1 << 0)
#define FLAG_MYTHICAL (1 << 1)
#define FLAG_ULTRA_BEAST (1 << 2)
#define FLAG_ALOLAN_FORM (1 << 3)
#define FLAG_GALARIAN_FORM (1 << 4)
#define FLAG_HISUIAN_FORM (1 << 5)
#define FLAG_GENDER_DIFFERENCE (1 << 6)
#define SPECIES_FLAG_LEGENDARY (1 << 0)
#define SPECIES_FLAG_MYTHICAL (1 << 1)
#define SPECIES_FLAG_MEGA_EVOLUTION (1 << 2)
#define SPECIES_FLAG_ULTRA_BEAST (1 << 3)
#define SPECIES_FLAG_ALOLAN_FORM (1 << 4)
#define SPECIES_FLAG_GALARIAN_FORM (1 << 5)
#define SPECIES_FLAG_HISUIAN_FORM (1 << 6)
#define SPECIES_FLAG_GENDER_DIFFERENCE (1 << 7)
#define SPECIES_FLAG_ALL_PERFECT_IVS (1 << 8)
#define SPECIES_FLAG_SHINY_LOCKED (1 << 9)
#define SPECIES_FLAG_CANNOT_BE_TRADED (1 << 10)

#define LEGENDARY_PERFECT_IV_COUNT 3

Expand Down
11 changes: 6 additions & 5 deletions include/constants/trade.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,19 @@
#define UR_TRADE_MSG_NONE 0
#define UR_TRADE_MSG_NOT_MON_PARTNER_WANTS 1
#define UR_TRADE_MSG_NOT_EGG 2
#define UR_TRADE_MSG_MON_CANT_BE_TRADED_1 3
#define UR_TRADE_MSG_MON_CANT_BE_TRADED_2 4
#define UR_TRADE_MSG_MON_CANT_BE_TRADED_NOW 3
#define UR_TRADE_MSG_MON_CANT_BE_TRADED 4
#define UR_TRADE_MSG_PARTNERS_MON_CANT_BE_TRADED 5
#define UR_TRADE_MSG_EGG_CANT_BE_TRADED 6
#define UR_TRADE_MSG_PARTNER_CANT_ACCEPT_MON 7
#define UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_1 8
#define UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_2 9

// Return values for CanRegisterMonForTradingBoard
#define CAN_REGISTER_MON 0
#define CANT_REGISTER_MON 1
#define CANT_REGISTER_EGG 2
#define CAN_REGISTER_MON 0
#define CANT_REGISTER_MON_NOW 1
#define CANT_REGISTER_MON 2
#define CANT_REGISTER_EGG 3


#endif //GUARD_CONSTANTS_TRADE_H
2 changes: 1 addition & 1 deletion include/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ struct BaseStats
u8 safariZoneFleeRate;
u8 bodyColor : 7;
u8 noFlip : 1;
u8 flags;
u16 flags;
};

#include "constants/battle_config.h"
Expand Down
1 change: 1 addition & 0 deletions include/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ extern const u8 gText_MailMessageWillBeLost[];
extern const u8 gText_MailTakenFromPkmn[];
extern const u8 gText_NoMoreThanVar1Pkmn[];
extern const u8 gText_PkmnCantBeTradedNow[];
extern const u8 gText_PkmnCantBeTraded[];
extern const u8 gText_EggCantBeTradedNow[];
extern const u8 gText_OnlyPkmnForBattle[];
extern const u8 gJPText_AreYouSureYouWantToSpinTradeMon[];
Expand Down
2 changes: 1 addition & 1 deletion src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -13912,7 +13912,7 @@ static void Cmd_handleballthrow(void)
else
catchRate = gBaseStats[gBattleMons[gBattlerTarget].species].catchRate;

if (gBaseStats[gBattleMons[gBattlerTarget].species].flags & FLAG_ULTRA_BEAST)
if (gBaseStats[gBattleMons[gBattlerTarget].species].flags & SPECIES_FLAG_ULTRA_BEAST)
{
if (gLastUsedItem == ITEM_BEAST_BALL)
ballMultiplier = 50;
Expand Down
4 changes: 2 additions & 2 deletions src/data/party_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,8 @@ static const u8 *const sUnionRoomTradeMessages[] =
{
[UR_TRADE_MSG_NOT_MON_PARTNER_WANTS - 1] = gText_NotPkmnOtherTrainerWants,
[UR_TRADE_MSG_NOT_EGG - 1] = gText_ThatIsntAnEgg,
[UR_TRADE_MSG_MON_CANT_BE_TRADED_1 - 1] = gText_PkmnCantBeTradedNow,
[UR_TRADE_MSG_MON_CANT_BE_TRADED_2 - 1] = gText_PkmnCantBeTradedNow,
[UR_TRADE_MSG_MON_CANT_BE_TRADED_NOW - 1] = gText_PkmnCantBeTradedNow,
[UR_TRADE_MSG_MON_CANT_BE_TRADED - 1] = gText_PkmnCantBeTraded,
[UR_TRADE_MSG_PARTNERS_MON_CANT_BE_TRADED - 1] = gText_OtherTrainersPkmnCantBeTraded,
[UR_TRADE_MSG_EGG_CANT_BE_TRADED -1] = gText_EggCantBeTradedNow,
[UR_TRADE_MSG_PARTNER_CANT_ACCEPT_MON - 1] = gText_OtherTrainerCantAcceptPkmn,
Expand Down
Loading