Skip to content

Commit e92be2e

Browse files
committed
Merge branch 'dev' into release
2 parents c5a3f4e + 403a745 commit e92be2e

File tree

145 files changed

+3139
-893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+3139
-893
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,28 @@ To build it, use [LunarIPS](https://fusoya.eludevisibility.org/lips/) and your l
99

1010
![Example](https://i.imgur.com/KSMvc0h.png)
1111

12+
## v2.2.0
13+
- [Added Eon Flute](https://www.pokecommunity.com/showthread.php?t=422107) [Credit: camthesaxman and paccy for the Emerald Port]
14+
- [Go-Goggles can be Used to and a Sandstorm in Battles](https://gitlab.com/devolov/pokeemerald_fork/-/commit/00c938536e5abfe4db4e89fd3e93b2c6ac1a450c)
15+
- [Added Ability to See Zigzagoon on Cable Car](https://www.youtube.com/watch?v=7xdcbbfwEto) [Credit: Goppier]
16+
- [Added Party Members Icons in the Main Menu for Existing Save Files.](https://github.com/AsparagusEduardo/pokeemerald/commit/5a638b567cfa8bb8f5a27cf96b3d1bc92a4df572) [Credit: Sangetsuki and Lunos]
17+
- All Battle Frontier Pokémon are fully-evolved.
18+
- Player's icon shown and them raising their Poké Ball not shown when performing a field move that the party does not known.
19+
- Sped up slow and medium text speed.
20+
- [Arrows show that cycling balls can be done.](https://github.com/rh-hideout/pokeemerald-expansion/pull/3039)
21+
- Thief Ball option only shows if the Pokémon's catch rate is low enough (proxy for its rarity).
22+
- Register icon for Cleanse Tag and Poké Doll aligned.
23+
- Repels can now be registered items.
24+
- [Added Frostbite](https://github.com/rh-hideout/pokeemerald-expansion/pull/2942) [Credit: Bassoonian]
25+
- Option for using Frostbite as an ailment over Frozen is possible in the Special PC Menu.
26+
- Added Chill-O-Wisp (Which behaves like Will-O-Wisp, but causes Frostbite).
27+
- Misdreavus, the Spheal line, and the Snorunt can learn this via level-up.
28+
- Drowsee, Sneasel, and Swinub can learn this as an egg move.
29+
- [Made Tri Attach's Type Effectiveness Change Based on the Defender's Strength Against Fire, Electric, and Ice Types.](https://gitlab.com/devolov/pokeemerald_fork/-/wikis/Make-Tri-Attack's-power-be-based-off-how-Fire,-Ice,-and-Electric-moves-affect-the-defender)
30+
- Hidden Thief Ball Added in Rival's House When Selecting Their Ball After First Talking to Thyem at Their House.
31+
- Added a Mean Zigzagoon in Petalberg Woods.
32+
- Bug fix where player is not properly shown when using Surf or Dive.
33+
1234
## v2.1.0
1335
- [Added last used ball in battle menu.](https://github.com/rh-hideout/pokeemerald-expansion/commit/c06029bc721119b0efd6e26c24a3f77772dfd77b) [Credit: Ghoulslash]
1436
- This defaults to a Thief ball if in a trainer battle.

asm/macros/battle_script.inc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,11 @@
12571257
.byte 0xf9
12581258
.endm
12591259

1260+
.macro checkflag position:req
1261+
.byte 0xfa
1262+
.byte \flag
1263+
.endm
1264+
12601265
@ various command changed to more readable macros
12611266
.macro cancelmultiturnmoves battler:req
12621267
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES
@@ -1366,6 +1371,12 @@
13661371
various \battler, VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC
13671372
.endm
13681373

1374+
.macro jumpifset, flag:req, ptr:req
1375+
various BS_TARGET, VARIOUS_JUMP_IF_SET
1376+
.2byte \flag
1377+
.4byte \ptr
1378+
.endm
1379+
13691380
@ helpful macros
13701381
.macro setstatchanger stat:req, stages:req, down:req
13711382
setbyte sSTATCHANGER, \stat | \stages << 4 | \down << 7

asm/macros/event.inc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,11 +1171,13 @@
11711171
.endm
11721172
11731173
@ Subtracts value from the player's money. If the player has less than 'value' money, their money is set to 0.
1174-
@ If 'disable' is set to anything but 0 then this command does nothing.
1175-
.macro removemoney value:req, disable=0
1174+
@ If 'setting' is set to 0 then 'value' will be subtracted.
1175+
@ If 'setting' is set to 1 then this command does nothing.
1176+
@ If 'setting' is set to 2 then the current money will be divided by 'value'.
1177+
.macro removemoney value:req, setting=0
11761178
.byte 0x91
11771179
.4byte \value
1178-
.byte \disable
1180+
.byte \setting
11791181
.endm
11801182

11811183
@ Checks if the player has money >= value. VAR_RESULT is set to TRUE if the player has enough money, or FALSE if they do not.

data/battle_ai_scripts.s

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ AI_CheckBadMove_CheckEffect:
190190
if_effect EFFECT_TORMENT, AI_CBM_Torment
191191
if_effect EFFECT_FLATTER, AI_CBM_Confuse
192192
if_effect EFFECT_WILL_O_WISP, AI_CBM_WillOWisp
193+
if_effect EFFECT_CHILL_O_WISP, AI_CBM_ChillOWisp
193194
if_effect EFFECT_MEMENTO, AI_CBM_Memento
194195
if_effect EFFECT_FOCUS_PUNCH, AI_CBM_HighRiskForDamage
195196
if_effect EFFECT_HELPING_HAND, AI_CBM_HelpingHand
@@ -536,6 +537,16 @@ AI_CBM_WillOWisp:
536537
if_side_affecting AI_TARGET, SIDE_STATUS_SAFEGUARD, Score_Minus10
537538
end
538539

540+
AI_CBM_ChillOWisp:
541+
get_ability AI_TARGET
542+
if_equal ABILITY_WATER_VEIL, Score_Minus10
543+
if_status AI_TARGET, STATUS1_ANY, Score_Minus10
544+
if_type_effectiveness AI_EFFECTIVENESS_x0, Score_Minus10
545+
if_type_effectiveness AI_EFFECTIVENESS_x0_5, Score_Minus10
546+
if_type_effectiveness AI_EFFECTIVENESS_x0_25, Score_Minus10
547+
if_side_affecting AI_TARGET, SIDE_STATUS_SAFEGUARD, Score_Minus10
548+
end
549+
539550
AI_CBM_HelpingHand:
540551
if_not_double_battle Score_Minus10
541552
end
@@ -559,7 +570,7 @@ AI_CBM_Imprison:
559570
end
560571

561572
AI_CBM_Refresh:
562-
if_not_status AI_USER, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, Score_Minus10
573+
if_not_status AI_USER, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE, Score_Minus10
563574
end
564575

565576
AI_CBM_MudSport:
@@ -1560,6 +1571,7 @@ AI_CV_Substitute4:
15601571
if_equal EFFECT_POISON, AI_CV_Substitute5
15611572
if_equal EFFECT_PARALYZE, AI_CV_Substitute5
15621573
if_equal EFFECT_WILL_O_WISP, AI_CV_Substitute5
1574+
if_equal EFFECT_CHILL_O_WISP, AI_CV_Substitute5
15631575
if_equal EFFECT_CONFUSE, AI_CV_Substitute6
15641576
if_equal EFFECT_LEECH_SEED, AI_CV_Substitute7
15651577
goto AI_CV_Substitute_End
@@ -1747,6 +1759,7 @@ AI_CV_Encore_EncouragedMovesToEncore:
17471759
.byte EFFECT_WATER_SPORT
17481760
.byte EFFECT_DRAGON_DANCE
17491761
.byte EFFECT_CAMOUFLAGE
1762+
.byte EFFECT_CHILL_O_WISP
17501763
.byte -1
17511764

17521765
AI_CV_PainSplit:
@@ -2251,9 +2264,9 @@ AI_CV_Hail_End:
22512264
@ BUG: Facade score is increased if the target is statused, but should be if the user is
22522265
AI_CV_Facade:
22532266
.ifdef BUGFIX
2254-
if_not_status AI_USER, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
2267+
if_not_status AI_USER, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE, AI_CV_Facade_End
22552268
.else
2256-
if_not_status AI_TARGET, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
2269+
if_not_status AI_TARGET, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE, AI_CV_Facade_End
22572270
.endif
22582271
score +1
22592272
AI_CV_Facade_End:
@@ -2675,6 +2688,7 @@ AI_SetupFirstTurn_SetupEffectsToEncourage:
26752688
.byte EFFECT_BULK_UP
26762689
.byte EFFECT_CALM_MIND
26772690
.byte EFFECT_CAMOUFLAGE
2691+
.byte EFFECT_CHILL_O_WISP
26782692
.byte -1
26792693

26802694
@ ~60% chance to prefer moves that do 0 or 1 damage, or are in sIgnoredPowerfulMoveEffects
@@ -3165,6 +3179,7 @@ AI_HPAware_DiscouragedEffectsWhenTargetLowHP:
31653179
.byte EFFECT_BULK_UP
31663180
.byte EFFECT_CALM_MIND
31673181
.byte EFFECT_DRAGON_DANCE
3182+
.byte EFFECT_CHILL_O_WISP
31683183
.byte -1
31693184

31703185
@ Given the AI_TryOnAlly at the beginning it's possible that this was the start of a more

data/battle_anim_scripts.s

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ gBattleAnims_Moves::
377377
.4byte Move_DRAINING_KISS
378378
.4byte Move_FAIRY_WIND
379379
.4byte Move_DEATH_MOVE
380+
.4byte Move_CHILL_O_WISP
380381
.4byte Move_COUNT @ cannot be reached, because last move is Psycho Boost
381382

382383
.align 2
@@ -2233,6 +2234,7 @@ BulbblebeamCreateBubbles:
22332234
return
22342235

22352236
Move_ICY_WIND:
2237+
Move_CHILL_O_WISP:
22362238
loadspritegfx ANIM_TAG_ICE_CRYSTALS
22372239
loadspritegfx ANIM_TAG_ICE_SPIKES
22382240
monbg ANIM_DEF_PARTNER

data/battle_scripts_1.s

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "constants/songs.h"
1111
#include "constants/game_stat.h"
1212
#include "constants/trainers.h"
13+
#include "constants/flags.h"
1314
.include "asm/macros.inc"
1415
.include "asm/macros/battle_script.inc"
1516
.include "constants/constants.inc"
@@ -23,7 +24,7 @@ gBattleScriptsForMoveEffects::
2324
.4byte BattleScript_EffectPoisonHit @ EFFECT_POISON_HIT
2425
.4byte BattleScript_EffectAbsorb @ EFFECT_ABSORB
2526
.4byte BattleScript_EffectBurnHit @ EFFECT_BURN_HIT
26-
.4byte BattleScript_EffectFreezeHit @ EFFECT_FREEZE_HIT
27+
.4byte BattleScript_EffectFreezeFrostbiteHit @ EFFECT_FREEZE_FROSTBITE_HIT
2728
.4byte BattleScript_EffectParalyzeHit @ EFFECT_PARALYZE_HIT
2829
.4byte BattleScript_EffectExplosion @ EFFECT_EXPLOSION
2930
.4byte BattleScript_EffectDreamEater @ EFFECT_DREAM_EATER
@@ -233,6 +234,7 @@ gBattleScriptsForMoveEffects::
233234
.4byte BattleScript_EffectDragonDance @ EFFECT_DRAGON_DANCE
234235
.4byte BattleScript_EffectCamouflage @ EFFECT_CAMOUFLAGE
235236
.4byte BattleScript_EffectOHKO @ EFFECT_DEATH_MOVE
237+
.4byte BattleScript_EffectChillOWisp @ EFFECT_CHILL_O_WISP
236238

237239
BattleScript_EffectHit::
238240
jumpifnotmove MOVE_SURF, BattleScript_HitFromAtkCanceler
@@ -364,6 +366,14 @@ BattleScript_EffectBurnHit::
364366
setmoveeffect MOVE_EFFECT_BURN
365367
goto BattleScript_EffectHit
366368

369+
BattleScript_EffectFreezeFrostbiteHit::
370+
jumpifset FLAG_USE_FROSTBITE, BattleScript_EffectFrostbiteHit
371+
goto BattleScript_EffectFreezeHit
372+
373+
BattleScript_EffectFrostbiteHit::
374+
setmoveeffect MOVE_EFFECT_FROSTBITE
375+
goto BattleScript_EffectHit
376+
367377
BattleScript_EffectFreezeHit::
368378
setmoveeffect MOVE_EFFECT_FREEZE
369379
goto BattleScript_EffectHit
@@ -2189,6 +2199,31 @@ BattleScript_EffectWillOWisp::
21892199
seteffectprimary
21902200
goto BattleScript_MoveEnd
21912201

2202+
BattleScript_EffectChillOWisp::
2203+
attackcanceler
2204+
attackstring
2205+
ppreduce
2206+
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_ButItFailed
2207+
jumpifset FLAG_USE_FROSTBITE, BattleScript_EffectChillOWisp_AlreadyFrostBitten
2208+
jumpifstatus BS_TARGET, STATUS1_FREEZE, BattleScript_AlreadyFrozen
2209+
goto BattleScript_EffectChillOWisp_Cont1
2210+
BattleScript_EffectChillOWisp_AlreadyFrostBitten::
2211+
jumpifstatus BS_TARGET, STATUS1_FROSTBITE, BattleScript_AlreadyFrostBitten
2212+
BattleScript_EffectChillOWisp_Cont1::
2213+
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
2214+
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
2215+
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
2216+
attackanimation
2217+
waitanimation
2218+
jumpifset FLAG_USE_FROSTBITE, BattleScript_EffectChillOWisp_FrostBite
2219+
setmoveeffect MOVE_EFFECT_FREEZE
2220+
goto BattleScript_EffectChillOWisp_Cont2
2221+
BattleScript_EffectChillOWisp_FrostBite::
2222+
setmoveeffect MOVE_EFFECT_FROSTBITE
2223+
BattleScript_EffectChillOWisp_Cont2::
2224+
seteffectprimary
2225+
goto BattleScript_MoveEnd
2226+
21922227
BattleScript_WaterVeilPrevents::
21932228
copybyte gEffectBattler, gBattlerTarget
21942229
setbyte cMULTISTRING_CHOOSER, B_MSG_ABILITY_PREVENTS_MOVE_STATUS
@@ -2202,6 +2237,20 @@ BattleScript_AlreadyBurned::
22022237
waitmessage B_WAIT_TIME_LONG
22032238
goto BattleScript_MoveEnd
22042239

2240+
BattleScript_AlreadyFrostBitten::
2241+
setalreadystatusedmoveattempt BS_ATTACKER
2242+
pause B_WAIT_TIME_SHORT
2243+
printstring STRINGID_PKMNALREADYHASFROSTBITE
2244+
waitmessage B_WAIT_TIME_LONG
2245+
goto BattleScript_MoveEnd
2246+
2247+
BattleScript_AlreadyFrozen::
2248+
setalreadystatusedmoveattempt BS_ATTACKER
2249+
pause B_WAIT_TIME_SHORT
2250+
printstring STRINGID_PKMNALREADYFROZEN
2251+
waitmessage B_WAIT_TIME_LONG
2252+
goto BattleScript_MoveEnd
2253+
22052254
BattleScript_EffectMemento::
22062255
attackcanceler
22072256
jumpifbyte CMP_EQUAL, cMISS_TYPE, B_MSG_PROTECTED, BattleScript_MementoTargetProtect
@@ -3763,6 +3812,11 @@ BattleScript_BurnTurnDmg::
37633812
waitmessage B_WAIT_TIME_LONG
37643813
goto BattleScript_DoStatusTurnDmg
37653814

3815+
BattleScript_FrostbiteTurnDmg::
3816+
printstring STRINGID_PKMNHURTBYFROSTBITE
3817+
waitmessage B_WAIT_TIME_LONG
3818+
goto BattleScript_DoStatusTurnDmg
3819+
37663820
BattleScript_MoveUsedIsFrozen::
37673821
printstring STRINGID_PKMNISFROZEN
37683822
waitmessage B_WAIT_TIME_LONG
@@ -3775,12 +3829,24 @@ BattleScript_MoveUsedUnfroze::
37753829
updatestatusicon BS_ATTACKER
37763830
return
37773831

3832+
BattleScript_MoveUsedUnfrostbite::
3833+
printfromtable gFrostbiteHealedStringIds
3834+
waitmessage B_WAIT_TIME_LONG
3835+
updatestatusicon BS_ATTACKER
3836+
return
3837+
37783838
BattleScript_DefrostedViaFireMove::
37793839
printstring STRINGID_PKMNWASDEFROSTED
37803840
waitmessage B_WAIT_TIME_LONG
37813841
updatestatusicon BS_TARGET
37823842
return
37833843

3844+
BattleScript_FrostbiteHealedViaFireMove::
3845+
printstring STRINGID_PKMNFROSTBITEHEALED
3846+
waitmessage B_WAIT_TIME_LONG
3847+
updatestatusicon BS_TARGET
3848+
return
3849+
37843850
BattleScript_MoveUsedIsParalyzed::
37853851
printstring STRINGID_PKMNISPARALYZED
37863852
waitmessage B_WAIT_TIME_LONG
@@ -3907,6 +3973,12 @@ BattleScript_MoveEffectBurn::
39073973
waitmessage B_WAIT_TIME_LONG
39083974
goto BattleScript_UpdateEffectStatusIconRet
39093975

3976+
BattleScript_MoveEffectFrostbite::
3977+
statusanimation BS_EFFECT_BATTLER
3978+
printfromtable gGotFrostbiteStringIds
3979+
waitmessage B_WAIT_TIME_LONG
3980+
goto BattleScript_UpdateEffectStatusIconRet
3981+
39103982
BattleScript_MoveEffectFreeze::
39113983
statusanimation BS_EFFECT_BATTLER
39123984
printfromtable gGotFrozenStringIds
@@ -4318,6 +4390,18 @@ BattleScript_BerryCureFrzRet::
43184390
removeitem BS_SCRIPTING
43194391
return
43204392

4393+
BattleScript_BerryCureFsbEnd2::
4394+
call BattleScript_BerryCureFrzRet
4395+
end2
4396+
4397+
BattleScript_BerryCureFsbRet::
4398+
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT
4399+
printstring STRINGID_PKMNSITEMHEALEDFROSTBITE
4400+
waitmessage B_WAIT_TIME_LONG
4401+
updatestatusicon BS_SCRIPTING
4402+
removeitem BS_SCRIPTING
4403+
return
4404+
43214405
BattleScript_BerryCureSlpEnd2::
43224406
call BattleScript_BerryCureSlpRet
43234407
end2

data/maps/AbandonedShip_Deck/scripts.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ AbandonedShip_Deck_MapScripts::
44

55
AbandonedShip_Deck_OnTransition:
66
setflag FLAG_LANDMARK_ABANDONED_SHIP
7+
setflag FLAG_VISITED_ROUTE108
78
end
89

data/maps/DewfordTown/scripts.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ DewfordTown_MapScripts::
1616

1717
DewfordTown_OnTransition:
1818
setflag FLAG_VISITED_DEWFORD_TOWN
19+
setflag FLAG_VISITED_ROUTE106
20+
setflag FLAG_VISITED_ROUTE107
1921
end
2022

2123
DewfordTown_EventScript_Briney::

data/maps/FallarborTown/scripts.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ FallarborTown_MapScripts::
44

55
FallarborTown_OnTransition:
66
setflag FLAG_VISITED_FALLARBOR_TOWN
7+
setflag FLAG_VISITED_ROUTE111
8+
setflag FLAG_VISITED_ROUTE113
79
setvar VAR_CONTEST_HALL_STATE, 0
810
clearflag FLAG_CONTEST_SKETCH_CREATED
911
end

data/maps/FortreeCity/scripts.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ FortreeCity_MapScripts::
55

66
FortreeCity_OnTransition:
77
setflag FLAG_VISITED_FORTREE_CITY
8+
setflag FLAG_VISITED_ROUTE118
9+
setflag FLAG_VISITED_ROUTE119
10+
setflag FLAG_VISITED_ROUTE123
811
end
912

1013
FortreeCity_OnResume:

0 commit comments

Comments
 (0)