From 757858f3a32350082c246e96051645c064fdca82 Mon Sep 17 00:00:00 2001 From: E Date: Sat, 28 Nov 2020 14:18:00 -0600 Subject: * Adding script that runs after tutorial battle with Sam. * Adding Impostor Professor Oak effect --- src/engine/bank03.asm | 45 ++++++++++++++++++++++++++++++++++++++++- src/engine/effect_functions.asm | 33 +++++++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 2 deletions(-) (limited to 'src/engine') diff --git a/src/engine/bank03.asm b/src/engine/bank03.asm index 07e903e..8edbdde 100644 --- a/src/engine/bank03.asm +++ b/src/engine/bank03.asm @@ -3416,7 +3416,50 @@ Script_d827: ; d827 (3:5827) run_command ScriptCommand_QuitScriptFully ; 0xd82d - INCROM $d82d, $d880 + INCROM $d82d, $d834 + +AfterTutorialBattleScript: ; d834 (3:5834) + start_script + run_command ScriptCommand_PrintTextString + tx Text05eb + run_command ScriptCommand_PrintTextString + tx Text05ef + run_command ScriptCommand_CloseTextBox + run_command ScriptCommand_MoveActiveNPC + dw $5896 + run_command ScriptCommand_SetPlayerDirection + db NORTH + run_command ScriptCommand_MovePlayer + db NORTH + db $01 + run_command ScriptCommand_MovePlayer + db NORTH + db $01 + run_command ScriptCommand_MovePlayer + db NORTH + db $01 + run_command ScriptCommand_SetPlayerDirection + db EAST + run_command ScriptCommand_MovePlayer + db EAST + db $01 + run_command ScriptCommand_MovePlayer + db EAST + db $01 + run_command ScriptCommand_SetPlayerDirection + db NORTH + run_command ScriptCommand_PrintTextString + tx Text05f0 + run_command ScriptCommand_CloseTextBox + run_command Func_ccdc + tx Text05f1 + run_command ScriptCommand_CloseTextBox + run_command ScriptCommand_PrintTextString + tx Text05f2 + run_command Func_d271 +; 0xd860 + + INCROM $d860, $d880 NPCMovement_d880: ; d880 (3:5880) db EAST diff --git a/src/engine/effect_functions.asm b/src/engine/effect_functions.asm index 75b0f76..e3c4d90 100644 --- a/src/engine/effect_functions.asm +++ b/src/engine/effect_functions.asm @@ -763,4 +763,35 @@ Func_2cbfb: ; 2cbfb (b:4bfb) ret ; 0x2cc0a - INCROM $2cc0a, $30000 + INCROM $2cc0a, $2f4e1 + +ImposterProssorOakEffect: ; 2f4e1 (b:74e1) + call SwapTurn + call CreateHandCardList + call SortCardsInDuelTempListByID + ld hl, wDuelTempList +.return_hand_to_deck_loop + ld a, [hli] + cp $ff + jr z, .shuffle + call RemoveCardFromHand + call ReturnCardToDeck + jr .return_hand_to_deck_loop +.shuffle + call Func_2c0bd + ld a, $07 + bank1call $4935 + ld c, $07 +.draw_loop + call DrawCardFromDeck + jr c, .revert_turn_to_user + call AddCardToHand + dec c + jr nz, .draw_loop +.revert_turn_to_user + call SwapTurn + ret +; 0x2f513 + + + INCROM $2f513, $30000 -- cgit v1.2.3 From bc110e289dc9bb683adcbc1656d634c44bed4f58 Mon Sep 17 00:00:00 2001 From: E Date: Sat, 28 Nov 2020 14:34:57 -0600 Subject: fixing spelling errors --- src/engine/effect_functions.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/engine') diff --git a/src/engine/effect_functions.asm b/src/engine/effect_functions.asm index e3c4d90..f64953b 100644 --- a/src/engine/effect_functions.asm +++ b/src/engine/effect_functions.asm @@ -765,7 +765,7 @@ Func_2cbfb: ; 2cbfb (b:4bfb) INCROM $2cc0a, $2f4e1 -ImposterProssorOakEffect: ; 2f4e1 (b:74e1) +ImpostorProfessorOakEffect: ; 2f4e1 (b:74e1) call SwapTurn call CreateHandCardList call SortCardsInDuelTempListByID -- cgit v1.2.3 From 41796de91581f586b401cf01eb0852095564e202 Mon Sep 17 00:00:00 2001 From: E Date: Sun, 29 Nov 2020 14:23:15 -0600 Subject: Updating spelling + adding NPCMovement_d896 --- src/engine/bank03.asm | 16 ++++++++++++++-- src/engine/effect_functions.asm | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'src/engine') diff --git a/src/engine/bank03.asm b/src/engine/bank03.asm index 8edbdde..1f1e690 100644 --- a/src/engine/bank03.asm +++ b/src/engine/bank03.asm @@ -3426,7 +3426,7 @@ AfterTutorialBattleScript: ; d834 (3:5834) tx Text05ef run_command ScriptCommand_CloseTextBox run_command ScriptCommand_MoveActiveNPC - dw $5896 + dw NPCMovement_d896 run_command ScriptCommand_SetPlayerDirection db NORTH run_command ScriptCommand_MovePlayer @@ -3490,8 +3490,20 @@ NPCMovement_d88b: ; d88b (3:588b) NPCMovement_d894: ; d894 (4:5894) db SOUTH | NO_MOVE db $ff + +NPCMovement_d896: ; d896 (3:5896) + db NORTH + db NORTH + db NORTH + db EAST + db EAST + db EAST + db EAST + db SOUTH | NO_MOVE + db $ff +; 0xd89f - INCROM $d896, $d932 + INCROM $d89f, $d932 Script_d932: ; d932 (3:5932) start_script diff --git a/src/engine/effect_functions.asm b/src/engine/effect_functions.asm index f64953b..dae33a0 100644 --- a/src/engine/effect_functions.asm +++ b/src/engine/effect_functions.asm @@ -765,7 +765,7 @@ Func_2cbfb: ; 2cbfb (b:4bfb) INCROM $2cc0a, $2f4e1 -ImpostorProfessorOakEffect: ; 2f4e1 (b:74e1) +ImposterProfessorOakEffect: ; 2f4e1 (b:74e1) call SwapTurn call CreateHandCardList call SortCardsInDuelTempListByID -- cgit v1.2.3