Skip to content

Commit

Permalink
Beta 1.0.4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rioluwott committed Jan 26, 2021
1 parent 3b10dcb commit 932194b
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 30 deletions.
2 changes: 1 addition & 1 deletion data/maps/DewfordTown_Gym/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ DewfordTown_Gym_EventScript_GiveHM04::
end

DewfordTown_Gym_EventScript_GiveHM05::
giveitem ITEM_HM03
giveitem ITEM_GOOD_ROD
msgbox Gym_Text_ExplainGoodRod, MSGBOX_DEFAULT
//playfanfare MUS_OBTAIN_ITEM
//waitfanfare
Expand Down
2 changes: 1 addition & 1 deletion data/maps/FortreeCity_Gym/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ FortreeCity_Gym_EventScript_GiveHM04::
end

FortreeCity_Gym_EventScript_GiveHM05::
giveitem ITEM_HM03
giveitem ITEM_GOOD_ROD
msgbox Gym_Text_ExplainGoodRod, MSGBOX_DEFAULT
//playfanfare MUS_OBTAIN_ITEM
//waitfanfare
Expand Down
2 changes: 1 addition & 1 deletion data/maps/LavaridgeTown_Gym_1F/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ LavaridgeTown_Gym_EventScript_GiveHM04::
end

LavaridgeTown_Gym_EventScript_GiveHM05::
giveitem ITEM_HM03
giveitem ITEM_GOOD_ROD
msgbox Gym_Text_ExplainGoodRod, MSGBOX_DEFAULT
//playfanfare MUS_OBTAIN_ITEM
//waitfanfare
Expand Down
2 changes: 1 addition & 1 deletion data/maps/MauvilleCity_Gym/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ MauvilleCity_Gym_EventScript_GiveHM04::
end

MauvilleCity_Gym_EventScript_GiveHM05::
giveitem ITEM_HM03
giveitem ITEM_GOOD_ROD
msgbox Gym_Text_ExplainGoodRod, MSGBOX_DEFAULT
//playfanfare MUS_OBTAIN_ITEM
//waitfanfare
Expand Down
2 changes: 1 addition & 1 deletion data/maps/MossdeepCity_Gym/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ MossdeepCity_Gym_EventScript_GiveHM04::
end

MossdeepCity_Gym_EventScript_GiveHM05::
giveitem ITEM_HM03
giveitem ITEM_GOOD_ROD
msgbox Gym_Text_ExplainGoodRod, MSGBOX_DEFAULT
//playfanfare MUS_OBTAIN_ITEM
//waitfanfare
Expand Down
2 changes: 1 addition & 1 deletion data/maps/PetalburgCity_Gym/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ PetalburgCity_Gym_EventScript_GiveHM04::
end

PetalburgCity_Gym_EventScript_GiveHM05::
giveitem ITEM_HM03
giveitem ITEM_GOOD_ROD
msgbox Gym_Text_ExplainGoodRod, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM42
goto PetalburgCity_Gym_EventScript_GiveFacade
Expand Down
2 changes: 1 addition & 1 deletion data/maps/Route104_PrettyPetalFlowerShop/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Route104_PrettyPetalFlowerShop_EventScript_WailmerPailGirl:: @ 822A40C

Route104_PrettyPetalFlowerShop_EventScript_GiveWailmerPail:: @ 822A421
msgbox Route104_PrettyPetalFlowerShop_Text_YouCanHaveThis, MSGBOX_DEFAULT
giveitem ITEM_POWER_ANKLET
giveitem ITEM_EVERSTONE
msgbox Route104_PrettyPetalFlowerShop_Text_WailmerPailExplanation, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_WAILMER_PAIL
release
Expand Down
2 changes: 1 addition & 1 deletion data/maps/SootopolisCity_Gym_1F/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ SootopolisCity_Gym_EventScript_GiveHM04::
end

SootopolisCity_Gym_EventScript_GiveHM05::
giveitem ITEM_HM03
giveitem ITEM_GOOD_ROD
msgbox Gym_Text_ExplainGoodRod, MSGBOX_DEFAULT
//playfanfare MUS_OBTAIN_ITEM
//waitfanfare
Expand Down
9 changes: 9 additions & 0 deletions src/battle_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,15 @@ u16 HasEvolution(u16 species, u8 level)
return gEvolutionTable[species][0].targetSpecies;
}
break;

case EVO_FRIENDSHIP:
if(level >= 12)
{
if(HasEvolution(gEvolutionTable[species][0].targetSpecies, level))
return HasEvolution(gEvolutionTable[species][0].targetSpecies, level);
else
return gEvolutionTable[species][0].targetSpecies;
}

case EVO_ITEM:
case EVO_BEAUTY:
Expand Down
28 changes: 6 additions & 22 deletions src/wild_encounter.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ u16 HasLevelEvolutionwild(u16 species, u8 level, u16 item)
return HasItemEvolutionWild(species, level, item);
break;

case EVO_FRIENDSHIP:
if(level > 22)
return HasItemEvolutionWild(gEvolutionTable[species][0].targetSpecies, level, item);
break;

case EVO_LEVEL:
case EVO_LEVEL_NINJASK:
if(gEvolutionTable[species][0].param && gEvolutionTable[species][0].param <= level)
Expand Down Expand Up @@ -272,34 +277,13 @@ u16 HasItemEvolutionWild(u16 species, u8 level, u16 item)
if(gEvolutionTable[species][0].method == EVO_ITEM){
switch(EvolutionItem)
{
///Checks if you have found the designed Fire Stone
case ITEM_FIRE_STONE:
if (FlagGet(FLAG_ITEM_FIERY_PATH_FIRE_STONE) == TRUE)
return HasItemEvolutionWild(gEvolutionTable[species][0].targetSpecies, level, item);
break;
///Checks if you have found the designed Thunder Stone
case ITEM_THUNDER_STONE:
if (FlagGet(FLAG_ITEM_NEW_MAUVILLE_THUNDER_STONE) == TRUE)
return HasItemEvolutionWild(gEvolutionTable[species][0].targetSpecies, level, item);
break;
///Checks if you have found the designed Water Stone
case ITEM_WATER_STONE:
if (FlagGet(FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_3_WATER_STONE) == TRUE)
return HasItemEvolutionWild(gEvolutionTable[species][0].targetSpecies, level, item);
break;
///Checks if you have found the designed Leaf Stone
case ITEM_LEAF_STONE:
if (FlagGet(FLAG_ITEM_ROUTE_119_LEAF_STONE) == TRUE)
return HasItemEvolutionWild(gEvolutionTable[species][0].targetSpecies, level, item);
break;
///Checks if you have found the designed Sun Stone
case ITEM_SUN_STONE:
if (FlagGet(FLAG_ITEM_ROUTE_103_GUARD_SPEC) == TRUE)
return HasItemEvolutionWild(gEvolutionTable[species][0].targetSpecies, level, item);
break;
///Checks if you have found the designed Sun Stone
case ITEM_MOON_STONE:
if (FlagGet(FLAG_ITEM_METEOR_FALLS_1F_1R_MOON_STONE) == TRUE)
if (FlagGet(FLAG_RECEIVED_TM40) == TRUE && level > (GetMinLevelWild()+5))
return HasItemEvolutionWild(gEvolutionTable[species][0].targetSpecies, level, item);
default:
return species;
Expand Down

0 comments on commit 932194b

Please sign in to comment.