Coder Social home page Coder Social logo

rangi42 / polishedcrystal Goto Github PK

View Code? Open in Web Editor NEW
1.0K 53.0 197.0 79.49 MB

An upgrade to Pokémon Crystal. Brings features and content up to date, and adds some original content.

Home Page: https://hax.iimarckus.org/topic/6874/

Makefile 0.08% Assembly 95.12% Python 3.19% Shell 0.02% C 1.13% JavaScript 0.42% HTML 0.04%
pokemon game gameboy-color gbz80

polishedcrystal's Introduction

Pokémon Polished Crystal

This is a custom Pokémon game based on the Pokémon Crystal disassembly.

My goal is to create what the title says: an improved, polished version of Pokémon Crystal. It fixes bugs, takes into account the official game changes since 2001, and adds some new ideas of my own. Many features restore what was removed from R/B/Y, or original to HG/SS.

I've had vague plans to make a Pokémon game for years. I'm very impressed by the effort that's gone into disassembling Pokémon Crystal and making the code so well-organized. Thanks to making it open-source (and to the ROM hackers that inspired me), I'm finally making this game a reality.

There are many ways to create games but the way we work at Game Freak may be a little different from other companies. That is, we constantly change and tweak what we have come up with. To make a fun game even more fun and polish it up, we take what we have made and start thinking about it from scratch. And to make the game the most fun to play we make endless changes and tweaks no matter how long it takes. It may not be the best way, but I think these tweaks are important to make our games fun and better.

— Junichi Masuda, "HIDDEN POWER of masuda No. 7"

Download and Play

The current beta version is 3.0.0. It has some incomplete original content and known bugs, but it's playable from start to finish. Download the nightly release to get the very latest ROM, up-to-date with the master code branch.

The most recent official version is 2.2.0 as of September 20, 2016. The changelog lists all changes since then. I recommend playing the 3.0.0 beta instead.

If you want to do a Nuzlocke Challenge, check out Nuzlocke mode in the Option menu!

If you have any questions about these steps, read the FAQ!

Features

A full list of features is in FEATURES.md. Features new to the beta are in CHANGELOG.md. Some highlights:

  • 253 Pokémon, including some new evolutions.
  • 48 new moves.
  • 65 TMs and 21 move tutors.
  • Many new mechanics, including the Fairy type, Physical/Special split, Natures, unlimited TMs, Running Shoes, and continuous Repel.
  • New maps: some restored from R/B/Y, some devamped from HG/SS, and some original.
  • New characters, including Lorelei and Agatha from R/B/Y, Lyra and the Team Rocket Executives from HG/SS, and others.
  • More post-game content, like Gym Leader rematches and an event after the battle with Red.
  • An improved level curve with steadily increasing challenges throughout the game.
  • Music and graphics devamped from other versions.
  • Nuzlocke mode in the Option menu, enabling the basic rules of the Nuzlocke Challenge.

Discussion

You can post questions or comments on any of these sites. But please read the FAQ first if you have a question.

Screenshots

title-screen running-shoes town-map lyra

cherrygrove-city pokemon-center nuzlocke-mode oaks-aide

elder-li move-tutor moss-rock rich-boy

tm58 game-corner-prizes goldenrod-move-tutor eviolite

wonder-trade ecruteak-shrine cowgirl olivine-city

remoraid team-rocket steelix custom-map

ice-rock hex-maniac route-45 stats

sitrus-berry weavile move-reminder moves

sylveon-moonblast togetic-fairy-wind aerodactyl-fossil cerulean-city

celadon-city fly-to-rock-tunnel viridian-forest mismagius

fighting-dojo silph-co new-balls rock-tunnel

safari-zone soul-house cinnabar-island seafoam-islands

polishedcrystal's People

Contributors

8bitzeta avatar aaaaaa123456789 avatar captainswag101 avatar cattrinket avatar cl0v1s avatar cnelsonsic avatar danielledeleo avatar dannye avatar earthoul avatar flempa316 avatar fredriq avatar iimarckus avatar itsdarsh avatar jimb16 avatar justregularluna avatar kanzure avatar katlabs avatar katzenbaer avatar luckytyphlosion avatar mrwint avatar pikalaxalt avatar pkmncoraldev avatar queentwilight avatar rangi42 avatar rik-smeets avatar roukaour avatar salamandar73 avatar sanqui avatar xcrystal avatar yenatch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

polishedcrystal's Issues

Receiving HM02 Gives TM00 (Item Overflow)

Upon receiving HM02 Fly I also received TM00 Tackle.

It appears to be an item overflow bug within the TM/HM pocket as having 16 TM/HMs causes the issue.

Also Strength becomes the cancel button and Cancel is now an HM for aqua tail.

git rev-parse HEAD reports : d36bc3d

I know this isn't the latest version but trying to use an old save with a new revision doesn't load.

I can provide a sav file upon request.

Fix overflow in UpdateNoRTC for NO_RTC build

What I need to do here is mask off the top bits and check if the current hi-days is %11111 (i.e. just before it would overflow). When that happens there's a few possibilities here:

  • Reset the whole RTC to zero
  • Go back a week (so the last week repeats itself indefinitely)
  • Repeat the last day indefinitely

NOTE: 13 bits for days allows for 8'192 in-game days -- over 22 in-game years -- which, given that a day in-game takes 4 real hours, would require the player to play for 3.75 continuous real years to overflow.

Dig goes on forever

Acrozz: "When my Geodude used Dig, he kept digging a hole for the rest of the battle and I had to reset."

AI use of CheckTypeMatchup is completely broken

@FredrIQ:

The code assumes something that is incorrect, completely breaking its usage of this function in every case it is used (which is pretty much everywhere in its switch-out routines, and various move scoring checks). I assumed this was introduced by my changes to said routine, but the bug is actually present in vanilla Crystal. Found it while trying to implement Anticipation.
Fixing this will be rather annoying.

Basically, whenever it uses CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that it can make the function do the right thing by setting hl to the defending types (hl+1 for type 2), which is correct, and a to the attacking type which isn't correct, because CheckTypeMatchup will proceed to get the type from the current move struct by "ld a, BATTLE_VARS_MOVE_TYPE; call GetBattleVar". I assumed this was a change I did myself, but looking at pret shows that it is there in vanilla as well. It is, however, more annoying to fix in Polished Crystal, since not only does one have to properly handle offensive/defensive types, but also abilities (just ignoring them is a bad idea unless one wants to make the AI not understand abilities).
Earlier tonight I was going to fix this by making CheckTypeMatchup all read from hl/a/b/c/d instead of reading the battle state on the fly such as:
hl is defending type (hl+1 the secondary one)
a is the offensive move
b is the offensive ability
c is the defending ability
d is 0 or 1 depending on identification (and set to 1 by CheckTypeMatchup regardless, if b is SCRAPPY.
However the result became quite awkward since I pretty much run out of usable registers and I was afraid to introduce bugs. Not sure what to do about this. Possibly do another attempt relying on RAM buffers (stuff like Buffer1-6, etc) so I don't have to do a ton of push/popping to do what I want.

Nope, hence the comment is still there. This isn't related to type matchups being broken in general (which was recently fixed), but a vanilla AI bug that completely broke switch logic.
Fixing this is a trivial change in vanilla Crystal, but due to the fact that type matchup logic has to factor in abilities, is a much harder change to apply properly to Polished Crystal (unless you decide to simply just ignore abilities, which I don't want to). The reason is that the cases where the AI use of this is broken is the case where the AI is checking non-active Pokémon. This means that not only is the type not matching (something the AI handles, it just misunderstands what the function does in a trivial way but completely broken way), but also defending and attacking Pokémon's abilities.
There are 2 methods for how to go about fixing it.
1: Whenever the AI wants to check this, temporarily change both attacking and defending Pokémon's ability. This needs to change back (properly! Keep Trace in mind, never mind Transform/Imposter) afterwards
2: Set ability to check in some parameter for the CheckTypeMatchup function. This is problematic because it kills any ability to reuse general ability logic (stuff like Mold Breaker, etc) and also needs free RAM (because there isn't enough registers) -- allthough I think Buffer* would do here.
There is also an edge case issue involving powder moves and Grass types, but I think this doesn't come up in practice because they're all status moves.
At this point I've concluded that messing with this isn't worthwhile considering that I want to rewrite the AI either way at some point later.

Telelport occasionally fails

abradolf: "Abra's Teleport occasionally fails."

Teleport should only fail if a trapping move or Ability prevents fleeing, and is not countered by a held item or another Ability.

Port Prism's xorshift PRNG

The current PRNG is not sufficient for generating several random numbers in short succession, as is needed with generation of new Pokémon (three DVs, nature, ability, shininess, and gender).

Redundant code in LoadEnemyMon and InitEnemyMon

battle/core.asm's LoadEnemyMon jumps early to InitEnemyMon if it's a link or Battle Tower battle, but continues with its own code for regular trainer battles. InitEnemyMon simply reads everything from the OTPartyMon data structure. LoadEnemyMon apparently has a more complicated way of doing the same thing, with lots of individual checks for "if it's a trainer battle, get this particular data item from OTPartyMon, otherwise generate a new one for a wild Pokémon". The only thing that isn't redundant is that LoadEnemyMon registers Pokémon as seen in the Pokédex.

Foe's Substitute makes your moves become something else

After rematch Koga's Tentacruel used Substitute, my Mewtwo's moves all turn into Ember. Switching out does not fix this.

Against a wild level 2 Pidgey hacked to know Substitute, my moves now become Double Slap. Against a level 3, Aerial Ace.

Caught Pokémon have wrong held items

I've caught a Teddiursa holding an Ultra Ball and a Caterpie (IIRC) holding a Great Ball. On the other hand, a Bellsprout I caught had the correct Gold Leaf.

Shlotz has caught an Ekans holding a Safari Ball, and another holding a Master Ball.

Edit: Adrevilicious on Discord confirmed that this is still an issue, with Spinarak holding a Safari Ball.

TMs refresh PP

This was in 2.2.0 and in some of the official games. Overwriting a move with N PP should not have more than that, even if the new max PP is greater.

Gender ratios are wrong

Both wild and gift Pokémon have too many females. The base ratios are not being correctly applied.

Gender is determined last after at least six previous PRNG calls (for the IVs, nature, ability, and shininess), so maybe the fault is with biased randomness?

Some wild Pokémon sent to PC appear level 0 before being withdrawn

"Captured a shiny, level 24 Tauros; it got sent to the PC where it became a level 0 mon; trying to see the stats freezes the game (possibly due to the game being unable to calculate the stats of a level 0 mon). This happens regardless of what type of ball I use to capture it. Getting it out of the box restores it to its normal level and all screens are visible."

Guts, Hustle, and Solar Power do the wrong thing

It boosts move power regardless of whether it's physical or not (Guts and Hustle should only boost Physical moves while Solar Power should only boost special ones). Posting it here to avoid forgetting it. The reason this was not addressed right away is because effect_commands is full once again, and because the way damage calculation-affecting abilities are checked could really use a rework to simplify it.

Pursuit on switch is followed by Struggle

abradolf: "Also, mons automatically use Struggle right after Pursuit's effect activates (read: a switch is in order --> foe's Pursuit hits before the mon is switched out --> another mon is switched in --> foe uses Struggle and hits --> battle resumes as usual)."

Trapping moves don't take effect

Articunwho: "Trapping moves don't seem to take effect. I get the "was trapped by Wrap!" status message, but there's no recurring damage after each turn, and every time Wrap is used again, the "trapped by Wrap" message pops up once more."

Slight Compilation error

Make Debug doesn't seem to do anything while Make Crystal does this error

error: Section name "Audio" is already in use

Unnerve is broken

"Unnerve allows enemy mons to consume their berries while printing out a really weird message."

Weather and some ability animations trigger the last used move animation

"Weather like Sunny Day and Rain Dance, as well as abilities that take place every turn like Speed Boost (as seen on Bugsy's Yanma) occasionally trigger the damage animation on the opponent's Pokemon. No damage is dealt obviously, but the animation and sound effect are present." (via)

Edit: "It looks like it recycles the last used animation. In this case it was the animation for taking damage, since Sentret was the last to attack."

Edit: 889182d may have fixed this.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.