diff options
| author | Idain <luiscarlosholguinperez@outlook.com> | 2021-11-17 21:38:59 -0400 |
|---|---|---|
| committer | Idain <luiscarlosholguinperez@outlook.com> | 2021-11-17 21:38:59 -0400 |
| commit | 39d1b292d96648e8d7a7ba54b8687132bad123c2 (patch) | |
| tree | 35904de71763ff10e578dca720c56eddbdde52c0 | |
| parent | d9868aee44bf861c80ffdb053039cd21b0b52f52 (diff) | |
Use the "li" macro for item names and update Dusk Ball's multiplier.
| -rw-r--r-- | Add-a-new-item.md | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/Add-a-new-item.md b/Add-a-new-item.md index dcdb627..d706995 100644 --- a/Add-a-new-item.md +++ b/Add-a-new-item.md @@ -48,7 +48,7 @@ You may have already guessed this from the comment at the top of [constants/item Every kind of item has these pieces of data. `ItemNames`, `ItemDescriptions`, `ItemAttributes`, and `ItemEffects` are four tables with an entry for each item constant, one after another. It's important for them all to be in sync, so that the Nth constant correctly matches the Nth name, the Nth description, and so on. -**Names** are defined in [data/items/names.asm](../blob/master/data/items/names.asm). They're simply written as <code>db "<i>NAME</i>@"</code>: an opening quote, the name, an ending "@", and a closing quote. Names can be up to 12 characters long. The number of *printed* characters also matters, since screens like the Pack and the Mart menus are a fixed width. For example, when the name `"# DOLL@"` gets printed as "POKé DOLL", that's 9 characters, not 6. +**Names** are defined in [data/items/names.asm](../blob/master/data/items/names.asm). They're simply written as <code>li "<em>NAME</em>"</code>: an opening quote, the name and a closing quote. Names can be up to 12 characters long. The number of *printed* characters also matters, since screens like the Pack and the Mart menus are a fixed width. For example, when the name `"# DOLL"` gets printed as "POKé DOLL", that's 9 characters, not 6. **Descriptions** are defined in [data/items/descriptions.asm](../blob/master/data/items/descriptions.asm). Unlike with names, each entry in the table of descriptions is a pointer to the actual description data. Descriptions have two lines, each with up to 18 characters. Again, what matters is the printed length, since they have to fit in a text box of that size. @@ -87,10 +87,10 @@ Edit [constants/item_constants.asm](../blob/master/constants/item_constants.asm) Edit [data/items/names.asm](../blob/master/data/items/names.asm): ```diff - db "WATER STONE@" -- db "TERU-SAMA@" -+ db "BIG NUGGET@" - db "HP UP@" + li "WATER STONE" +- li "TERU-SAMA" ++ li "BIG NUGGET" + li "HP UP" ``` Edit [data/items/descriptions.asm](../blob/master/data/items/descriptions.asm): @@ -311,27 +311,24 @@ Then it's time to implement the specific Pokémon-catching effect. Edit [engine/ +; or are we in a cave? + ld a, [wEnvironment] + cp CAVE -+ jr z, .night_or_cave -+; neither night nor cave -+ ret ++ ret nz ; neither night nor cave + +.night_or_cave +; b is the catch rate -+; a := b / 2 + b + b + b == b × 3.5 ++; a := b + b + b == b × 3 + ld a, b -+ srl a -+rept 3 -+ add b ++ add a + jr c, .max -+endr -+ ret + ++ add b ++ ret nc ++; fallthrough +.max + ld b, $ff + ret ``` -`DuskBallMultiplier`, like all the Ball multiplier routines, just has to modify `b` according to the relevant factors. If it's nighttime or we're in a cave, it multiplies `b` by 3.5; otherwise it doesn't modify `b`. +`DuskBallMultiplier`, like all the Ball multiplier routines, just has to modify `b` according to the relevant factors. If it's nighttime or we're in a cave, it multiplies `b` by 3; otherwise it doesn't modify `b`.  |
