diff options
-rw-r--r-- | Add-different-kinds-of-new-items.md | 61 |
1 files changed, 2 insertions, 59 deletions
diff --git a/Add-different-kinds-of-new-items.md b/Add-different-kinds-of-new-items.md index e9738c8..6ed8213 100644 --- a/Add-different-kinds-of-new-items.md +++ b/Add-different-kinds-of-new-items.md @@ -146,66 +146,9 @@ Anyway, that's all you need to add a basic item: A Sweet Heart, from Gen 5, restores 20 HP. It can be used on the field or during battle, and enemy trainer AI should know how to use one too. -Edit [constants/item_constants.asm](../blob/master/constants/item_constants.asm): - -```diff - const DIRE_HIT ; 2c -- const ITEM_2D ; 2d -+ const SWEET_HEART ; 2d - const FRESH_WATER ; 2e -``` - -Edit [data/items/names.asm](../blob/master/data/items/names.asm): - -```diff - db "DIRE HIT@" -- db "TERU-SAMA@" -+ db "SWEET HEART@" - db "FRESH WATER@" -``` - -Edit [data/items/descriptions.asm](../blob/master/data/items/descriptions.asm): - -```diff - dw DireHitDesc -- dw TeruSama3Desc -+ dw SweetHeartDesc - dw FreshWaterDesc - - ... - --TeruSama3Desc: -- db "?@" -+SweetHeartDesc: -+ db "Restores #MON" -+ next "HP by 20.@" -``` - -Edit [data/items/attributes.asm](../blob/master/data/items/attributes.asm): - -```diff --; ITEM_2D -- item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE -+; SWEET_HEART -+ item_attribute 100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY -``` - -Edit [data/items/item_effects.asm](../blob/master/data/items/item_effects.asm): - -```diff - dw DireHitEffect ; DIRE_HIT -- dw NoEffect ; ITEM_2D -+ dw RestoreHPEffect ; SWEET_HEART - dw RestoreHPEffect ; FRESH_WATER -``` - -And edit [data/items/catch_rate_items.asm](../blob/master/data/items/catch_rate_items.asm): - -```diff -- db ITEM_2D, BITTER_BERRY -``` +First, add the essential data. Replace `ITEM_2D` with `SWEET_HEART`; give it a name, description, and attributes (`item_attribute 100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY`); give it the `RestoreHPEffect`; and remove `ITEM_2D` from `TimeCapsule_CatchRateItems`. -Now it's time to implement the specific HP healing amount for Sweet Heart. Notice how most healing items—Potion, Fresh Water, etc—have an `item_attribute` parameter value equal to how much they heal? Those aren't actually used anywhere. Instead, the healing amounts for items used by the player, by the enemy trainer, and (when possible) by the Pokémon holding it are all handled separately. +Then it's time to implement the specific HP healing amount for Sweet Heart. Notice how most healing items—Potion, Fresh Water, etc—have an `item_attribute` parameter value equal to how much they heal? Those aren't actually used anywhere. Instead, the healing amounts for items used by the player, by the enemy trainer, and (when possible) by the Pokémon holding it are all handled separately. Edit [data/items/heal_hp.asm](../blob/master/data/items/heal_hp.asm): |