File tree 3 files changed +17
-4
lines changed
3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ DoNPCTrade:
257
257
ld a , [ wPartyCount ]
258
258
dec a
259
259
ld [ wCurPartyMon ], a
260
- farcall ComputeNPCTrademonStats
260
+ farcall ComputeNPCTrademonStatsAndEggSteps
261
261
pop af
262
262
ld [ wCurPartyMon ], a
263
263
jmp PopAFBCDEHL
Original file line number Diff line number Diff line change 364
364
ld a , [ wPartyCount ]
365
365
dec a
366
366
ld [ wCurPartyMon ], a
367
- farcall ComputeNPCTrademonStats
367
+ farcall ComputeNPCTrademonStatsAndEggSteps
368
368
farcall GivePokerusToWonderTradeMon
369
369
pop af
370
370
ld [ wCurPartyMon ], a
Original file line number Diff line number Diff line change @@ -900,7 +900,7 @@ RemoveMonFromParty:
900
900
ld e , 0
901
901
farjp SetStorageBoxPointer
902
902
903
- ComputeNPCTrademonStats :
903
+ ComputeNPCTrademonStatsAndEggSteps :
904
904
ld a , MON_LEVEL
905
905
call GetPartyParamLocationAndValue
906
906
ld [ wCurPartyLevel ], a
@@ -929,14 +929,27 @@ ComputeNPCTrademonStats:
929
929
ld [ hld ], a
930
930
ld a , [ wCurForm ]
931
931
and IS_EGG_MASK
932
- ret nz
932
+ jr nz , .set_egg_steps
933
933
ld a , [ de ]
934
934
inc de
935
935
ld [ hli ], a
936
936
ld a , [ de ]
937
937
ld [ hl ], a
938
938
ret
939
939
940
+ .set_egg_steps
941
+ ld a , MON_HAPPINESS
942
+ call GetPartyParamLocationAndValue
943
+ ld a , [ wBaseEggSteps ]
944
+ and $ f
945
+ inc a
946
+ ld b , a
947
+ add a
948
+ add a
949
+ add b
950
+ ld [ hl ], a
951
+ ret
952
+
940
953
FixPlayerEVsAndStats:
941
954
farcall FixPlayerEVs
942
955
ld a , [ wPartyCount ]
You can’t perform that action at this time.
0 commit comments