Skip to content

Make Norman's Slaking Have Ability Intimidate

voloved edited this page Apr 2, 2023 · 7 revisions

by devolov

Goal: Make Norman's Slaking the only Slaking in the game to have intimidate rather than truant.

1. Add the ability Intimidate as the second element in Slaking's ability array.

----------------------- src/data/pokemon/species_info.h -----------------------
index 5af84df1f..9fa175ca4 100644
@@ -10993,9 +10993,9 @@ const struct SpeciesInfo gSpeciesInfo[] =
         .friendship = 70,
         .growthRate = GROWTH_SLOW,
         .eggGroup1 = EGG_GROUP_FIELD,
         .eggGroup2 = EGG_GROUP_FIELD,
-        .abilities = {ABILITY_TRUANT, ABILITY_NONE},
+        .abilities = {ABILITY_TRUANT, ABILITY_INTIMIDATE},
         .safariZoneFleeRate = 0,
         .bodyColor = BODY_COLOR_BROWN,
         .noFlip = FALSE,
     },

2. Force Norman's Slaking's ability to be the second in the ability array.

@@ -2004,12 +2012,11 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
     u32 personalityValue;
     u8 fixedIV;
     s32 i, j;
     u8 monsCount; 
-    u8 opponentClass = gTrainers[trainerNum].trainerClass;
+    const u8 abilityIfNormansSlaking = 1;
@@ -2118,8 +2132,11 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
                 fixedIV = partyData[i].iv * MAX_PER_STAT_IVS / 255;
                 CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_PRESET, fixedOTID);
                 SetMonData(&party[i], MON_DATA_OT_GENDER, &otGender);
                 SetMonData(&party[i], MON_DATA_OT_NAME, gTrainers[trainerNum].trainerName);
+                if (partyData[i].species == SPECIES_SLAKING && gTrainers[trainerNum].trainerPic == TRAINER_PIC_LEADER_NORMAN 
+                && gTrainers[trainerNum].trainerClass == TRAINER_CLASS_LEADER)  //Set Norman's Slaking to have intimidate
+                    SetMonData(&party[i], MON_DATA_ABILITY_NUM, &abilityIfNormansSlaking);
                 
                 SetMonData(&party[i], MON_DATA_HELD_ITEM, &partyData[i].heldItem);

3: Force all other Slaking's abilities to be the first in the ability array.

-------------------------------- src/pokemon.c --------------------------------
index 7f73cb01e..f3cbce599 100644
@@ -2284,9 +2284,10 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
         iv = (value & (MAX_IV_MASK << 10)) >> 10;
         SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv);
     }
 
-    if (gSpeciesInfo[species].abilities[1])
+    if (gSpeciesInfo[species].abilities[1]  && species != SPECIES_SLAKING)
+    // Ignoring Slaking b/c it's set to get intimidate with Norman.
     {
         value = personality & 1;
         SetBoxMonData(boxMon, MON_DATA_ABILITY_NUM, &value);
     }

This is a fun addition to give Norman's Slaking legendary status and with my Thief Ball hack, makes it an interesting legendary encounter. Norman's Slaking Caught

Bonus: Allow Only Slakings whos ability is not Truant to learn a certain move at a certain level.

This is a dumb addition, but I had fun with it since Slaking may be caught with a Thief Ball in my game.
In pokemon.c, change MonTryLearningNewMove to the below, where it'll learn Fissure at level 100.
Note: More code would be needed if you'd like it to be able to relearn the move at the move relearner.

u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove)
 {
     u32 retVal = MOVE_NONE;
     u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL);
     u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL);
+    u32 ability = GetBoxMonData(&mon->box, MON_DATA_ABILITY_NUM, NULL);
+    bool8 slakingLearningDeathMove = (species == SPECIES_SLAKING && ability == 1 && level == 100);
 
     // since you can learn more than one move per level
     // the game needs to know whether you decided to
     // learn it or keep the old set to avoid asking
     // you to learn the same move over and over again
     if (firstMove)
     {
         sLearningMoveTableID = 0;
 
-        while ((gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_LV) != (level << 9))
+        while ((gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_LV) != (level << 9) && !slakingLearningDeathMove)
         {
             sLearningMoveTableID++;
             if (gLevelUpLearnsets[species][sLearningMoveTableID] == LEVEL_UP_END)
                 return MOVE_NONE;
         }
     }
 
-    if ((gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_LV) == (level << 9))
+    if (slakingLearningDeathMove){
+        gMoveToLearn = MOVE_FISSURE;
+        sLearningMoveTableID++;
+        retVal = GiveMoveToMon(mon, gMoveToLearn);
+        if (retVal == MON_ALREADY_KNOWS_MOVE)
+            return MOVE_NONE;
+    }
+
+    else if ((gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_LV) == (level << 9))
     {
         gMoveToLearn = (gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_ID);
         sLearningMoveTableID++;
         retVal = GiveMoveToMon(mon, gMoveToLearn);
     }
 
     return retVal;
 }
Clone this wiki locally