mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Field effects for Gen IV Abilities
Also added Honey (acts like White Flute for now) and made it so the Griseous Orb can't be removed from Giratina in battle.
This commit is contained in:
parent
cf0e38b11f
commit
fc69631a10
@ -3628,7 +3628,7 @@ AI_HPAware_DiscouragedEffectsWhenTargetLowHP: @ 82DE2B1
|
||||
.byte EFFECT_LIGHT_SCREEN
|
||||
.byte EFFECT_OHKO
|
||||
.byte EFFECT_SUPER_FANG
|
||||
.byte EFFECT_SUPER_FANG
|
||||
.byte EFFECT_SUPER_FANG //Why is this here twice?
|
||||
.byte EFFECT_MIST
|
||||
.byte EFFECT_FOCUS_ENERGY
|
||||
.byte EFFECT_CONFUSE
|
||||
|
19
graphics/items/icon_palettes/honey.pal
Normal file
19
graphics/items/icon_palettes/honey.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
48 48 48
|
||||
120 80 32
|
||||
200 112 0
|
||||
80 152 152
|
||||
232 144 0
|
||||
96 184 192
|
||||
248 184 72
|
||||
248 240 184
|
||||
216 248 248
|
||||
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/honey.png
Normal file
BIN
graphics/items/icons/honey.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
@ -509,98 +509,99 @@
|
||||
#define ITEM_DRACO_PLATE 420
|
||||
#define ITEM_DREAD_PLATE 421
|
||||
#define ITEM_IRON_PLATE 422
|
||||
#define ITEM_HONEY 423
|
||||
|
||||
|
||||
// Gen 5 Items
|
||||
#define ITEM_EVIOLITE 423
|
||||
#define ITEM_FLOAT_STONE 424
|
||||
#define ITEM_BINDING_BAND 425
|
||||
#define ITEM_DOUSE_DRIVE 426
|
||||
#define ITEM_SHOCK_DRIVE 427
|
||||
#define ITEM_BURN_DRIVE 428
|
||||
#define ITEM_CHILL_DRIVE 429
|
||||
#define ITEM_FIRE_GEM 430
|
||||
#define ITEM_WATER_GEM 431
|
||||
#define ITEM_ELECTRIC_GEM 432
|
||||
#define ITEM_GRASS_GEM 433
|
||||
#define ITEM_ICE_GEM 434
|
||||
#define ITEM_FIGHTING_GEM 435
|
||||
#define ITEM_POISON_GEM 436
|
||||
#define ITEM_GROUND_GEM 437
|
||||
#define ITEM_FLYING_GEM 438
|
||||
#define ITEM_PSYCHIC_GEM 439
|
||||
#define ITEM_BUG_GEM 440
|
||||
#define ITEM_ROCK_GEM 441
|
||||
#define ITEM_GHOST_GEM 442
|
||||
#define ITEM_DRAGON_GEM 443
|
||||
#define ITEM_DARK_GEM 444
|
||||
#define ITEM_STEEL_GEM 445
|
||||
#define ITEM_NORMAL_GEM 446
|
||||
#define ITEM_FAIRY_GEM 447
|
||||
#define ITEM_EVIOLITE 424
|
||||
#define ITEM_FLOAT_STONE 425
|
||||
#define ITEM_BINDING_BAND 426
|
||||
#define ITEM_DOUSE_DRIVE 427
|
||||
#define ITEM_SHOCK_DRIVE 428
|
||||
#define ITEM_BURN_DRIVE 429
|
||||
#define ITEM_CHILL_DRIVE 430
|
||||
#define ITEM_FIRE_GEM 431
|
||||
#define ITEM_WATER_GEM 432
|
||||
#define ITEM_ELECTRIC_GEM 433
|
||||
#define ITEM_GRASS_GEM 434
|
||||
#define ITEM_ICE_GEM 435
|
||||
#define ITEM_FIGHTING_GEM 436
|
||||
#define ITEM_POISON_GEM 437
|
||||
#define ITEM_GROUND_GEM 438
|
||||
#define ITEM_FLYING_GEM 439
|
||||
#define ITEM_PSYCHIC_GEM 440
|
||||
#define ITEM_BUG_GEM 441
|
||||
#define ITEM_ROCK_GEM 442
|
||||
#define ITEM_GHOST_GEM 443
|
||||
#define ITEM_DRAGON_GEM 444
|
||||
#define ITEM_DARK_GEM 445
|
||||
#define ITEM_STEEL_GEM 446
|
||||
#define ITEM_NORMAL_GEM 447
|
||||
#define ITEM_FAIRY_GEM 448
|
||||
|
||||
// Gen6 Items
|
||||
#define ITEM_ASSAULT_VEST 448
|
||||
#define ITEM_PIXIE_PLATE 449
|
||||
#define ITEM_SAFETY_GOGGLES 450
|
||||
#define ITEM_GENGARITE 451
|
||||
#define ITEM_GARDEVOIRITE 452
|
||||
#define ITEM_AMPHAROSITE 453
|
||||
#define ITEM_VENUSAURITE 454
|
||||
#define ITEM_CHARIZARDITE_X 455
|
||||
#define ITEM_BLASTOISINITE 456
|
||||
#define ITEM_MEWTWONITE_X 457
|
||||
#define ITEM_MEWTWONITE_Y 458
|
||||
#define ITEM_BLAZIKENITE 459
|
||||
#define ITEM_MEDICHAMITE 460
|
||||
#define ITEM_HOUNDOOMINITE 461
|
||||
#define ITEM_AGGRONITE 462
|
||||
#define ITEM_BANETTITE 463
|
||||
#define ITEM_TYRANITARITE 464
|
||||
#define ITEM_SCIZORITE 465
|
||||
#define ITEM_PINSIRITE 466
|
||||
#define ITEM_AERODACTYLITE 467
|
||||
#define ITEM_LUCARIONITE 468
|
||||
#define ITEM_ABOMASITE 469
|
||||
#define ITEM_KANGASKHANITE 470
|
||||
#define ITEM_GYARADOSITE 471
|
||||
#define ITEM_ABSOLITE 472
|
||||
#define ITEM_CHARIZARDITE_Y 473
|
||||
#define ITEM_ALAKAZITE 474
|
||||
#define ITEM_HERACRONITE 475
|
||||
#define ITEM_MAWILITE 476
|
||||
#define ITEM_MANECTITE 477
|
||||
#define ITEM_GARCHOMPITE 478
|
||||
#define ITEM_LATIASITE 479
|
||||
#define ITEM_LATIOSITE 480
|
||||
#define ITEM_SWAMPERTITE 481
|
||||
#define ITEM_SCEPTILITE 482
|
||||
#define ITEM_SABLENITE 483
|
||||
#define ITEM_ALTARIANITE 484
|
||||
#define ITEM_GALLADITE 485
|
||||
#define ITEM_AUDINITE 486
|
||||
#define ITEM_METAGROSSITE 487
|
||||
#define ITEM_SHARPEDONITE 488
|
||||
#define ITEM_SLOWBRONITE 489
|
||||
#define ITEM_STEELIXITE 490
|
||||
#define ITEM_PIDGEOTITE 491
|
||||
#define ITEM_GLALITITE 492
|
||||
#define ITEM_DIANCITE 493
|
||||
#define ITEM_CAMERUPTITE 494
|
||||
#define ITEM_LOPUNNITE 495
|
||||
#define ITEM_SALAMENCITE 496
|
||||
#define ITEM_BEEDRILLITE 497
|
||||
#define ITEM_MEGA_BRACELET 498
|
||||
#define ITEM_ASSAULT_VEST 449
|
||||
#define ITEM_PIXIE_PLATE 450
|
||||
#define ITEM_SAFETY_GOGGLES 451
|
||||
#define ITEM_GENGARITE 452
|
||||
#define ITEM_GARDEVOIRITE 453
|
||||
#define ITEM_AMPHAROSITE 454
|
||||
#define ITEM_VENUSAURITE 455
|
||||
#define ITEM_CHARIZARDITE_X 456
|
||||
#define ITEM_BLASTOISINITE 457
|
||||
#define ITEM_MEWTWONITE_X 458
|
||||
#define ITEM_MEWTWONITE_Y 459
|
||||
#define ITEM_BLAZIKENITE 460
|
||||
#define ITEM_MEDICHAMITE 461
|
||||
#define ITEM_HOUNDOOMINITE 462
|
||||
#define ITEM_AGGRONITE 463
|
||||
#define ITEM_BANETTITE 464
|
||||
#define ITEM_TYRANITARITE 465
|
||||
#define ITEM_SCIZORITE 466
|
||||
#define ITEM_PINSIRITE 467
|
||||
#define ITEM_AERODACTYLITE 468
|
||||
#define ITEM_LUCARIONITE 469
|
||||
#define ITEM_ABOMASITE 470
|
||||
#define ITEM_KANGASKHANITE 471
|
||||
#define ITEM_GYARADOSITE 472
|
||||
#define ITEM_ABSOLITE 473
|
||||
#define ITEM_CHARIZARDITE_Y 474
|
||||
#define ITEM_ALAKAZITE 475
|
||||
#define ITEM_HERACRONITE 476
|
||||
#define ITEM_MAWILITE 477
|
||||
#define ITEM_MANECTITE 478
|
||||
#define ITEM_GARCHOMPITE 479
|
||||
#define ITEM_LATIASITE 480
|
||||
#define ITEM_LATIOSITE 481
|
||||
#define ITEM_SWAMPERTITE 482
|
||||
#define ITEM_SCEPTILITE 483
|
||||
#define ITEM_SABLENITE 484
|
||||
#define ITEM_ALTARIANITE 485
|
||||
#define ITEM_GALLADITE 486
|
||||
#define ITEM_AUDINITE 487
|
||||
#define ITEM_METAGROSSITE 488
|
||||
#define ITEM_SHARPEDONITE 489
|
||||
#define ITEM_SLOWBRONITE 490
|
||||
#define ITEM_STEELIXITE 491
|
||||
#define ITEM_PIDGEOTITE 492
|
||||
#define ITEM_GLALITITE 493
|
||||
#define ITEM_DIANCITE 494
|
||||
#define ITEM_CAMERUPTITE 495
|
||||
#define ITEM_LOPUNNITE 496
|
||||
#define ITEM_SALAMENCITE 497
|
||||
#define ITEM_BEEDRILLITE 498
|
||||
#define ITEM_MEGA_BRACELET 499
|
||||
|
||||
// Gen7 hold effects
|
||||
#define ITEM_PROTECTIVE_PADS 499
|
||||
#define ITEM_TERRAIN_EXTENDER 500
|
||||
#define ITEM_ELECTRIC_SEED 501
|
||||
#define ITEM_GRASSY_SEED 502
|
||||
#define ITEM_MISTY_SEED 503
|
||||
#define ITEM_PSYCHIC_SEED 504
|
||||
#define ITEM_ADRENALINE_ORB 505
|
||||
#define ITEM_PROTECTIVE_PADS 500
|
||||
#define ITEM_TERRAIN_EXTENDER 501
|
||||
#define ITEM_ELECTRIC_SEED 502
|
||||
#define ITEM_GRASSY_SEED 503
|
||||
#define ITEM_MISTY_SEED 504
|
||||
#define ITEM_PSYCHIC_SEED 505
|
||||
#define ITEM_ADRENALINE_ORB 506
|
||||
|
||||
#define ITEMS_COUNT 506
|
||||
#define ITEMS_COUNT 507
|
||||
#define ITEM_FIELD_ARROW ITEMS_COUNT
|
||||
|
||||
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
|
||||
|
@ -51,5 +51,6 @@ void ItemUseInBattle_EnigmaBerry(u8);
|
||||
void ItemUseOutOfBattle_CannotUse(u8);
|
||||
u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId);
|
||||
void sub_80FDD10(u8);
|
||||
void ItemUseOutOfBattle_Honey(u8);
|
||||
|
||||
#endif // GUARD_ITEM_USE_H
|
||||
|
@ -10503,6 +10503,7 @@ static void atkE5_pickup(void)
|
||||
s32 i;
|
||||
u16 species, heldItem;
|
||||
u8 ability;
|
||||
u8 level;
|
||||
|
||||
if (InBattlePike())
|
||||
{
|
||||
@ -10537,6 +10538,10 @@ static void atkE5_pickup(void)
|
||||
{
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL);
|
||||
u8 lvlDivBy10 = (level - 1) / 10;
|
||||
if (lvlDivBy10 > 9)
|
||||
lvlDivBy10 = 9;
|
||||
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY))
|
||||
ability = gBaseStats[species].ability2;
|
||||
@ -10551,9 +10556,6 @@ static void atkE5_pickup(void)
|
||||
{
|
||||
s32 j;
|
||||
s32 rand = Random() % 100;
|
||||
u8 lvlDivBy10 = (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) - 1) / 10;
|
||||
if (lvlDivBy10 > 9)
|
||||
lvlDivBy10 = 9;
|
||||
|
||||
for (j = 0; j < 9; j++)
|
||||
{
|
||||
@ -10569,6 +10571,12 @@ static void atkE5_pickup(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ability == ABILITY_HONEY_GATHER
|
||||
&& species != 0
|
||||
&& species != SPECIES_EGG
|
||||
&& heldItem == ITEM_NONE
|
||||
&& (Random()%100 <= lvlDivBy10*5+5))
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, ITEM_HONEY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -877,6 +877,9 @@ const u32 gItemIconPalette_DreadPlate[] = INCBIN_U32("graphics/items/icon_palett
|
||||
const u32 gItemIcon_IronPlate[] = INCBIN_U32("graphics/items/icons/iron_plate.4bpp.lz");
|
||||
const u32 gItemIconPalette_IronPlate[] = INCBIN_U32("graphics/items/icon_palettes/iron_plate.gbapal.lz");
|
||||
|
||||
const u32 gItemIcon_IronPlate[] = INCBIN_U32("graphics/items/icons/honey.4bpp.lz");
|
||||
const u32 gItemIconPalette_IronPlate[] = INCBIN_U32("graphics/items/icon_palettes/honey.gbapal.lz");
|
||||
|
||||
// Gen 5 Items
|
||||
|
||||
const u32 gItemIcon_Eviolite[] = INCBIN_U32("graphics/items/icons/eviolite.4bpp.lz");
|
||||
|
@ -449,6 +449,7 @@ const u32 *const gItemIconTable[][2] =
|
||||
[ITEM_DRACO_PLATE] = {gItemIcon_DracoPlate, gItemIconPalette_DracoPlate},
|
||||
[ITEM_DREAD_PLATE] = {gItemIcon_DreadPlate, gItemIconPalette_DreadPlate},
|
||||
[ITEM_IRON_PLATE] = {gItemIcon_IronPlate, gItemIconPalette_IronPlate},
|
||||
[ITEM_HONEY] = {gItemIcon_Honey, gItemIconPalette_Honey},
|
||||
// Gen 5 Items
|
||||
[ITEM_EVIOLITE] = {gItemIcon_Eviolite, gItemIconPalette_Eviolite},
|
||||
[ITEM_FLOAT_STONE] = {gItemIcon_FloatStone, gItemIconPalette_FloatStone},
|
||||
|
@ -9136,4 +9136,21 @@ const struct Item gItems[] =
|
||||
.battleUseFunc = NULL,
|
||||
.secondaryId = 0,
|
||||
},
|
||||
[ITEM_HONEY] =
|
||||
{
|
||||
.name = _("Honey"),
|
||||
.itemId = ITEM_HONEY,
|
||||
.price = 100,
|
||||
.holdEffect = HOLD_EFFECT_NONE,
|
||||
.holdEffectParam = 0,
|
||||
.description = gHoneyItemDescription,
|
||||
.importance = 0,
|
||||
.unk19 = 0,
|
||||
.pocket = POCKET_ITEMS,
|
||||
.type = 4,
|
||||
.fieldUseFunc = ItemUseOutOfBattle_Honey,
|
||||
.battleUsage = 0,
|
||||
.battleUseFunc = NULL,
|
||||
.secondaryId = 0,
|
||||
},
|
||||
};
|
||||
|
@ -452,3 +452,4 @@ const u8 gGrassySeedItemDescription[] = _("Boosts Defense on\nGrassy Terrain,\nb
|
||||
const u8 gMistySeedItemDescription[] = _("Boosts Sp. Def. on\nMisty Terrain,\nbut only one time.");
|
||||
const u8 gPsychicSeedItemDescription[] = _("Boosts Sp. Def. on\nPsychic Terrain,\nbut only one time.");
|
||||
const u8 gAdrenalineOrbItemDescription[] = _("Boosts Speed if the\nuser is intimidated,\nbut only one time.");
|
||||
const u8 gHoneyItemDescription[] = _("A sweet honey that\nattracts wild Pokémon\nin grass or on trees.");
|
||||
|
@ -1119,3 +1119,13 @@ void ItemUseOutOfBattle_CannotUse(u8 taskId)
|
||||
{
|
||||
DisplayDadsAdviceCannotUseItemMessage(taskId, gTasks[taskId].data[3]);
|
||||
}
|
||||
|
||||
void ItemUseOutOfBattle_Honey(u8 taskId)
|
||||
{
|
||||
//As a placeholder, just acts like White Flute
|
||||
FlagSet(FLAG_SYS_ENC_UP_ITEM);
|
||||
FlagClear(FLAG_SYS_ENC_DOWN_ITEM);
|
||||
StringExpandPlaceholders(gStringVar4, gText_UsedVar2WildLured);
|
||||
gTasks[taskId].data[8] = 0;
|
||||
gTasks[taskId].func = sub_80FE1D0;
|
||||
}
|
||||
|
@ -487,6 +487,12 @@ static bool8 DoWildEncounterRateTest(u32 encounterRate, bool8 ignoreAbility)
|
||||
encounterRate *= 2;
|
||||
else if (ability == ABILITY_SAND_VEIL && gSaveBlock1Ptr->weather == 8)
|
||||
encounterRate /= 2;
|
||||
else if (ability == ABILITY_SNOW_CLOAK && gSaveBlock1Ptr->weather == 4)
|
||||
encounterRate /= 2;
|
||||
else if (ability == ABILITY_QUICK_FEET && gSaveBlock1Ptr->weather == 8)
|
||||
encounterRate /= 2;
|
||||
else if (ability == ABILITY_NO_GUARD)
|
||||
encounterRate = encounterRate * 150 / 100;
|
||||
}
|
||||
if (encounterRate > 2880)
|
||||
encounterRate = 2880;
|
||||
|
Loading…
Reference in New Issue
Block a user