Skip to content

Commit

Permalink
Fix random IVs for givemon (rh-hideout#5021)
Browse files Browse the repository at this point in the history
  • Loading branch information
tertu-m authored Jul 22, 2024
2 parents 67551db + 30ff2fa commit 305c1ba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/script_pokemon_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,12 @@ void ScrCmd_givemon(struct ScriptContext *ctx)
u8 speedEv = PARSE_FLAG(8, 0);
u8 spAtkEv = PARSE_FLAG(9, 0);
u8 spDefEv = PARSE_FLAG(10, 0);
u8 hpIv = PARSE_FLAG(11, Random() % MAX_PER_STAT_IVS + 1);
u8 atkIv = PARSE_FLAG(12, Random() % MAX_PER_STAT_IVS + 1);
u8 defIv = PARSE_FLAG(13, Random() % MAX_PER_STAT_IVS + 1);
u8 speedIv = PARSE_FLAG(14, Random() % MAX_PER_STAT_IVS + 1);
u8 spAtkIv = PARSE_FLAG(15, Random() % MAX_PER_STAT_IVS + 1);
u8 spDefIv = PARSE_FLAG(16, Random() % MAX_PER_STAT_IVS + 1);
u8 hpIv = PARSE_FLAG(11, Random() % (MAX_PER_STAT_IVS + 1));
u8 atkIv = PARSE_FLAG(12, Random() % (MAX_PER_STAT_IVS + 1));
u8 defIv = PARSE_FLAG(13, Random() % (MAX_PER_STAT_IVS + 1));
u8 speedIv = PARSE_FLAG(14, Random() % (MAX_PER_STAT_IVS + 1));
u8 spAtkIv = PARSE_FLAG(15, Random() % (MAX_PER_STAT_IVS + 1));
u8 spDefIv = PARSE_FLAG(16, Random() % (MAX_PER_STAT_IVS + 1));
u16 move1 = PARSE_FLAG(17, MOVE_NONE);
u16 move2 = PARSE_FLAG(18, MOVE_NONE);
u16 move3 = PARSE_FLAG(19, MOVE_NONE);
Expand Down

0 comments on commit 305c1ba

Please sign in to comment.