mirror of
https://github.com/thornAvery/jep-hack.git
synced 2025-09-17 02:30:50 +12:00
Safari Game battle type & bug fix
This adds the restoration of the Safari Zone from Pokemon October. There isn't a proper place for this yet, but there will be soon!
It seems to have issues with tiles, which I am assuming to either be the tilemap clearing or something relating to Zeta's custom ball palettes, since I had to add the Safari Ball. Can you get to that, @ZetaNull?
2ff835730b
also fixed the unnumbered route errors.
This commit is contained in:
parent
74506bd7b0
commit
d3fbd1f846
|
@ -93,7 +93,7 @@ Additionally, there have been many wild encounter tweaks. View this document for
|
||||||
- Rezzo (GSC-specific advice)
|
- Rezzo (GSC-specific advice)
|
||||||
- Old Dance Jacket (GSC-specific advice)
|
- Old Dance Jacket (GSC-specific advice)
|
||||||
- Minamitoku (SW97 demo translation commentary [here](https://www.youtube.com/watch?v=Pe1vsKRl7_M&ab_channel=Minamitoku))
|
- Minamitoku (SW97 demo translation commentary [here](https://www.youtube.com/watch?v=Pe1vsKRl7_M&ab_channel=Minamitoku))
|
||||||
- ZoomTen - Honey Pot & Honey Grandma features from Pokemon October, commits [here](https://github.com/pokeachromicdevs/pokeoctober/commit/d00cd6fafdbe5069d2cc452a154942f82f7fceb6), [here](https://github.com/pokeachromicdevs/pokeoctober/commit/1a6f3e4f0307656018f02d4981c973efa814a248), and [here](https://github.com/pokeachromicdevs/pokeoctober/commit/8114fead91828dd6d986fe120d6c5cd5e3c6cbf6).
|
- ZoomTen - Honey Pot & Honey Grandma features from Pokemon October, commits [here](https://github.com/pokeachromicdevs/pokeoctober/commit/d00cd6fafdbe5069d2cc452a154942f82f7fceb6), [here](https://github.com/pokeachromicdevs/pokeoctober/commit/1a6f3e4f0307656018f02d4981c973efa814a248), and [here](https://github.com/pokeachromicdevs/pokeoctober/commit/8114fead91828dd6d986fe120d6c5cd5e3c6cbf6). Safari Game restoration [here](https://github.com/pokeachromicdevs/pokeoctober/commit/2ff835730b2a61a757ad67f13e50480c965d2a0c}.
|
||||||
- ausma (KEP Developer, legacy)
|
- ausma (KEP Developer, legacy)
|
||||||
|
|
||||||
# Sprite Credits
|
# Sprite Credits
|
||||||
|
|
|
@ -85,7 +85,7 @@ DEF SPDSPCDV_SHINY EQU $AA
|
||||||
const_def
|
const_def
|
||||||
const BATTLETYPE_NORMAL
|
const BATTLETYPE_NORMAL
|
||||||
const BATTLETYPE_CANLOSE
|
const BATTLETYPE_CANLOSE
|
||||||
const BATTLETYPE_DEBUG
|
const BATTLETYPE_SAFARI
|
||||||
const BATTLETYPE_TUTORIAL
|
const BATTLETYPE_TUTORIAL
|
||||||
const BATTLETYPE_FISH
|
const BATTLETYPE_FISH
|
||||||
const BATTLETYPE_ROAMING
|
const BATTLETYPE_ROAMING
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
const SUPER_REPEL ; 2a
|
const SUPER_REPEL ; 2a
|
||||||
const MAX_REPEL ; 2b
|
const MAX_REPEL ; 2b
|
||||||
const DIRE_HIT ; 2c
|
const DIRE_HIT ; 2c
|
||||||
const ITEM_2D ; 2d
|
const SAFARI_BALL ; 2d
|
||||||
const FRESH_WATER ; 2e
|
const FRESH_WATER ; 2e
|
||||||
const SODA_POP ; 2f
|
const SODA_POP ; 2f
|
||||||
const LEMONADE ; 30
|
const LEMONADE ; 30
|
||||||
|
@ -314,6 +314,5 @@ DEF USE_SCRIPT_VAR EQU $00
|
||||||
DEF ITEM_FROM_MEM EQU $ff
|
DEF ITEM_FROM_MEM EQU $ff
|
||||||
|
|
||||||
; leftovers from red
|
; leftovers from red
|
||||||
DEF SAFARI_BALL EQU $08 ; MOON_STONE
|
|
||||||
DEF MOON_STONE_RED EQU $0a ; BURN_HEAL
|
DEF MOON_STONE_RED EQU $0a ; BURN_HEAL
|
||||||
DEF FULL_HEAL_RED EQU $34 ; X_SPEED
|
DEF FULL_HEAL_RED EQU $34 ; X_SPEED
|
||||||
|
|
|
@ -96,8 +96,8 @@ ItemAttributes:
|
||||||
item_attribute 700, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
|
item_attribute 700, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
|
||||||
; DIRE_HIT
|
; DIRE_HIT
|
||||||
item_attribute 650, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
|
item_attribute 650, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
|
||||||
; ITEM_2D
|
; SAFARI_BALL, was ITEM_2D
|
||||||
item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
|
item_attribute 0, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
|
||||||
; FRESH_WATER
|
; FRESH_WATER
|
||||||
item_attribute 200, HELD_NONE, 50, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
|
item_attribute 200, HELD_NONE, 50, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
|
||||||
; SODA_POP
|
; SODA_POP
|
||||||
|
|
|
@ -979,3 +979,7 @@ ClubFossilDesc:
|
||||||
HoneyPotDesc:
|
HoneyPotDesc:
|
||||||
db "A pot for storing"
|
db "A pot for storing"
|
||||||
next "SWEET HONEY.@"
|
next "SWEET HONEY.@"
|
||||||
|
|
||||||
|
SafariBallDesc:
|
||||||
|
db "An ULTRA BALL"
|
||||||
|
next "painted green.@"
|
||||||
|
|
|
@ -44,7 +44,7 @@ ItemNames::
|
||||||
li "SUPER REPEL"
|
li "SUPER REPEL"
|
||||||
li "MAX REPEL"
|
li "MAX REPEL"
|
||||||
li "DIRE HIT"
|
li "DIRE HIT"
|
||||||
li "TERU-SAMA"
|
li "SAFARI BALL"
|
||||||
li "FRESH WATER"
|
li "FRESH WATER"
|
||||||
li "SODA POP"
|
li "SODA POP"
|
||||||
li "LEMONADE"
|
li "LEMONADE"
|
||||||
|
|
|
@ -377,7 +377,7 @@ ENDM
|
||||||
|
|
||||||
map_attributes SilentHills, SILENT_HILLS, $05, EAST | WEST ; Add Prince connections later
|
map_attributes SilentHills, SILENT_HILLS, $05, EAST | WEST ; Add Prince connections later
|
||||||
connection west, Route49, ROUTE_49, 0
|
connection west, Route49, ROUTE_49, 0
|
||||||
connection east, UnnumberedRoute, UNNUMBERED_ROUTE, 0
|
connection east, Route66, ROUTE_66, 0
|
||||||
|
|
||||||
map_attributes Route49, ROUTE_49, $05, EAST | WEST
|
map_attributes Route49, ROUTE_49, $05, EAST | WEST
|
||||||
connection east, SilentHills, SILENT_HILLS, $00, 0
|
connection east, SilentHills, SILENT_HILLS, $00, 0
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
BattleText:: ; used only for BANK(BattleText)
|
BattleText:: ; used only for BANK(BattleText)
|
||||||
|
|
||||||
|
BattleText_ThrewRock:
|
||||||
|
text "<PLAYER> threw a"
|
||||||
|
line "rock."
|
||||||
|
prompt
|
||||||
|
|
||||||
|
BattleText_ThrewBait:
|
||||||
|
text "<PLAYER> threw"
|
||||||
|
line "some bait."
|
||||||
|
prompt
|
||||||
|
|
||||||
BattleText_PlayerPickedUpPayDayMoney:
|
BattleText_PlayerPickedUpPayDayMoney:
|
||||||
text "<PLAYER> picked up"
|
text "<PLAYER> picked up"
|
||||||
line "¥@"
|
line "¥@"
|
||||||
|
|
|
@ -53,8 +53,8 @@ DoBattle:
|
||||||
jp z, LostBattle
|
jp z, LostBattle
|
||||||
call SafeLoadTempTilemapToTilemap
|
call SafeLoadTempTilemapToTilemap
|
||||||
ld a, [wBattleType]
|
ld a, [wBattleType]
|
||||||
cp BATTLETYPE_DEBUG
|
cp BATTLETYPE_SAFARI
|
||||||
jp z, .tutorial_debug
|
jp z, SafariBattle
|
||||||
cp BATTLETYPE_TUTORIAL
|
cp BATTLETYPE_TUTORIAL
|
||||||
jp z, .tutorial_debug
|
jp z, .tutorial_debug
|
||||||
xor a
|
xor a
|
||||||
|
@ -115,6 +115,23 @@ DoBattle:
|
||||||
.tutorial_debug
|
.tutorial_debug
|
||||||
jp BattleMenu
|
jp BattleMenu
|
||||||
|
|
||||||
|
SafariBattle:
|
||||||
|
.loop
|
||||||
|
call CheckSafariBattleOver
|
||||||
|
ret c
|
||||||
|
call BattleMenu
|
||||||
|
ret c
|
||||||
|
ld a, [wBattleEnded]
|
||||||
|
and a
|
||||||
|
ret nz
|
||||||
|
call HandleSafariAngerEatingStatus
|
||||||
|
call CheckSafariMonRan
|
||||||
|
ret c
|
||||||
|
ld a, [wBattleEnded]
|
||||||
|
and a
|
||||||
|
ret nz
|
||||||
|
jr .loop
|
||||||
|
|
||||||
WildFled_EnemyFled_LinkBattleCanceled:
|
WildFled_EnemyFled_LinkBattleCanceled:
|
||||||
call SafeLoadTempTilemapToTilemap
|
call SafeLoadTempTilemapToTilemap
|
||||||
ld a, [wBattleResult]
|
ld a, [wBattleResult]
|
||||||
|
@ -559,6 +576,21 @@ DetermineMoveOrder:
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
CheckSafariBattleOver:
|
||||||
|
IF DEF(_DEBUG) ; Use to test the Safari Game in the Debug Room.
|
||||||
|
ld a, 20
|
||||||
|
ld [wSafariBallsRemaining], a
|
||||||
|
ENDC
|
||||||
|
ld a, [wSafariBallsRemaining]
|
||||||
|
and a
|
||||||
|
ret nz
|
||||||
|
ld a, [wBattleResult]
|
||||||
|
and $c0
|
||||||
|
add $2
|
||||||
|
ld [wBattleResult], a
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
|
||||||
CheckContestBattleOver:
|
CheckContestBattleOver:
|
||||||
ld a, [wBattleType]
|
ld a, [wBattleType]
|
||||||
cp BATTLETYPE_CONTEST
|
cp BATTLETYPE_CONTEST
|
||||||
|
@ -3654,7 +3686,7 @@ CheckIfCurPartyMonIsFitToFight:
|
||||||
TryToRunAwayFromBattle:
|
TryToRunAwayFromBattle:
|
||||||
; Run away from battle, with or without item
|
; Run away from battle, with or without item
|
||||||
ld a, [wBattleType]
|
ld a, [wBattleType]
|
||||||
cp BATTLETYPE_DEBUG
|
cp BATTLETYPE_SAFARI
|
||||||
jp z, .can_escape
|
jp z, .can_escape
|
||||||
cp BATTLETYPE_CONTEST
|
cp BATTLETYPE_CONTEST
|
||||||
jp z, .can_escape
|
jp z, .can_escape
|
||||||
|
@ -4858,7 +4890,7 @@ BattleMenu:
|
||||||
call LoadTempTilemapToTilemap
|
call LoadTempTilemapToTilemap
|
||||||
|
|
||||||
ld a, [wBattleType]
|
ld a, [wBattleType]
|
||||||
cp BATTLETYPE_DEBUG
|
cp BATTLETYPE_SAFARI
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
cp BATTLETYPE_TUTORIAL
|
cp BATTLETYPE_TUTORIAL
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
|
@ -4870,10 +4902,15 @@ BattleMenu:
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
ld a, [wBattleType]
|
ld a, [wBattleType]
|
||||||
|
cp BATTLETYPE_SAFARI
|
||||||
|
jr z, .safari_game
|
||||||
cp BATTLETYPE_CONTEST
|
cp BATTLETYPE_CONTEST
|
||||||
jr nz, .not_contest
|
jr nz, .not_contest
|
||||||
farcall ContestBattleMenu
|
farcall ContestBattleMenu
|
||||||
jr .next
|
jr .next
|
||||||
|
.safari_game
|
||||||
|
farcall SafariBattleMenu
|
||||||
|
jr .next
|
||||||
.not_contest
|
.not_contest
|
||||||
|
|
||||||
; Auto input: choose "ITEM"
|
; Auto input: choose "ITEM"
|
||||||
|
@ -4899,7 +4936,87 @@ BattleMenu:
|
||||||
jp z, BattleMenu_Run
|
jp z, BattleMenu_Run
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
|
BattleMenu_Bait:
|
||||||
|
ld hl, BattleText_ThrewBait
|
||||||
|
call StdBattleTextbox
|
||||||
|
ld hl, wEnemyMonCatchRate
|
||||||
|
srl [hl] ; halve catch rate
|
||||||
|
ld hl, wSafariMonEating
|
||||||
|
ld de, wSafariMonAngerCount
|
||||||
|
jr BattleMenu_BaitRock_Common
|
||||||
|
|
||||||
|
BattleMenu_Rock:
|
||||||
|
ld hl, BattleText_ThrewRock
|
||||||
|
call StdBattleTextbox
|
||||||
|
ld hl, wEnemyMonCatchRate
|
||||||
|
ld a, [hl]
|
||||||
|
add a ; double catch rate
|
||||||
|
jr nc, .noCarry
|
||||||
|
ld a, $ff
|
||||||
|
.noCarry
|
||||||
|
ld [hl], a
|
||||||
|
ld hl, wSafariMonAngerCount
|
||||||
|
ld de, wSafariMonEating
|
||||||
|
|
||||||
|
BattleMenu_BaitRock_Common:
|
||||||
|
xor a
|
||||||
|
ld [de], a ; zero the Eating counter (rock) or the Anger counter (bait)
|
||||||
|
.randomLoop ; loop until a number less than 5 is generated
|
||||||
|
call BattleRandom
|
||||||
|
and 7
|
||||||
|
cp 5
|
||||||
|
jr nc, .randomLoop
|
||||||
|
inc a ; increment the random number, giving a range from 1 to 5 inclusive
|
||||||
|
ld b, a
|
||||||
|
ld a, [hl]
|
||||||
|
add b ; increase Eating or Anger counter appropriately
|
||||||
|
jr nc, .noCarry
|
||||||
|
ld a, $ff
|
||||||
|
.noCarry
|
||||||
|
ld [hl], a
|
||||||
|
and a
|
||||||
|
ret
|
||||||
|
|
||||||
|
CheckSafariMonRan:
|
||||||
|
; Wildmon always runs when you are out of Safari Balls
|
||||||
|
ld a, [wSafariBallsRemaining]
|
||||||
|
and a
|
||||||
|
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
|
; otherwise, check its speed, bait, and rock factors
|
||||||
|
; this probably could stand to be cleaned up or rewritten later
|
||||||
|
; it is basically taken directly from Gen 1
|
||||||
|
ld a, [wEnemyMonSpeed + 1]
|
||||||
|
add a
|
||||||
|
ld b, a ; init b (which is later compared with random value) to (enemy speed % 256) * 2
|
||||||
|
jp c, WildFled_EnemyFled_LinkBattleCanceled ; if (enemy speed % 256) > 127, the enemy runs
|
||||||
|
ld a, [wSafariMonEating]
|
||||||
|
and a ; is bait factor 0?
|
||||||
|
jr z, .checkEscapeFactor
|
||||||
|
; bait factor is not 0
|
||||||
|
; divide b by 4 (making the mon less likely to run)
|
||||||
|
srl b
|
||||||
|
srl b
|
||||||
|
.checkEscapeFactor
|
||||||
|
ld a, [wSafariMonAngerCount]
|
||||||
|
and a ; is escape factor 0?
|
||||||
|
jr z, .compareWithRandomValue
|
||||||
|
; escape factor is not 0
|
||||||
|
; multiply b by 2 (making the mon more likely to run)
|
||||||
|
sla b
|
||||||
|
jr nc, .compareWithRandomValue
|
||||||
|
; cap b at 255
|
||||||
|
ld b, $ff
|
||||||
|
.compareWithRandomValue
|
||||||
|
call BattleRandom
|
||||||
|
cp b
|
||||||
|
ret nc
|
||||||
|
jp WildFled_EnemyFled_LinkBattleCanceled ; if b was greater than the random value, the enemy runs
|
||||||
|
|
||||||
BattleMenu_Fight:
|
BattleMenu_Fight:
|
||||||
|
; replace Fight with Safari Ball
|
||||||
|
ld a, [wBattleType]
|
||||||
|
cp BATTLETYPE_SAFARI
|
||||||
|
jr z, BattleMenu_SafariBall
|
||||||
xor a
|
xor a
|
||||||
ld [wNumFleeAttempts], a
|
ld [wNumFleeAttempts], a
|
||||||
call SafeLoadTempTilemapToTilemap
|
call SafeLoadTempTilemapToTilemap
|
||||||
|
@ -4932,10 +5049,14 @@ LoadBattleMenu2:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleMenu_Pack:
|
BattleMenu_Pack:
|
||||||
|
; replace Pack with Rock
|
||||||
|
ld a, [wBattleType]
|
||||||
|
cp BATTLETYPE_SAFARI
|
||||||
|
jp z, BattleMenu_Rock
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jp nz, .ItemsCantBeUsed
|
jp nz, BattleMenu_SafariBall.ItemsCantBeUsed
|
||||||
|
BattleMenu_SafariBall:
|
||||||
ld a, [wInBattleTowerBattle]
|
ld a, [wInBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
jp nz, .ItemsCantBeUsed
|
jp nz, .ItemsCantBeUsed
|
||||||
|
@ -4947,6 +5068,8 @@ BattleMenu_Pack:
|
||||||
jr z, .tutorial
|
jr z, .tutorial
|
||||||
cp BATTLETYPE_CONTEST
|
cp BATTLETYPE_CONTEST
|
||||||
jr z, .contest
|
jr z, .contest
|
||||||
|
cp BATTLETYPE_SAFARI
|
||||||
|
jr z, .safari
|
||||||
|
|
||||||
farcall BattlePack
|
farcall BattlePack
|
||||||
ld a, [wBattlePlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
|
@ -4961,6 +5084,12 @@ BattleMenu_Pack:
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
jr .got_item
|
jr .got_item
|
||||||
|
|
||||||
|
.safari
|
||||||
|
ld a, SAFARI_BALL
|
||||||
|
ld [wCurItem], a
|
||||||
|
call DoItemEffect
|
||||||
|
jr .UseItem
|
||||||
|
|
||||||
.contest
|
.contest
|
||||||
ld a, PARK_BALL
|
ld a, PARK_BALL
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
|
@ -4996,6 +5125,7 @@ BattleMenu_Pack:
|
||||||
cp BALL
|
cp BALL
|
||||||
jr z, .ball
|
jr z, .ball
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
|
call ClearTilemap
|
||||||
|
|
||||||
.ball
|
.ball
|
||||||
xor a
|
xor a
|
||||||
|
@ -5005,14 +5135,17 @@ BattleMenu_Pack:
|
||||||
ld a, [wBattleType]
|
ld a, [wBattleType]
|
||||||
cp BATTLETYPE_TUTORIAL
|
cp BATTLETYPE_TUTORIAL
|
||||||
jr z, .tutorial2
|
jr z, .tutorial2
|
||||||
call GetBattleMonBackpic
|
cp BATTLETYPE_SAFARI
|
||||||
|
call nz, GetMonBackpic
|
||||||
|
|
||||||
.tutorial2
|
.tutorial2
|
||||||
call GetEnemyMonFrontpic
|
call GetEnemyMonFrontpic
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
call UpdateBattleHUDs
|
ld a, [wBattleType]
|
||||||
|
cp BATTLETYPE_SAFARI
|
||||||
|
call nz, UpdateBattleHUDs
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call LoadTilemapToTempTilemap
|
call LoadTilemapToTempTilemap
|
||||||
call ClearWindowData
|
call ClearWindowData
|
||||||
|
@ -5032,6 +5165,10 @@ BattleMenu_Pack:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleMenu_PKMN:
|
BattleMenu_PKMN:
|
||||||
|
; replace Pkmn with Bait
|
||||||
|
ld a, [wBattleType]
|
||||||
|
cp BATTLETYPE_SAFARI
|
||||||
|
jp z, BattleMenu_Bait
|
||||||
call LoadStandardMenuHeader
|
call LoadStandardMenuHeader
|
||||||
BattleMenuPKMN_ReturnFromStats:
|
BattleMenuPKMN_ReturnFromStats:
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
|
@ -7740,15 +7877,11 @@ GoodComeBackText:
|
||||||
text_far _GoodComeBackText
|
text_far _GoodComeBackText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
TextJump_ComeBack: ; unreferenced
|
|
||||||
ld hl, ComeBackText
|
|
||||||
ret
|
|
||||||
|
|
||||||
ComeBackText:
|
ComeBackText:
|
||||||
text_far _ComeBackText
|
text_far _ComeBackText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
HandleSafariAngerEatingStatus: ; unreferenced
|
HandleSafariAngerEatingStatus:
|
||||||
ld hl, wSafariMonEating
|
ld hl, wSafariMonEating
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
|
|
|
@ -9,8 +9,8 @@ LoadBattleMenu:
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SafariBattleMenu: ; unreferenced
|
SafariBattleMenu:
|
||||||
ld hl, SafariBattleMenuHeader
|
ld hl, SafariBattleMenuDataHeader
|
||||||
call LoadMenuHeader
|
call LoadMenuHeader
|
||||||
jr CommonBattleMenu
|
jr CommonBattleMenu
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ BattleMenuHeader:
|
||||||
db "PACK@"
|
db "PACK@"
|
||||||
db "RUN@"
|
db "RUN@"
|
||||||
|
|
||||||
SafariBattleMenuHeader:
|
SafariBattleMenuDataHeader:
|
||||||
db MENU_BACKUP_TILES ; flags
|
db MENU_BACKUP_TILES ; flags
|
||||||
menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
|
menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
|
||||||
dw .MenuData
|
dw .MenuData
|
||||||
|
@ -61,13 +61,13 @@ SafariBattleMenuHeader:
|
||||||
dba .PrintSafariBallsRemaining
|
dba .PrintSafariBallsRemaining
|
||||||
|
|
||||||
.Text:
|
.Text:
|
||||||
db "サファりボール× @" ; "SAFARI BALL× @"
|
db "BALL× @" ; "SAFARI BALL× @"
|
||||||
db "エサをなげる@" ; "THROW BAIT"
|
db "BAIT@" ; "THROW BAIT"
|
||||||
db "いしをなげる@" ; "THROW ROCK"
|
db "ROCK@" ; "THROW ROCK"
|
||||||
db "にげる@" ; "RUN"
|
db "RUN@" ; "RUN"
|
||||||
|
|
||||||
.PrintSafariBallsRemaining:
|
.PrintSafariBallsRemaining:
|
||||||
hlcoord 17, 13
|
hlcoord 7, 14
|
||||||
ld de, wSafariBallsRemaining
|
ld de, wSafariBallsRemaining
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||||
call PrintNum
|
call PrintNum
|
||||||
|
|
|
@ -58,7 +58,7 @@ ItemEffects:
|
||||||
dw SuperRepelEffect ; SUPER_REPEL
|
dw SuperRepelEffect ; SUPER_REPEL
|
||||||
dw MaxRepelEffect ; MAX_REPEL
|
dw MaxRepelEffect ; MAX_REPEL
|
||||||
dw DireHitEffect ; DIRE_HIT
|
dw DireHitEffect ; DIRE_HIT
|
||||||
dw NoEffect ; ITEM_2D
|
dw PokeBallEffect ; SAFARI_BALL, was ITEM_2D
|
||||||
dw RestoreHPEffect ; FRESH_WATER
|
dw RestoreHPEffect ; FRESH_WATER
|
||||||
dw RestoreHPEffect ; SODA_POP
|
dw RestoreHPEffect ; SODA_POP
|
||||||
dw RestoreHPEffect ; LEMONADE
|
dw RestoreHPEffect ; LEMONADE
|
||||||
|
@ -240,6 +240,8 @@ PokeBallEffect:
|
||||||
ld a, [wBattleType]
|
ld a, [wBattleType]
|
||||||
cp BATTLETYPE_CONTEST ; Fixes the Park Ball corrupting graphics when used outside of a Contest
|
cp BATTLETYPE_CONTEST ; Fixes the Park Ball corrupting graphics when used outside of a Contest
|
||||||
call nz, ReturnToBattle_UseBall
|
call nz, ReturnToBattle_UseBall
|
||||||
|
cp BATTLETYPE_SAFARI
|
||||||
|
call nz, ReturnToBattle_UseBall
|
||||||
|
|
||||||
ld hl, wOptions
|
ld hl, wOptions
|
||||||
res NO_TEXT_SCROLL, [hl]
|
res NO_TEXT_SCROLL, [hl]
|
||||||
|
@ -691,8 +693,8 @@ PokeBallEffect:
|
||||||
ld a, [wBattleType]
|
ld a, [wBattleType]
|
||||||
cp BATTLETYPE_TUTORIAL
|
cp BATTLETYPE_TUTORIAL
|
||||||
ret z
|
ret z
|
||||||
cp BATTLETYPE_DEBUG
|
cp BATTLETYPE_SAFARI
|
||||||
ret z
|
jr z, .used_safari_ball
|
||||||
cp BATTLETYPE_CONTEST
|
cp BATTLETYPE_CONTEST
|
||||||
jr z, .used_park_ball
|
jr z, .used_park_ball
|
||||||
|
|
||||||
|
@ -714,6 +716,11 @@ PokeBallEffect:
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
.used_safari_ball
|
||||||
|
ld hl, wSafariBallsRemaining
|
||||||
|
dec [hl]
|
||||||
|
ret
|
||||||
|
|
||||||
BallMultiplierFunctionTable:
|
BallMultiplierFunctionTable:
|
||||||
; table of routines that increase or decrease the catch rate based on
|
; table of routines that increase or decrease the catch rate based on
|
||||||
; which ball is used in a certain situation.
|
; which ball is used in a certain situation.
|
||||||
|
|
|
@ -60,7 +60,7 @@ DebugPokemon4Script:
|
||||||
cry NIDORAN_M
|
cry NIDORAN_M
|
||||||
pause 15
|
pause 15
|
||||||
closetext
|
closetext
|
||||||
loadvar VAR_BATTLETYPE, BATTLETYPE_NORMAL
|
loadvar VAR_BATTLETYPE, BATTLETYPE_SAFARI
|
||||||
loadwildmon BIPULLA, 60
|
loadwildmon BIPULLA, 60
|
||||||
startbattle
|
startbattle
|
||||||
reloadmapafterbattle
|
reloadmapafterbattle
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
object_const_def
|
object_const_def
|
||||||
|
|
||||||
UnnumberedRoute_MapScripts:
|
Route66_MapScripts:
|
||||||
def_scene_scripts
|
def_scene_scripts
|
||||||
|
|
||||||
def_callbacks
|
def_callbacks
|
||||||
|
|
||||||
UnnumberedRouteSign1Script:
|
Route66Sign1Script:
|
||||||
jumptext UnnumberedRouteSign1Text
|
jumptext Route66Sign1Text
|
||||||
|
|
||||||
UnnumberedRouteSign1Text:
|
Route66Sign1Text:
|
||||||
text "Route XX"
|
text "ROUTE 66"
|
||||||
line "WEST: SILENT"
|
line "WEST: SILENT"
|
||||||
cont "HILLS"
|
cont "HILLS"
|
||||||
|
|
||||||
|
@ -17,10 +17,10 @@ UnnumberedRouteSign1Text:
|
||||||
line "PATH"
|
line "PATH"
|
||||||
done
|
done
|
||||||
|
|
||||||
UnnumberedRouteSign2Script:
|
Route66Sign2Script:
|
||||||
jumptext UnnumberedRouteSign2Text
|
jumptext Route66Sign2Text
|
||||||
|
|
||||||
UnnumberedRouteSign2Text:
|
Route66Sign2Text:
|
||||||
text "TRAINER TIPS"
|
text "TRAINER TIPS"
|
||||||
|
|
||||||
para "If you use DEF-"
|
para "If you use DEF-"
|
||||||
|
@ -119,7 +119,7 @@ FisherBranAfterBattleText:
|
||||||
line "incredible?"
|
line "incredible?"
|
||||||
done
|
done
|
||||||
|
|
||||||
UnnumberedRoute_MapEvents:
|
Route66_MapEvents:
|
||||||
db 0, 0 ; filler
|
db 0, 0 ; filler
|
||||||
|
|
||||||
def_warp_events
|
def_warp_events
|
||||||
|
@ -128,8 +128,8 @@ UnnumberedRoute_MapEvents:
|
||||||
def_coord_events
|
def_coord_events
|
||||||
|
|
||||||
def_bg_events
|
def_bg_events
|
||||||
bg_event 2, 4, BGEVENT_READ, UnnumberedRouteSign1Script
|
bg_event 2, 4, BGEVENT_READ, Route66Sign1Script
|
||||||
bg_event 30, 6, BGEVENT_READ, UnnumberedRouteSign2Script
|
bg_event 30, 6, BGEVENT_READ, Route66Sign2Script
|
||||||
|
|
||||||
def_object_events
|
def_object_events
|
||||||
object_event 47, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 1, TrainerPainterDali, -1
|
object_event 47, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 1, TrainerPainterDali, -1
|
||||||
|
|
Loading…
Reference in a new issue