From f923f5198e5462fd3a3f84d98b6eb919d1157aac Mon Sep 17 00:00:00 2001 From: Evan Date: Thu, 16 Jul 2020 09:48:25 -0600 Subject: [PATCH 1/3] add oval charm --- graphics/items/icon_palettes/oval_charm.pal | 19 ++++++++++++++++ graphics/items/icons/oval_charm.png | Bin 0 -> 232 bytes include/constants/items.h | 3 ++- include/graphics.h | 2 ++ src/data/graphics/items.h | 2 ++ src/data/item_icon_table.h | 1 + src/data/items.h | 13 +++++++++++ src/data/text/item_descriptions.h | 6 +++++ src/daycare.c | 23 +++++++++++++++++++- 9 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 graphics/items/icon_palettes/oval_charm.pal create mode 100644 graphics/items/icons/oval_charm.png diff --git a/graphics/items/icon_palettes/oval_charm.pal b/graphics/items/icon_palettes/oval_charm.pal new file mode 100644 index 0000000000..5f5afd15c5 --- /dev/null +++ b/graphics/items/icon_palettes/oval_charm.pal @@ -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 diff --git a/graphics/items/icons/oval_charm.png b/graphics/items/icons/oval_charm.png new file mode 100644 index 0000000000000000000000000000000000000000..25809907a535ea080ac574869379843c5f60efa3 GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaN3?zjj6;1;wg8-ip*Y{607#JA*IPjn$;KquK z9}O1{{P=O>M#q935eYygn4r38OD|Bg*we)^L}F@k!U2}1CZ+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) TriggerPendingDaycareEgg(); } @@ -1295,3 +1297,22 @@ void ChooseSendDaycareMon(void) ChooseMonForDaycare(); 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; +} + From 593860b0be2c2578a89bc230a612e17f3af14b30 Mon Sep 17 00:00:00 2001 From: Evan Date: Thu, 16 Jul 2020 11:13:03 -0600 Subject: [PATCH 2/3] format fix --- src/daycare.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/daycare.c b/src/daycare.c index 0bc584acb3..1a5275cd99 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -1304,12 +1304,12 @@ static u8 ModifyBreedingScoreForOvalCharm(u8 score) { switch (score) { - case 20: - return 40; - case 50: - return 80; - case 70: - return 88; + case 20: + return 40; + case 50: + return 80; + case 70: + return 88; } } From f7c3b3e2462cface9acacf2f726d8197340ad1bb Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 19 Oct 2020 16:07:04 -0600 Subject: [PATCH 3/3] reformat oval charm description --- src/data/text/item_descriptions.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/text/item_descriptions.h b/src/data/text/item_descriptions.h index 927e40d4ea..d587b3b403 100644 --- a/src/data/text/item_descriptions.h +++ b/src/data/text/item_descriptions.h @@ -2795,7 +2795,7 @@ static const u8 sShinyCharmDesc[] = _( "of Shiny Pokémon."); static const u8 sOvalCharmDesc[] = _( - "Increases the\n" - "chance of finding\n" - "eggs at the daycare."); + "Raises the chance\n" + "of finding eggs\n" + "at the daycare.");