diff --git a/README.md b/README.md index 17f7ddee..43e2494b 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,10 @@ QoL Enhancements - All 217 (current) Pokemon can be obtained without the use of trading or glitches, including Mew! - New Pokedex entries for most Pokemon are available, sourced from the original 1996 Pokedex book by Creatures Inc., restoring a ton of old Kanto lore. Thanks to [Dr. Lava and Nob Ogasawara](http://lavacutcontent.com/1996-creatures-pokedex-translation-1/) for their incredible work translating and writing about it! - Press A beside surfable water, strength boulders or cut trees to use the HMs without needing to go into the Party menu. +- PP symbol is displayed in the battle menu. - Running Shoes by holding B. Also works with the bike! Surf speed is also doubled. - Fast text has no frame delay between text scrolling, doubling the scroll speed. It's also been made the default option, so you don't need to go into the Options menu for it. +- Lorelei, Bruno, and Agatha now play the Gym Leader Battle theme. - HP bar has been doubled in speed, having a 1 frame delay per pixel rather than 2. - Trainer DVs are perfect-15s. - The protagonist is referred to in a gender neutral manner. @@ -101,6 +103,7 @@ QoL Enhancements - The Moon Stone is available over TM23 (Dragon Rage). Dragon Rage has been moved to Celadon Mart, over Take Down, which can still be obtained in Silph Co. - Bag has capacity for 30 items. - Spinner tiles move faster. +- Bold P is added to the fontset over a Japanese opening quote (???), which helps the status screen and allows a PP symbol to be displayed during battle. Bug Fixes ==== @@ -135,6 +138,9 @@ Many non-multiplayer, non-battle related bugs have been fixed. The aforementione - Weird behaviour when going to 11F in Silph Co. and forcing a player to leave despite not moving is fixed. - Fixed weirdness in Pokemon Tower where saving Mr. Fuji won't immediately let you leave. Also fixed coord termination on 2F which could cause some terribleness. and more! +- Trainer Name Pointers are removed, as the localised games don't need to use the file at all. +- Dakutens are removed, as the Japanese accents aren't used in English releases. +- Blank Leader Name code is removed; before, this would only be for the PNGs. Known Bugs ==== @@ -222,6 +228,7 @@ Credits * Chatot4444 - Assisting with gym scaling code * Vortyne - Reused a bit of code from their pureRGB hack, which was used to assist with making MissingNo. stable. Assisted in bug fixes. * Rangi - Reused a bit of code from their Red* / Blue* hack to make HMs usable in the overworld! +* 大吟醸 (Daiginjo) - Assistance in translating the Tamamushi University Student Book, allowing for an accurate adaptation of the location. Original README.md proceeding; # Pokémon Red and Blue [![Build Status][ci-badge]][ci] diff --git a/audio/play_battle_music.asm b/audio/play_battle_music.asm index 93cf8a77..8f026fdc 100644 --- a/audio/play_battle_music.asm +++ b/audio/play_battle_music.asm @@ -16,18 +16,31 @@ PlayBattleMusic:: ld a, [wCurOpponent] cp OPP_ID_OFFSET jr c, .wildBattle - cp OPP_RIVAL3 - jr z, .finalBattle + cp OPP_LORELEI ; elite four now play the gym leader battle theme + jr z, .Elite4Battle + cp OPP_BRUNO + jr z, .Elite4Battle + cp OPP_AGATHA + jr z, .Elite4Battle cp OPP_LANCE + jr z, .Elite4Battle + cp OPP_RIVAL3 + ;jr z, .finalBattle unnecessary code + ;cp OPP_LANCE + ;jr nz, .normalTrainerBattle + ;ld a, MUSIC_GYM_LEADER_BATTLE jr nz, .normalTrainerBattle - ld a, MUSIC_GYM_LEADER_BATTLE ; lance also plays gym leader theme + ld a, MUSIC_FINAL_BATTLE + jr .playSong + .Elite4Battle + ld a, MUSIC_GYM_LEADER_BATTLE jr .playSong .normalTrainerBattle ld a, MUSIC_TRAINER_BATTLE jr .playSong -.finalBattle - ld a, MUSIC_FINAL_BATTLE - jr .playSong +;.finalBattle +; ld a, MUSIC_FINAL_BATTLE +; jr .playSong .wildBattle ld a, MUSIC_WILD_BATTLE .playSong diff --git a/charmap.asm b/charmap.asm index f0967978..b9af1a05 100644 --- a/charmap.asm +++ b/charmap.asm @@ -46,7 +46,7 @@ charmap "ぅ", $6f ; hiragana small u, unused charmap "‘", $70 ; opening single quote charmap "’", $71 ; closing single quote - charmap "“", $72 ; opening quote + charmap "", $72 ; was jp opening quote (“) charmap "”", $73 ; closing quote charmap "·", $74 ; middle dot, unused charmap "…", $75 ; ellipsis @@ -68,7 +68,7 @@ charmap "", $70 ; narrow "to" - charmap "『", $72 ; Japanese opening quote, unused + charmap "", $72 ; was jp opening quote (“) charmap "", $73 charmap "№", $74 @@ -78,9 +78,6 @@ charmap "′", $60 ; gfx/pokedex/pokedex.png charmap "″", $61 ; gfx/pokedex/pokedex.png - ; needed for StatusScreen (see engine/pokemon/status_screen.asm) - charmap "", $72 ; gfx/font/P.1bpp - ; needed for LoadTownMap_Fly (see engine/items/town_map.asm) charmap "▲", $ed ; gfx/town_map/up_arrow.1bpp diff --git a/constants/event_constants.asm b/constants/event_constants.asm index 2e76f2c0..ff058be4 100644 --- a/constants/event_constants.asm +++ b/constants/event_constants.asm @@ -138,7 +138,8 @@ const EVENT_GOT_10_COINS const EVENT_GOT_20_COINS const EVENT_GOT_20_COINS_2 - const_skip 2 + ;const_skip 2 + const EVENT_GOT_TM23 const EVENT_1BF ; ??? const_skip 32 const EVENT_GOT_COIN_CASE diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index afde0190..1eba1421 100644 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -245,4 +245,5 @@ DEF SHOW EQU $15 const HS_POKEMON_MANSION_B2F_ITEM_1 ; E9 const HS_POKEMON_MANSION_B2F_ITEM_2 ; EA const HS_ROUTE_1_OAK ; EB + const HS_MT_MOON_CRATER_GUARD ; EC DEF NUM_HS_OBJECTS EQU const_value diff --git a/constants/item_constants.asm b/constants/item_constants.asm index 7c4c1624..83386dcd 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -84,7 +84,7 @@ DEF SAFARI_ROCK EQU $16 ; overload const POKE_FLUTE ; $49 const LIFT_KEY ; $4A const EXP_ALL ; $4B - const OLD_ROD ; $4C - replaceable + const CANDY_SACK ; $4C - was old rod const GOOD_ROD ; $4D - replaceable const SUPER_ROD ; $4E const PP_UP ; $4F diff --git a/data/events/hidden_objects.asm b/data/events/hidden_objects.asm index 33c7578a..13940148 100644 --- a/data/events/hidden_objects.asm +++ b/data/events/hidden_objects.asm @@ -242,7 +242,8 @@ ViridianGymHiddenObjects: Museum1FHiddenObjects: hidden_object 2, 3, SPRITE_FACING_UP, AerodactylFossil hidden_object 2, 6, SPRITE_FACING_UP, KabutopsFossil - hidden_object 7, 1, SPRITE_FACING_UP, ScarletBook + hidden_object 8, 1, SPRITE_FACING_UP, ScarletBookScream + hidden_object 9, 1, SPRITE_FACING_UP, ScarletBookSandy db -1 ; end PewterGymHiddenObjects: diff --git a/data/items/key_items.asm b/data/items/key_items.asm index f7d27c8c..47c15f57 100644 --- a/data/items/key_items.asm +++ b/data/items/key_items.asm @@ -75,7 +75,7 @@ KeyItemFlags: dbit TRUE ; POKE_FLUTE dbit TRUE ; LIFT_KEY dbit FALSE ; EXP_ALL - dbit TRUE ; OLD_ROD + dbit FALSE ; was TRUE for OLD_ROD, now CANDY_SACK dbit TRUE ; GOOD_ROD dbit TRUE ; SUPER_ROD dbit FALSE ; PP_UP diff --git a/data/items/names.asm b/data/items/names.asm index 0fe3d330..5510d73d 100644 --- a/data/items/names.asm +++ b/data/items/names.asm @@ -75,7 +75,7 @@ ItemNames:: li "POKé FLUTE" li "LIFT KEY" li "EXP.ALL" - li "OLD ROD" + li "CANDY SACK" ; was old rod li "GOOD ROD" li "FISHING ROD" li "PP UP" diff --git a/data/items/prices.asm b/data/items/prices.asm index 73f6d4f5..2de421a9 100644 --- a/data/items/prices.asm +++ b/data/items/prices.asm @@ -75,7 +75,7 @@ ItemPrices:: bcd3 0 ; POKE_FLUTE bcd3 0 ; LIFT_KEY bcd3 0 ; EXP_ALL - bcd3 0 ; OLD_ROD + bcd3 0 ; was OLD_ROD, now CANDY_SACK. Plan to be one-of-a-kind, so 0 to discourage sale a la Master Ball. bcd3 0 ; GOOD_ROD bcd3 0 ; SUPER_ROD bcd3 0 ; PP_UP diff --git a/data/items/use_overworld.asm b/data/items/use_overworld.asm index 5a2ba102..794cc52b 100644 --- a/data/items/use_overworld.asm +++ b/data/items/use_overworld.asm @@ -3,7 +3,7 @@ UsableItems_CloseMenu: db ESCAPE_ROPE db ITEMFINDER db POKE_FLUTE - db OLD_ROD + ;db OLD_ROD no longer exists db GOOD_ROD db SUPER_ROD db -1 ; end diff --git a/data/items/use_party.asm b/data/items/use_party.asm index 111bba1c..9b120979 100644 --- a/data/items/use_party.asm +++ b/data/items/use_party.asm @@ -32,6 +32,7 @@ UsableItems_PartyMenu: db X_DEFEND db X_SPEED db X_SPECIAL + db CANDY_SACK db PP_UP db ETHER db MAX_ETHER diff --git a/data/maps/hide_show_data.asm b/data/maps/hide_show_data.asm index 14177149..d21465dc 100644 --- a/data/maps/hide_show_data.asm +++ b/data/maps/hide_show_data.asm @@ -120,7 +120,7 @@ MapHSPointers: dw NoHS dw FarawayIslandInsideHS dw PokemonMansionB2FHS - dw NoHS + dw MtMoonCraterHS dw NoHS dw NoHS dw ChampionsRoomHS @@ -577,6 +577,8 @@ PokemonMansionB2FHS: db POKEMON_MANSION_B2F, $04, SHOW Route1HS: db ROUTE_1, $03, HIDE ; PROF OAK fight. To test, change to SHOW. - PvK +MtMoonCraterHS: + db MT_MOON_CRATER, $10, SHOW ; Crater Guard db $FF, $01, SHOW ; end assert_table_length NUM_HS_OBJECTS + 1 diff --git a/data/maps/objects/MtMoonB2F.asm b/data/maps/objects/MtMoonB2F.asm index c49171d2..a07af864 100644 --- a/data/maps/objects/MtMoonB2F.asm +++ b/data/maps/objects/MtMoonB2F.asm @@ -20,5 +20,6 @@ MtMoonB2F_Object: object_event 13, 6, SPRITE_FOSSIL, STAY, NONE, 7 ; person object_event 25, 21, SPRITE_POKE_BALL, STAY, NONE, 8, HP_UP object_event 21, 5, SPRITE_POKE_BALL, STAY, NONE, 9, TM_MEGA_PUNCH + object_event 29, 7, SPRITE_SCIENTIST, STAY, NONE, 10, ; Crater Guard def_warps_to MT_MOON_B2F diff --git a/data/maps/objects/Museum1F.asm b/data/maps/objects/Museum1F.asm index e79c1173..ed5c0ed4 100644 --- a/data/maps/objects/Museum1F.asm +++ b/data/maps/objects/Museum1F.asm @@ -16,6 +16,6 @@ Museum1F_Object: object_event 15, 2, SPRITE_SCIENTIST, STAY, DOWN, 3 ; person object_event 17, 4, SPRITE_SCIENTIST, STAY, NONE, 4 ; person object_event 16, 2, SPRITE_OLD_AMBER, STAY, NONE, 5 ; person - object_event 6, 2, SPRITE_COOLTRAINER_F, STAY, NONE, 6 ; person + object_event 7, 1, SPRITE_COOLTRAINER_F, STAY, NONE, 6 ; person def_warps_to MUSEUM_1F diff --git a/data/pokemon/evos_moves.asm b/data/pokemon/evos_moves.asm index 07ba5378..f695d2b9 100644 --- a/data/pokemon/evos_moves.asm +++ b/data/pokemon/evos_moves.asm @@ -1,6 +1,9 @@ ; See constants/pokemon_data_constants.asm ; The max number of evolutions per monster is MAX_EVOLUTIONS +; db EV_ITEM, CANDY_SACK, 1, MELMETAL +; put this on Meltan when adding it + EvosMovesPointerTable: table_width 2, EvosMovesPointerTable dw RhydonEvosMoves diff --git a/data/text/dakutens.asm b/data/text/dakutens.asm deleted file mode 100644 index 7a53c71f..00000000 --- a/data/text/dakutens.asm +++ /dev/null @@ -1,15 +0,0 @@ -Dakutens: - db "かが", "きぎ", "くぐ", "けげ", "こご" - db "さざ", "しじ", "すず", "せぜ", "そぞ" - db "ただ", "ちぢ", "つづ", "てで", "とど" - db "はば", "ひび", "ふぶ", "へべ", "ほぼ" - db "カガ", "キギ", "クグ", "ケゲ", "コゴ" - db "サザ", "シジ", "スズ", "セゼ", "ソゾ" - db "タダ", "チヂ", "ツヅ", "テデ", "トド" - db "ハバ", "ヒビ", "フブ", "へべ", "ホボ" - db -1 ; end - -Handakutens: - db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ" - db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ" - db -1 ; end diff --git a/data/text/text_2.asm b/data/text/text_2.asm index c6cbc872..a682431c 100644 --- a/data/text/text_2.asm +++ b/data/text/text_2.asm @@ -590,31 +590,18 @@ _KabutopsFossilText:: done _ScarletBook1:: - text "A member of our" - line "survey team" - cont "photographed an" - cont "odd, screaming," - cont "JIGGLYPUFF-like" - cont "#MON." - - para "It has been named" - line "SCREAM TAIL." + text "SCREAM TAIL" + line "A screaming," + cont "JIGGLYPUFF-like" + cont "#MON." done _ScarletBook2:: - text "Another team" - line "returned. They" - cont "were attacked by" - cont "a MAGNETON that" - cont "looked like a" - cont "tyrannosaur." - - para "We called it" - line "SANDY SHOCKS." - - para "These #MON must" - line "be contained." + text "SANDY SHOCKS" + line "A theropod-like" + cont "relative of" + cont "MAGNETON." done diff --git a/data/trainers/name_pointers.asm b/data/trainers/name_pointers.asm deleted file mode 100644 index 6317f54a..00000000 --- a/data/trainers/name_pointers.asm +++ /dev/null @@ -1,73 +0,0 @@ -TrainerNamePointers: -; These are only used for trainers' defeat speeches. -; They were originally shortened variants of the trainer class names -; in the Japanese versions, but are now redundant with TrainerNames. - dw .YoungsterName - dw .BugCatcherName - dw .LassName - dw wTrainerName - dw .JrTrainerMName - dw .JrTrainerFName - dw .PokemaniacName - dw .SuperNerdName - dw wTrainerName - dw wTrainerName - dw .BurglarName - dw .EngineerName - dw .UnusedJugglerName - dw wTrainerName - dw .SwimmerName - dw wTrainerName - dw wTrainerName - dw .BeautyName - dw wTrainerName - dw .RockerName - dw .JugglerName - dw wTrainerName - dw wTrainerName - dw .BlackbeltName - dw wTrainerName - dw .ProfOakName - dw .ChiefName - dw .ScientistName - dw wTrainerName - dw .RocketName - dw .CooltrainerMName - dw .CooltrainerFName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - dw wTrainerName - -.YoungsterName: db "YOUNGSTER@" -.BugCatcherName: db "BUG CATCHER@" -.LassName: db "LASS@" -.JrTrainerMName: db "JR.TRAINER♂@" -.JrTrainerFName: db "JR.TRAINER♀@" -.PokemaniacName: db "POKéMANIAC@" -.SuperNerdName: db "SUPER NERD@" -.BurglarName: db "BURGLAR@" -.EngineerName: db "ENGINEER@" -.UnusedJugglerName: db "JUGGLER@" -.SwimmerName: db "SWIMMER@" -.BeautyName: db "BEAUTY@" -.RockerName: db "ROCKER@" -.JugglerName: db "JUGGLER@" -.BlackbeltName: db "BLACKBELT@" -.ProfOakName: db "PROF.OAK@" -.ChiefName: db "CHIEF@" -.ScientistName: db "SCIENTIST@" -.RocketName: db "ROCKET@" -.CooltrainerMName: db "COOLTRAINER♂@" -.CooltrainerFName: db "COOLTRAINER♀@" diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 14cc65c2..0589a8df 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2899,6 +2899,10 @@ PrintMenuItem: hlcoord 1, 9 ld de, TypeText call PlaceString + hlcoord 1, 11 + ld a, "" + ld [hli], a + ld [hl], "" hlcoord 7, 11 ld [hl], "/" hlcoord 5, 9 diff --git a/engine/battle/save_trainer_name.asm b/engine/battle/save_trainer_name.asm index 4d40fd82..45816363 100644 --- a/engine/battle/save_trainer_name.asm +++ b/engine/battle/save_trainer_name.asm @@ -1,14 +1,15 @@ SaveTrainerName:: - ld hl, TrainerNamePointers - ld a, [wTrainerClass] - dec a - ld c, a - ld b, 0 - add hl, bc - add hl, bc - ld a, [hli] - ld h, [hl] - ld l, a +; ld hl, TrainerNamePointers +; ld a, [wTrainerClass] +; dec a +; ld c, a +; ld b, 0 +; add hl, bc +; add hl, bc +; ld a, [hli] +; ld h, [hl] +; ld l, a + ld hl, wTrainerName ld de, wcd6d .CopyCharacter ld a, [hli] @@ -18,4 +19,6 @@ SaveTrainerName:: jr nz, .CopyCharacter ret -INCLUDE "data/trainers/name_pointers.asm" +; INCLUDE "data/trainers/name_pointers.asm" +; https://github.com/pret/pokered/wiki/Remove-Redundant-TrainerNamePointers +; name_pointers is redundant when hacking the international releases ~ PvK diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm index 88693541..b3aa4444 100644 --- a/engine/battle/trainer_ai.asm +++ b/engine/battle/trainer_ai.asm @@ -320,6 +320,7 @@ TrainerAI: jp hl INCLUDE "data/trainers/ai_pointers.asm" +; when there's a +1 on the gym/e4 it's referring to the number of items to use - PvK JugglerAI: cp 25 percent + 1 @@ -334,7 +335,7 @@ BlackbeltAI: GiovanniAI: cp 25 percent + 1 ret nc - jp AIUseGuardSpec + jp AIUseXAttack ; Used to use a Guard Spec. This will make the item use have a proper impact - healing doesn't feel right for a trainer fixated on strength. CooltrainerMAI: cp 25 percent + 1 @@ -342,8 +343,7 @@ CooltrainerMAI: jp AIUseXAttack CooltrainerFAI: - ; The intended 25% chance to consider switching will not apply. - ; Uncomment the line below to fix this. + ; The intended 25% chance to consider switching applies, this fixes a bug. cp 25 percent + 1 ret nc ; fixes the bug ld a, 10 @@ -362,14 +362,20 @@ BrockAI: jp AIUseFullHeal MistyAI: + ; cp 25 percent + 1 + ; ret nc + ; jp AIUseXDefend old Misty AI cp 25 percent + 1 ret nc - jp AIUseXDefend + ld a, 10 + call AICheckIfHPBelowFraction + ret nc + jp AIUsePotion ; Replicates Starmie using Recover, but in a more balanced manner. Unlike other trainers that heal, Misty will do this 26% of the time instead of 51%. LtSurgeAI: cp 25 percent + 1 ret nc - jp AIUseXSpeed + jp AIUseXSpecial ; Used to be an X Speed. His party is already fast, so this seems far more appropriate. ErikaAI: cp 50 percent + 1 @@ -380,9 +386,15 @@ ErikaAI: jp AIUseSuperPotion KogaAI: - cp 25 percent + 1 + ; cp 25 percent + 1 + ; ret nc + ; jp AIUseXAttack old AI + cp 50 percent + 1 ret nc - jp AIUseXAttack + ld a, 10 + call AICheckIfHPBelowFraction + ret nc + jp AIUseSuperPotion ; Koga is weird - I don't think anything fits. X Attack is certainly not the move though... BlaineAI: cp 25 percent + 1 @@ -390,7 +402,7 @@ BlaineAI: ld a, 10 call AICheckIfHPBelowFraction ret nc ; this fixes the super potion thing - PvK - jp AIUseSuperPotion + jp AIUseHyperPotion ; Instead of a Super Potion though, let's give him this. More impactful for the sixth gym while staying true to the meme that everyone knows Gen 1 Blaine for. SabrinaAI: cp 25 percent + 1 @@ -416,36 +428,55 @@ Rival3AI: ret nc jp AIUseFullRestore +; Elite Four members will use an associated X Item or a Full Restore. LoreleiAI: + cp 15 percent + 1 + ret nc + jp AIUseXSpecial cp 50 percent + 1 ret nc ld a, 5 call AICheckIfHPBelowFraction ret nc - jp AIUseSuperPotion + jp AIUseFullRestore BrunoAI: - cp 25 percent + 1 + ;cp 25 percent + 1 + ;ret nc + ; jp AIUseXDefend old ai...??? + cp 15 percent + 1 ret nc - jp AIUseXDefend + jp AIUseXAttack + cp 50 percent + 1 + ret nc + ld a, 5 + call AICheckIfHPBelowFraction + ret nc + jp AIUseFullRestore AgathaAI: cp 8 percent jp c, AISwitchIfEnoughMons + cp 15 percent + 1 + ret nc + jp AIUseXAccuracy ; hahahahahahahaha cp 50 percent + 1 ret nc ld a, 4 call AICheckIfHPBelowFraction ret nc - jp AIUseSuperPotion + jp AIUseFullRestore LanceAI: + cp 15 percent + 1 + ret nc + jp AIUseXSpecial cp 50 percent + 1 ret nc ld a, 5 call AICheckIfHPBelowFraction ret nc - jp AIUseHyperPotion + jp AIUseFullRestore GenericAI: and a ; clear carry @@ -703,7 +734,8 @@ AIUseXSpeed: AIUseXSpecial: ld b, $D ld a, X_SPECIAL - ; fallthrough + jr AIIncreaseStat ; this wasn't here before but it seems that this never actually happened?? + ;; fallthrough AIIncreaseStat: ld [wAIItem], a diff --git a/engine/events/hidden_objects/museum_fossils.asm b/engine/events/hidden_objects/museum_fossils.asm index 5784d92f..a3863273 100644 --- a/engine/events/hidden_objects/museum_fossils.asm +++ b/engine/events/hidden_objects/museum_fossils.asm @@ -22,13 +22,16 @@ KabutopsFossilText:: text_far _KabutopsFossilText text_end -ScarletBook:: +ScarletBookScream:: ld a, SCREAM_TAIL ld [wcf91], a call PlayCry call DisplayMonFrontSpriteInBox call EnableAutoTextBoxDrawing tx_pre ScarletBook1 + ret + +ScarletBookSandy:: ld a, SANDY_SHOCKS ld [wcf91], a call PlayCry diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 4697662f..13820a9a 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -92,7 +92,7 @@ ItemUsePtrTable: dw ItemUsePokeflute ; POKE_FLUTE dw UnusableItem ; LIFT_KEY dw UnusableItem ; EXP_ALL - dw ItemUseOldRod ; OLD_ROD + dw ItemUseEvoStone ; was OLD_ROD, now CANDY_SACK dw ItemUseGoodRod ; GOOD_ROD dw ItemUseSuperRod ; SUPER_ROD dw ItemUsePPUp ; PP_UP (real one) diff --git a/engine/menus/draw_badges.asm b/engine/menus/draw_badges.asm index 5e00a34e..5bc769c7 100644 --- a/engine/menus/draw_badges.asm +++ b/engine/menus/draw_badges.asm @@ -4,6 +4,7 @@ DrawBadges: ; In Japanese versions, names are displayed above faces. ; Instead of removing relevant code, the name graphics were erased. +; KEP removes the code as well to optimise memory. ; Tile ids for face/badge graphics. ld de, wBadgeOrFaceTiles @@ -41,7 +42,7 @@ DrawBadges: ld hl, wBadgeNumberTile ld a, $d8 ; [1] ld [hli], a - ld [hl], $60 ; First name + ; ld [hl], $60 ; First name, unneeded hlcoord 2, 11 ld de, wTempObtainedBadgesBooleans @@ -64,20 +65,24 @@ DrawBadges: ld [hli], a inc a ld [wBadgeNumberTile], a - -; Names aren't printed if the badge is owned. - ld a, [de] - and a ld a, [wBadgeNameTile] - jr nz, .SkipName - call .PlaceTiles - jr .PlaceBadge - -.SkipName inc a inc a inc hl +; Names aren't printed if the badge is owned. - unnecessary code +; ld a, [de] +; and a +; ld a, [wBadgeNameTile] +; jr nz, .SkipName +; call .PlaceTiles +; jr .PlaceBadge +; +;.SkipName +; inc a +; inc a +; inc hl + .PlaceBadge ld [wBadgeNameTile], a ld de, SCREEN_WIDTH - 1 diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm index 3e33575f..6aff24b7 100644 --- a/engine/menus/naming_screen.asm +++ b/engine/menus/naming_screen.asm @@ -231,13 +231,13 @@ DisplayNamingScreen: ld a, [hl] ld [wNamingScreenLetter], a call CalcStringLength - ld a, [wNamingScreenLetter] - cp "゙" - ld de, Dakutens - jr z, .dakutensAndHandakutens - cp "゚" - ld de, Handakutens - jr z, .dakutensAndHandakutens + ;ld a, [wNamingScreenLetter] + ;cp "゙" + ;ld de, Dakutens + ;jr z, .dakutensAndHandakutens + ;cp "゚" + ;ld de, Handakutens + ;jr z, .dakutensAndHandakutens | japanese: not needed in the international releases ld a, [wNamingScreenType] cp NAME_MON_SCREEN jr nc, .checkMonNameLength @@ -251,12 +251,12 @@ DisplayNamingScreen: jr c, .addLetter ret -.dakutensAndHandakutens - push hl - call DakutensAndHandakutens - pop hl - ret nc - dec hl +;.dakutensAndHandakutens | japanese, not needed +; push hl +; call DakutensAndHandakutens +; pop hl +; ret nc +; dec hl .addLetter ld a, [wNamingScreenLetter] ld [hli], a @@ -420,21 +420,21 @@ PrintNicknameAndUnderscores: ld [hl], $77 ; raised underscore tile id ret -DakutensAndHandakutens: - push de - call CalcStringLength - dec hl - ld a, [hl] - pop hl - ld de, $2 - call IsInArray - ret nc - inc hl - ld a, [hl] - ld [wNamingScreenLetter], a - ret +;DakutensAndHandakutens: | japanese - not needed +; push de +; call CalcStringLength +; dec hl +; ld a, [hl] +; pop hl +; ld de, $2 +; call IsInArray +; ret nc +; inc hl +; ld a, [hl] +; ld [wNamingScreenLetter], a +; ret -INCLUDE "data/text/dakutens.asm" +; INCLUDE "data/text/dakutens.asm" | deleting ; calculates the length of the string at wStringBuffer and stores it in c CalcStringLength: diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm index b000fa67..460ef845 100644 --- a/engine/menus/start_sub_menus.asm +++ b/engine/menus/start_sub_menus.asm @@ -500,9 +500,12 @@ DrawTrainerInfo: ld bc, 8 tiles push bc call TrainerInfo_FarCopyData - ld hl, BlankLeaderNames - ld de, vChars2 tile $60 - ld bc, $17 tiles + ;ld hl, BlankLeaderNames - unnecessary code + ;ld de, vChars2 tile $60 + ;ld bc, $17 tiles + ld hl, CircleTile ; better code here to line 508 + ld de, vChars2 tile $76 + ld bc, 1 tiles call TrainerInfo_FarCopyData pop bc ld hl, BadgeNumbersTileGraphics ; badge number tile patterns diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm index ac03514a..27928b3b 100644 --- a/engine/pokemon/status_screen.asm +++ b/engine/pokemon/status_screen.asm @@ -97,10 +97,10 @@ StatusScreen: ld hl, vChars2 tile $76 lb bc, BANK(BattleHudTiles3), 2 call CopyVideoDataDouble ; ─ ┘ - ld de, PTile - ld hl, vChars2 tile $72 - lb bc, BANK(PTile), 1 - call CopyVideoDataDouble ; bold P (for PP) + ;ld de, PTile + ;ld hl, vChars2 tile $72 + ;lb bc, BANK(PTile), 1 + ;call CopyVideoDataDouble ; bold P (for PP) - no longer needed ldh a, [hTileAnimations] push af xor a @@ -244,7 +244,7 @@ DrawLineBox: ld [hl], $6f ; ← (halfarrow ending) ret -PTile: INCBIN "gfx/font/P.1bpp" +;PTile: INCBIN "gfx/font/P.1bpp" lol PrintStatsBox: ld a, d diff --git a/gfx/font/font_battle_extra.png b/gfx/font/font_battle_extra.png index d00ae7bc..6853b99b 100644 Binary files a/gfx/font/font_battle_extra.png and b/gfx/font/font_battle_extra.png differ diff --git a/gfx/trainer_card.asm b/gfx/trainer_card.asm index 7484e4ee..3eca64b9 100644 --- a/gfx/trainer_card.asm +++ b/gfx/trainer_card.asm @@ -1,7 +1,7 @@ TrainerInfoTextBoxTileGraphics: INCBIN "gfx/trainer_card/trainer_info.2bpp" TrainerInfoTextBoxTileGraphicsEnd: -BlankLeaderNames: INCBIN "gfx/trainer_card/blank_leader_names.2bpp" +;BlankLeaderNames: INCBIN "gfx/trainer_card/blank_leader_names.2bpp" not needed in localised vers CircleTile: INCBIN "gfx/trainer_card/circle_tile.2bpp" diff --git a/gfx/trainer_card/blank_leader_names.png b/gfx/trainer_card/blank_leader_names.png deleted file mode 100644 index 867a39fe..00000000 Binary files a/gfx/trainer_card/blank_leader_names.png and /dev/null differ diff --git a/home/trainers.asm b/home/trainers.asm index 8d83e96f..bb97b252 100644 --- a/home/trainers.asm +++ b/home/trainers.asm @@ -373,7 +373,8 @@ PrintEndBattleText:: ldh [hLoadedROMBank], a ld [MBC1RomBank], a push hl - farcall SaveTrainerName + ; farcall SaveTrainerName we don't need to farcall anymore + call SaveTrainerName ld hl, TrainerEndBattleText call PrintText pop hl @@ -383,6 +384,17 @@ PrintEndBattleText:: farcall FreezeEnemyTrainerSprite jp WaitForSoundToFinish +SaveTrainerName:: ; implementing https://github.com/pret/pokered/wiki/Remove-Redundant-TrainerNamePointers + ld hl, wTrainerName + ld de, wcd6d +.CopyCharacter + ld a, [hli] + ld [de], a + inc de + cp "@" + jr nz, .CopyCharacter + ret + GetSavedEndBattleTextPointer:: ld a, [wBattleResult] and a diff --git a/main.asm b/main.asm index 3c9d9fd9..b7fb57e5 100644 --- a/main.asm +++ b/main.asm @@ -149,7 +149,7 @@ INCLUDE "engine/pokemon/bills_pc.asm" SECTION "Battle Engine 3", ROMX INCLUDE "engine/battle/print_type.asm" -INCLUDE "engine/battle/save_trainer_name.asm" +; INCLUDE "engine/battle/save_trainer_name.asm" no longer needed https://github.com/pret/pokered/wiki/Remove-Redundant-TrainerNamePointers INCLUDE "engine/battle/move_effects/focus_energy.asm" diff --git a/maps/Museum1F.blk b/maps/Museum1F.blk index e9d2ca0d..7b13e67f 100644 Binary files a/maps/Museum1F.blk and b/maps/Museum1F.blk differ diff --git a/ram/wram.asm b/ram/wram.asm index 9ce5f5de..19a90b28 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -2034,8 +2034,8 @@ wVictoryRoad1FCurScript:: db wFarawayIslandInsideCurScript:: db ; this should work wLancesRoomCurScript:: db wPokemonMansionB2FCurScript:: db -;wMtMoonCraterCurScript:: db - ds 3 +wMtMoonCraterCurScript:: db + ds 2 wSilphCo10FCurScript:: db wSilphCo11FCurScript:: db ds 1 diff --git a/scripts/CeladonUniversityInside.asm b/scripts/CeladonUniversityInside.asm index ac0ca441..024e459e 100644 --- a/scripts/CeladonUniversityInside.asm +++ b/scripts/CeladonUniversityInside.asm @@ -34,7 +34,28 @@ CeladonUniversityInsideText3: text_end CeladonUniversityInsideText4: - text_far _CeladonUniversityInsideText4 + text_asm + CheckEvent EVENT_GOT_TM23 + jr nz, .got_item + ld hl, KHRP + call PrintText + lb bc, TM_DRAGON_RAGE, 1 + call GiveItem + jr nc, .bag_full + ld hl, ReceivedTM23Text + call PrintText + SetEvent EVENT_GOT_TM23 + jr .done +.bag_full + ld hl, TM23NoRoomText + call PrintText + jr .done +.got_item + ld hl, TM23ExplanationText + call PrintText +.done + jp TextScriptEnd + text_end CeladonUniversityInsideBookcaseText1: @@ -73,4 +94,21 @@ CeladonUniversityPCScreen: text_far _ComputerScreen text_end +KHRP: + text_far _KHRP + text_end + +ReceivedTM23Text: + text_far _ReceivedTM23Text + sound_get_item_1 + text_end + +TM23ExplanationText: + text_far _TM23ExplanationText + text_end + +TM23NoRoomText: + text_far _TM23NoRoomText + text_end + text_end ; unused diff --git a/scripts/HallOfFame.asm b/scripts/HallOfFame.asm index 44289232..12886bf4 100644 --- a/scripts/HallOfFame.asm +++ b/scripts/HallOfFame.asm @@ -97,6 +97,9 @@ HallofFameRoomScript1: ld a, HS_CERULEAN_CAVE_GUY ld [wMissableObjectIndex], a predef HideObject + ld a, HS_MT_MOON_CRATER_GUARD + ld [wMissableObjectIndex], a + predef HideObject ld a, HS_ROUTE_1_OAK ld [wMissableObjectIndex], a predef ShowObject diff --git a/scripts/MtMoonB2F.asm b/scripts/MtMoonB2F.asm index dbfca6a3..705a48bf 100644 --- a/scripts/MtMoonB2F.asm +++ b/scripts/MtMoonB2F.asm @@ -164,6 +164,7 @@ MtMoonB2F_TextPointers: dw MtMoon3Text7 dw PickUpItemText dw PickUpItemText + dw MtMoonCraterGuard dw MtMoon3Text_49f99 MtMoon3TrainerHeaders: @@ -379,3 +380,7 @@ MtMoon3EndBattleText5: MtMoon3AfterBattleText5: text_far _MtMoon3AfterBattleText5 text_end + +MtMoonCraterGuard: + text_far _MtMoonCraterGuard + text_end \ No newline at end of file diff --git a/scripts/VermilionOldRodHouse.asm b/scripts/VermilionOldRodHouse.asm index 524395d4..2ec2679a 100644 --- a/scripts/VermilionOldRodHouse.asm +++ b/scripts/VermilionOldRodHouse.asm @@ -15,7 +15,7 @@ VermilionHouse2Text1: ld a, [wCurrentMenuItem] and a jr nz, .refused - lb bc, OLD_ROD, 1 + lb bc, CANDY_SACK, 1 ; used to be the old rod, but since I've replaced it, for now he'll give you this. I believe this house is currently unused, so no issues..? ~ PvK call GiveItem jr nc, .bag_full ld hl, wd728 diff --git a/text/CeladonUniversityInside.asm b/text/CeladonUniversityInside.asm index 34c93791..cf5b247f 100644 --- a/text/CeladonUniversityInside.asm +++ b/text/CeladonUniversityInside.asm @@ -1,8 +1,5 @@ _CeladonUniversityInsideText1:: - text "Hello! I haven't" - line "seen you before!" - - para "My name is PROF." + text "My name is PROF." line "WESTWOOD V!" para "My ancestors" @@ -12,49 +9,42 @@ _CeladonUniversityInsideText1:: done _CeladonUniversityInsideText2:: - text "It's an old letter" - line "about selling the" - para "# BALL patent" - line "to SILPH CO." + text "It's an invoice" + line "selling the #" + cont "BALL to SILPH." done _CeladonUniversityInsideText3:: - text "Seismic tremors" - line "have been" - cont "detected inside" + text "Tremors keep" + line "happening in" + cont "VICTORY ROAD." - para "VICTORY ROAD." - line "Investigation" - cont "is ongoing." - - para "WESTWOOD, can" - line "you see me" - cont "at SILPH?" + para "WESTWOOD, can you" + line "meet me at SILPH?" done -_CeladonUniversityInsideText4:: - text "I don't get it." - line "Why is this" - cont "MAGIKARP so" - cont "powerful?" +_KHRP:: + text "Eureka!" - para "It was attacking" - line "TRAINERs in" - cont "VERMILLION!" + para "This MAGIKARP can" + line "use DRAGON RAGE!" - done + para "Huh? You want to" + line "teach it to yours?" + cont "Sure! Take this!" + + prompt _CeladonUniversityInsideMagikarpText:: text "Name: MAGIKARP" - para "This specimen has" - line "unusual strength." - cont "Like its old" - cont "ancestors, it" + para "Like ancient" + line "specimens, it" cont "can use DRAGON" cont "RAGE." + prompt _BookcaseText1:: @@ -63,56 +53,41 @@ _BookcaseText1:: cont "back around 2" cont "million years." - para "However, the first" - line "proper study into" - cont "their biology was" - cont "conducted by" - cont "BARON TAJIRIN of" - cont "France in the" - cont "18th century." - - para "At the time, only" - line "30 species were" - cont "recognised." + para "BARON TAJIRIN" + line "of France found" + cont "30 species in" + cont "the 18th century." done _BookcaseText2:: text "In 1899, PROF." line "WESTWOOD of Japan" - cont "released a book" - cont "observing the" - cont "evolution of a" - cont "PIKACHU." + cont "discovered" + cont "#MON evolution," + cont "documenting 50" + cont "species." - para "Japan became the" - line "global leader in" - cont "#MON study," - cont "discovering 80" - cont "#MON at the" - cont "time." - - para "As of today," - line "PROF. OAK's" - cont "efforts have led" - cont "to over 200" ;changed from 150 to 200 because we've expanded the dex :P - cont "#MON being" - cont "recognised." + para "PROF. OAK" + line "has since" + cont "documented a" + cont "further 120." ; Total: 200. done _BookcaseText3:: - text "The idea of the" - line "# BALL was" - cont "discovered by" - cont "PROF. WESTWOOD," - cont "as part of an" - cont "experiment to" - cont "extract the" - cont "energy of a" - cont "PRIMEAPE." + ;text "The idea of the" + ;line "# BALL was" + ;cont "discovered by" + ;cont "PROF. WESTWOOD," + ;cont "as part of an" + ;cont "experiment to" + ;cont "extract the" + ;cont "energy of a" + ;cont "PRIMEAPE." + ; too long and doesn't seem to fit. - para "The modern #" + text "The modern #" line "BALL was made by" cont "researchers at" cont "CELADON" @@ -134,4 +109,24 @@ _ComputerScreen:: line "visible on the PC" cont "screen." + done + +_ReceivedTM23Text:: + text " received" + line "@" + text_ram wStringBuffer + text "!@" + text_end + +_TM23ExplanationText:: + text "TM29 is DRAGON" + line "RAGE!" + + para "Use it against" + line "weak #MON!" + done + +_TM23NoRoomText:: + text "You don't have" + line "room for this!" done \ No newline at end of file diff --git a/text/MtMoonB2F.asm b/text/MtMoonB2F.asm index 87d8d755..6be96ad9 100644 --- a/text/MtMoonB2F.asm +++ b/text/MtMoonB2F.asm @@ -123,3 +123,14 @@ _MtMoon3AfterBattleText5:: line "here long before" cont "people came." done + +_MtMoonCraterGuard:: + text "A meteor struck" + line "here recently." + + para "We have to make" + line "sure it's safe." + cont "Come back another" + cont "time." + + done \ No newline at end of file