You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Merge branch 'master' of https://github.com/pret/pokecrystal
# Conflicts: # audio/engine.asm # constants/gfx_constants.asm # constants/map_data_constants.asm # constants/pokemon_data_constants.asm # constants/sprite_constants.asm # constants/wram_constants.asm # data/maps/data.asm # engine/battle/ai/scoring.asm # engine/battle/core.asm # engine/battle/effect_commands.asm # engine/battle/misc.asm # engine/battle_anims/getpokeballwobble.asm # engine/breeding.asm # engine/buy_sell_toss.asm # engine/decorations.asm # engine/events/battle_tower/battle_tower.asm # engine/events/battle_tower/rules.asm # engine/events/buena.asm # engine/events/bug_contest/contest_2.asm # engine/events/daycare.asm # engine/events/dratini.asm # engine/events/halloffame.asm # engine/events/happiness_egg.asm # engine/events/kurt.asm # engine/events/lucky_number.asm # engine/events/magnet_train.asm # engine/events/overworld.asm # engine/events/pokerus/pokerus.asm # engine/events/print_unown.asm # engine/events/print_unown_2.asm # engine/events/unown_walls.asm # engine/item_effects.asm # engine/link.asm # engine/mon_menu.asm # engine/player_object.asm # engine/routines/playslowcry.asm # engine/scripting.asm # engine/search.asm # engine/search2.asm # engine/specials.asm # engine/start_menu.asm # engine/timeset.asm # home/battle_vars.asm # home/map.asm # maps/GoldenrodUndergroundSwitchRoomEntrances.asm # maps/IlexForest.asm # maps/KrissHouse2F.asm # maps/Route39Barn.asm # mobile/mobile_12_2.asm # mobile/mobile_40.asm # mobile/mobile_5f.asm # wram.asm
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
CheckForLuckyNumberWinners: ; 4d87a
|
||||
xor a
|
||||
ld [ScriptVar], a
|
||||
ld [wScriptVar], a
|
||||
ld [wFoundMatchingIDInParty], a
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
and a
|
||||
ret z
|
||||
ld d, a
|
||||
ld hl, PartyMon1ID
|
||||
ld bc, PartySpecies
|
||||
ld hl, wPartyMon1ID
|
||||
ld bc, wPartySpecies
|
||||
.PartyLoop:
|
||||
ld a, [bc]
|
||||
inc bc
|
||||
@@ -79,7 +79,7 @@ CheckForLuckyNumberWinners: ; 4d87a
|
||||
cp EGG
|
||||
jr z, .SkipBoxMon
|
||||
|
||||
call .CompareLuckyNumberToMonID ; sets ScriptVar and CurPartySpecies appropriately
|
||||
call .CompareLuckyNumberToMonID ; sets wScriptVar and wCurPartySpecies appropriately
|
||||
jr nc, .SkipBoxMon
|
||||
ld a, 1
|
||||
ld [wFoundMatchingIDInParty], a
|
||||
@@ -100,14 +100,14 @@ CheckForLuckyNumberWinners: ; 4d87a
|
||||
jr c, .BoxesLoop
|
||||
|
||||
call CloseSRAM
|
||||
ld a, [ScriptVar]
|
||||
ld a, [wScriptVar]
|
||||
and a
|
||||
ret z ; found nothing
|
||||
farcall StubbedTrainerRankings_LuckyNumberShow
|
||||
ld a, [wFoundMatchingIDInParty]
|
||||
and a
|
||||
push af
|
||||
ld a, [CurPartySpecies]
|
||||
ld a, [wCurPartySpecies]
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetPokemonName
|
||||
ld hl, .FoundPartymonText
|
||||
@@ -124,17 +124,17 @@ CheckForLuckyNumberWinners: ; 4d87a
|
||||
push hl
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, Buffer1
|
||||
ld hl, wBuffer1
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
||||
call PrintNum
|
||||
ld hl, LuckyNumberDigit1Buffer
|
||||
ld hl, wLuckyNumberDigit1Buffer
|
||||
ld de, wLuckyIDNumber
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
||||
call PrintNum
|
||||
ld b, 5
|
||||
ld c, 0
|
||||
ld hl, LuckyNumberDigit5Buffer
|
||||
ld de, Buffer5
|
||||
ld hl, wLuckyNumberDigit5Buffer
|
||||
ld de, wBuffer5
|
||||
.loop
|
||||
ld a, [de]
|
||||
cp [hl]
|
||||
@@ -167,7 +167,7 @@ CheckForLuckyNumberWinners: ; 4d87a
|
||||
|
||||
.okay
|
||||
inc b
|
||||
ld a, [ScriptVar]
|
||||
ld a, [wScriptVar]
|
||||
and a
|
||||
jr z, .bettermatch
|
||||
cp b
|
||||
@@ -176,10 +176,10 @@ CheckForLuckyNumberWinners: ; 4d87a
|
||||
.bettermatch
|
||||
dec b
|
||||
ld a, b
|
||||
ld [ScriptVar], a
|
||||
ld [wScriptVar], a
|
||||
pop bc
|
||||
ld a, b
|
||||
ld [CurPartySpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
pop bc
|
||||
scf
|
||||
ret
|
||||
@@ -217,10 +217,10 @@ CheckForLuckyNumberWinners: ; 4d87a
|
||||
db "@"
|
||||
|
||||
PrintTodaysLuckyNumber: ; 4d9d3
|
||||
ld hl, StringBuffer3
|
||||
ld hl, wStringBuffer3
|
||||
ld de, wLuckyIDNumber
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
||||
call PrintNum
|
||||
ld a, "@"
|
||||
ld [StringBuffer3 + 5], a
|
||||
ld [wStringBuffer3 + 5], a
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user