diff options
author | dannye <corrnondacqb@yahoo.com> | 2016-09-19 14:10:00 -0500 |
---|---|---|
committer | dannye <corrnondacqb@yahoo.com> | 2016-09-20 00:44:17 -0500 |
commit | 028a362ebb447626f1a5bcccbc8712decb93e7be (patch) | |
tree | 6a1eef4b70b90e71a2e4e6597935aea34a5671f1 | |
parent | 032f961ef26a94caf385f6d5ae5823a0066d4d66 (diff) |
Give all Pokemon after Oak speechgive-all-mons
-rwxr-xr-x | engine/give_pokemon.asm | 3 | ||||
-rwxr-xr-x | engine/menu/naming_screen.asm | 4 | ||||
-rwxr-xr-x | engine/oak_speech.asm | 46 | ||||
-rwxr-xr-x | engine/save.asm | 48 |
4 files changed, 100 insertions, 1 deletions
diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm index 49596782..ef47ea9b 100755 --- a/engine/give_pokemon.asm +++ b/engine/give_pokemon.asm @@ -33,11 +33,13 @@ _GivePokemon: .next ld [hli], a ld [hl], "@" + ret ld hl, SetToBoxText call PrintText scf ret .boxFull + ret ld hl, BoxIsFullText call PrintText and a @@ -65,6 +67,7 @@ SetPokedexOwnedFlag: pop af ld [wd11e], a call GetMonName + ret ld hl, GotMonText jp PrintText diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index 2628da48..ef7fd31f 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -11,6 +11,7 @@ AskName: ld a, [wcf91] ld [wd11e], a call GetMonName +if 0 ld hl, DoYouWantToNicknameText call PrintText coord hl, 14, 7 @@ -18,10 +19,11 @@ AskName: ld a, TWO_OPTION_MENU ld [wTextBoxID], a call DisplayTextBoxID +endc pop hl ld a, [wCurrentMenuItem] and a - jr nz, .declinedNickname + jr .declinedNickname ld a, [wUpdateSpritesEnabled] push af xor a diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm index 43efecbc..64529433 100755 --- a/engine/oak_speech.asm +++ b/engine/oak_speech.asm @@ -150,6 +150,52 @@ OakSpeech: ld [wUpdateSpritesEnabled],a ld c,50 call DelayFrames + +; Give one of each 151 mons at level 100. +; Prompts a box change every 19 mons. + + ld de,PokeballTileGraphics + ld hl,vChars2 + $780 + lb bc, BANK(PokeballTileGraphics), $01 + call CopyVideoData + + ld hl, wPartyCount + ld a, [hl] + push hl + push af + ld a, 6 + ld [hl], a + + ld a, 001 +.loop + cp NUM_POKEMON + 1 + jr nc, .done + + push af + ld a, [wNumInBox] + cp MONS_PER_BOX - 1 + jr c, .dont_change_box + farcall IncBox +.dont_change_box + pop af + + push af + ld [wd11e], a + farcall PokedexToIndex + ld a, [wd11e] + ld b, a + ld c, 100 + call GivePokemon + pop af + + inc a + jr .loop + +.done + pop af + pop hl + ld [hl], a + call GBFadeOutToWhite jp ClearScreen OakSpeechText1: diff --git a/engine/save.asm b/engine/save.asm index 4fb2c4c8..4b4fa184 100755 --- a/engine/save.asm +++ b/engine/save.asm @@ -339,6 +339,54 @@ BoxSRAMPointerTable: dw sBox5 ; sBox11 dw sBox6 ; sBox12 +IncBox:: +; ld hl, WhenYouChangeBoxText +; call PrintText +; call YesNoChoice +; ld a, [wCurrentMenuItem] +; and a +; ret nz ; return if No was chosen + ld hl, wCurrentBoxNum + bit 7, [hl] ; is it the first time player is changing the box? + call z, EmptyAllSRAMBoxes ; if so, empty all boxes in SRAM +; call DisplayChangeBoxMenu +; call UpdateSprites +; ld hl, hFlags_0xFFF6 +; set 1, [hl] +; call HandleMenuInput +; ld hl, hFlags_0xFFF6 +; res 1, [hl] +; bit 1, a ; pressed b +; ret nz + call GetBoxSRAMLocation + ld e, l + ld d, h + ld hl, wBoxDataStart + call CopyBoxToOrFromSRAM ; copy old box from WRAM to SRAM +; ld a, [wCurrentMenuItem] + ld a, [wCurrentBoxNum] + inc a + set 7, a + ld [wCurrentBoxNum], a + call GetBoxSRAMLocation + ld de, wBoxDataStart + call CopyBoxToOrFromSRAM ; copy new box from SRAM to WRAM + ld hl, wMapTextPtr + ld de, wChangeBoxSavedMapTextPointer + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + call RestoreMapTextPointer + call SaveSAVtoSRAM + ld hl, wChangeBoxSavedMapTextPointer + call SetMapTextPointer +; ld a, SFX_SAVE +; call PlaySoundWaitForCurrent +; call WaitForSoundToFinish + ret + ChangeBox:: ld hl, WhenYouChangeBoxText call PrintText |