commit
92f0f4be01
9 changed files with 67 additions and 2 deletions
19
graphics/items/icon_palettes/oval_charm.pal
Normal file
19
graphics/items/icon_palettes/oval_charm.pal
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
JASC-PAL
|
||||||
|
0100
|
||||||
|
16
|
||||||
|
239 228 176
|
||||||
|
48 48 48
|
||||||
|
248 192 224
|
||||||
|
128 80 216
|
||||||
|
168 104 248
|
||||||
|
128 208 192
|
||||||
|
248 248 216
|
||||||
|
216 136 160
|
||||||
|
184 88 96
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
BIN
graphics/items/icons/oval_charm.png
Normal file
BIN
graphics/items/icons/oval_charm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 232 B |
|
@ -704,8 +704,9 @@
|
||||||
#define ITEM_OLD_SEA_MAP 615
|
#define ITEM_OLD_SEA_MAP 615
|
||||||
|
|
||||||
#define ITEM_SHINY_CHARM 616
|
#define ITEM_SHINY_CHARM 616
|
||||||
|
#define ITEM_OVAL_CHARM 617
|
||||||
|
|
||||||
#define ITEMS_COUNT 617
|
#define ITEMS_COUNT 618
|
||||||
#define ITEM_FIELD_ARROW ITEMS_COUNT
|
#define ITEM_FIELD_ARROW ITEMS_COUNT
|
||||||
|
|
||||||
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
|
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
|
||||||
|
|
|
@ -4212,6 +4212,8 @@ extern const u32 gItemIcon_PrettyWing[];
|
||||||
extern const u32 gItemIconPalette_PrettyWing[];
|
extern const u32 gItemIconPalette_PrettyWing[];
|
||||||
extern const u32 gItemIcon_ShinyCharm[];
|
extern const u32 gItemIcon_ShinyCharm[];
|
||||||
extern const u32 gItemIconPalette_ShinyCharm[];
|
extern const u32 gItemIconPalette_ShinyCharm[];
|
||||||
|
extern const u32 gItemIcon_OvalCharm[];
|
||||||
|
extern const u32 gItemIconPalette_OvalCharm[];
|
||||||
// Gen 6 Items
|
// Gen 6 Items
|
||||||
extern const u32 gItemIcon_AssaultVest[];
|
extern const u32 gItemIcon_AssaultVest[];
|
||||||
extern const u32 gItemIconPalette_AssaultVest[];
|
extern const u32 gItemIconPalette_AssaultVest[];
|
||||||
|
|
|
@ -1235,6 +1235,8 @@ const u32 gItemIconPalette_PrettyWing[] = INCBIN_U32("graphics/items/icon_palett
|
||||||
const u32 gItemIcon_ShinyCharm[] = INCBIN_U32("graphics/items/icons/shiny_charm.4bpp.lz");
|
const u32 gItemIcon_ShinyCharm[] = INCBIN_U32("graphics/items/icons/shiny_charm.4bpp.lz");
|
||||||
const u32 gItemIconPalette_ShinyCharm[] = INCBIN_U32("graphics/items/icon_palettes/shiny_charm.gbapal.lz");
|
const u32 gItemIconPalette_ShinyCharm[] = INCBIN_U32("graphics/items/icon_palettes/shiny_charm.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gItemIcon_OvalCharm[] = INCBIN_U32("graphics/items/icons/oval_charm.4bpp.lz");
|
||||||
|
const u32 gItemIconPalette_OvalCharm[] = INCBIN_U32("graphics/items/icon_palettes/oval_charm.gbapal.lz");
|
||||||
// Gen 6 Items
|
// Gen 6 Items
|
||||||
|
|
||||||
const u32 gItemIcon_AssaultVest[] = INCBIN_U32("graphics/items/icons/assault_vest.4bpp.lz");
|
const u32 gItemIcon_AssaultVest[] = INCBIN_U32("graphics/items/icons/assault_vest.4bpp.lz");
|
||||||
|
|
|
@ -495,6 +495,7 @@ const u32 *const gItemIconTable[][2] =
|
||||||
[ITEM_SWIFT_WING] = {gItemIcon_SwiftWing, gItemIconPalette_SwiftWing},
|
[ITEM_SWIFT_WING] = {gItemIcon_SwiftWing, gItemIconPalette_SwiftWing},
|
||||||
[ITEM_PRETTY_WING] = {gItemIcon_PrettyWing, gItemIconPalette_PrettyWing},
|
[ITEM_PRETTY_WING] = {gItemIcon_PrettyWing, gItemIconPalette_PrettyWing},
|
||||||
[ITEM_SHINY_CHARM] = {gItemIcon_ShinyCharm, gItemIconPalette_ShinyCharm},
|
[ITEM_SHINY_CHARM] = {gItemIcon_ShinyCharm, gItemIconPalette_ShinyCharm},
|
||||||
|
[ITEM_OVAL_CHARM] = {gItemIcon_OvalCharm, gItemIconPalette_OvalCharm},
|
||||||
// Gen 6 Items
|
// Gen 6 Items
|
||||||
[ITEM_ASSAULT_VEST] = {gItemIcon_AssaultVest, gItemIconPalette_AssaultVest},
|
[ITEM_ASSAULT_VEST] = {gItemIcon_AssaultVest, gItemIconPalette_AssaultVest},
|
||||||
[ITEM_PIXIE_PLATE] = {gItemIcon_PixiePlate, gItemIconPalette_PixiePlate},
|
[ITEM_PIXIE_PLATE] = {gItemIcon_PixiePlate, gItemIconPalette_PixiePlate},
|
||||||
|
|
|
@ -7461,4 +7461,17 @@ const struct Item gItems[] =
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
||||||
.secondaryId = 0,
|
.secondaryId = 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
[ITEM_OVAL_CHARM] =
|
||||||
|
{
|
||||||
|
.name = _("Oval Charm"),
|
||||||
|
.itemId = ITEM_OVAL_CHARM,
|
||||||
|
.price = 0,
|
||||||
|
.importance = 1,
|
||||||
|
.description = sOvalCharmDesc,
|
||||||
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
|
.type = 4,
|
||||||
|
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
||||||
|
.secondaryId = 0,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -2793,3 +2793,9 @@ static const u8 sShinyCharmDesc[] = _(
|
||||||
"A charm that will\n"
|
"A charm that will\n"
|
||||||
"raise the chance\n"
|
"raise the chance\n"
|
||||||
"of Shiny Pokémon.");
|
"of Shiny Pokémon.");
|
||||||
|
|
||||||
|
static const u8 sOvalCharmDesc[] = _(
|
||||||
|
"Raises the chance\n"
|
||||||
|
"of finding eggs\n"
|
||||||
|
"at the daycare.");
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "party_menu.h"
|
#include "party_menu.h"
|
||||||
#include "list_menu.h"
|
#include "list_menu.h"
|
||||||
#include "overworld.h"
|
#include "overworld.h"
|
||||||
|
#include "item.h"
|
||||||
#include "constants/items.h"
|
#include "constants/items.h"
|
||||||
#include "constants/moves.h"
|
#include "constants/moves.h"
|
||||||
#include "constants/region_map_sections.h"
|
#include "constants/region_map_sections.h"
|
||||||
|
@ -28,6 +29,7 @@ static void ClearDaycareMonMail(struct DayCareMail *mail);
|
||||||
static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare *daycare);
|
static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare *daycare);
|
||||||
static u8 GetDaycareCompatibilityScore(struct DayCare *daycare);
|
static u8 GetDaycareCompatibilityScore(struct DayCare *daycare);
|
||||||
static void DaycarePrintMonInfo(u8 windowId, s32 daycareSlotId, u8 y);
|
static void DaycarePrintMonInfo(u8 windowId, s32 daycareSlotId, u8 y);
|
||||||
|
static u8 ModifyBreedingScoreForOvalCharm(u8 score);
|
||||||
|
|
||||||
// RAM buffers used to assist with BuildEggMoveset()
|
// RAM buffers used to assist with BuildEggMoveset()
|
||||||
EWRAM_DATA static u16 sHatchedEggLevelUpMoves[EGG_LVL_UP_MOVES_ARRAY_COUNT] = {0};
|
EWRAM_DATA static u16 sHatchedEggLevelUpMoves[EGG_LVL_UP_MOVES_ARRAY_COUNT] = {0};
|
||||||
|
@ -907,7 +909,7 @@ static bool8 TryProduceOrHatchEgg(struct DayCare *daycare)
|
||||||
// Check if an egg should be produced
|
// Check if an egg should be produced
|
||||||
if (daycare->offspringPersonality == 0 && validEggs == DAYCARE_MON_COUNT && (daycare->mons[1].steps & 0xFF) == 0xFF)
|
if (daycare->offspringPersonality == 0 && validEggs == DAYCARE_MON_COUNT && (daycare->mons[1].steps & 0xFF) == 0xFF)
|
||||||
{
|
{
|
||||||
u8 compatability = GetDaycareCompatibilityScore(daycare);
|
u8 compatability = ModifyBreedingScoreForOvalCharm(GetDaycareCompatibilityScore(daycare));
|
||||||
if (compatability > (Random() * 100u) / USHRT_MAX)
|
if (compatability > (Random() * 100u) / USHRT_MAX)
|
||||||
TriggerPendingDaycareEgg();
|
TriggerPendingDaycareEgg();
|
||||||
}
|
}
|
||||||
|
@ -1315,3 +1317,22 @@ void ChooseSendDaycareMon(void)
|
||||||
ChooseMonForDaycare();
|
ChooseMonForDaycare();
|
||||||
gMain.savedCallback = CB2_ReturnToField;
|
gMain.savedCallback = CB2_ReturnToField;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static u8 ModifyBreedingScoreForOvalCharm(u8 score)
|
||||||
|
{
|
||||||
|
if (CheckBagHasItem(ITEM_OVAL_CHARM, 1))
|
||||||
|
{
|
||||||
|
switch (score)
|
||||||
|
{
|
||||||
|
case 20:
|
||||||
|
return 40;
|
||||||
|
case 50:
|
||||||
|
return 80;
|
||||||
|
case 70:
|
||||||
|
return 88;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue