From f04987f9905c73100f9f8378e0bb87c53607f616 Mon Sep 17 00:00:00 2001 From: Jalyna Date: Sat, 26 Jan 2019 12:58:24 +0100 Subject: [PATCH] Add revives fix #90 (#94) --- CHANGELOG.md | 5 ++ README.md | 4 +- data/item.json | 2 +- data/item/max_revive.json | 84 ++++++++++++++++++++++++++++++++++ data/item/revive.json | 91 +++++++++++++++++++++++++++++++++++++ data/schemas/item.json | 3 ++ doc/item.md | 2 + test/test-oakdex-pokedex.js | 2 +- 8 files changed, 189 insertions(+), 4 deletions(-) create mode 100644 data/item/max_revive.json create mode 100644 data/item/revive.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 7acdaf66..c50a5c00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. Please keep to the changelog format described on [keepachangelog.com](http://keepachangelog.com). +## [Unreleased] + +### Added +- Added Revive and Max Revive + ## [0.4.1] - 2019-01-22 ### Added diff --git a/README.md b/README.md index ffd7fb65..4acb5129 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Oakdex::Pokedex::Move.where(type: 'Ground').size # => 26 Oakdex::Pokedex::Item.all.size -# => 5, still WIP +# => 7, still WIP Oakdex::Pokedex::Item.where(category: 'Potion').size # => 5 @@ -135,7 +135,7 @@ const allPokemon = oakdexPokedex.allPokemon() console.log(allPokemon.length); // 807 const allItems = oakdexPokedex.allItems() -console.log(allItems.length); // 5, WIP +console.log(allItems.length); // 7, WIP const darkPokemon = oakdexPokedex.allPokemon({ type: 'Dark' }) console.log(darkPokemon.length); // 46 diff --git a/data/item.json b/data/item.json index 03d5b830..1a393d3a 100644 --- a/data/item.json +++ b/data/item.json @@ -1 +1 @@ -{"Full Restore":{"names":{"en":"Full Restore","de":"Top-Genesung","fr":"Guérison","es":"Restaurar Todo","it":"Ricarica Totale"},"category":"Potions","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Fully restores HP & status.","de":"Stellt KP und Status wieder her."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Fully restores the HP and status of a Pokémon.","de":"Stellt KP und Status eines POKéMON wieder her."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A medicine that fully restores the HP and heals any status problems of one Pokémon.","de":"Stellt gesamte KP und Status eines POKéMON wieder her."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A medicine that fully restores the HP and heals any status problems of a single Pokémon.","de":"Dieses Item stellt alle KP eines Pokémon wieder her und behebt alle Statusprobleme des Pokémon."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A medicine that can be used to fully restore the HP of a single Pokémon and heal any status conditions it has.","de":"Dieses Item stellt alle KP eines Pokémon wieder her und behebt alle Statusprobleme."}}],"prices":[{"games":["Red","Blue","Yellow","Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"buying":3000,"selling":1500}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by_percent":100},{"field":"status_condition","change":"remove","conditions":["poison","bad_poison","paralysis","sleep","burn","freeze","confusion"]}]}]},"Super Potion":{"names":{"en":"Super Potion","de":"Supertrank","fr":"Super Potion","es":"Súper Poción","it":"Superpozione"},"category":"Potions","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Restores Pokémon HP by 50.","de":"Füllt die KP um 50 auf. Bitter."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Restores the HP of a Pokémon by 50 points.","de":"Füllt KP eines POKéMON um 50 Punkte auf."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A spray-type wound medicine. It restores the HP of one Pokémon by 50 points.","de":"Füllt die KP eines POKéMON um 50 Punkte auf."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A spray-type medicine for wounds. It restores the HP of one Pokémon by 50 points.","de":"Hilft bei Wunden. Es füllt die KP eines Pokémon um 50 Punkte wieder auf."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire"],"translations":{"en":"A spray-type medicine for treating wounds. It can be used to restore 50 HP to an injured Pokémon.","de":" Hilft bei Wunden. Füllt die KP eines Pokémon um 50 Punkte auf."}},{"games":["Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A spray-type medicine for treating wounds. It can be used to restore 60 HP to an injured Pokémon.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon um 60 Punkte auf."}}],"prices":[{"games":["Red","Blue","Yellow","Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"buying":700,"selling":350}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by":60}]}]},"Hyper Potion":{"names":{"en":"Hyper Potion","de":"Hypertrank","fr":"Hyper Potion","es":"Híper Poción","it":"Iperpozione"},"category":"Potions","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Restores Pokémon HP by 200.","de":"Füllt die KP um 200 auf."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Restores the HP of a Pokémon by 200 points.","de":"Füllt die KP eines POKéMON um 200 Punkte auf."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A spray-type wound medicine. It restores the HP of one Pokémon by 200 points.","de":"Füllt die KP eines POKéMON um 200 Punkte auf."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A spray-type medicine for wounds. It restores the HP of one Pokémon by 200 points.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon um 200 Punkte wieder auf."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire"],"translations":{"en":"A spray-type medicine for treating wounds. It can be used to restore 200 HP to an injured Pokémon.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon um 200 Punkte auf."}},{"games":["Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A spray-type medicine for treating wounds. It can be used to restore 120 HP to an injured Pokémon.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon um 120 Punkte auf."}}],"prices":[{"games":["Red","Blue","Yellow"],"buying":1500,"selling":750},{"games":["Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire"],"buying":1200,"selling":600},{"games":["Sun","Moon","Ultra Sun","Ultra Moon"],"buying":1500,"selling":750}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by":120}]}]},"Max Potion":{"names":{"en":"Max Potion","de":"Top-Trank","fr":"Potion Max","es":"Máxima Poción","it":"Pozione Max"},"category":"Potions","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Fully restores Pokémon HP.","de":"Füllt KP vollständig auf."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Fully restores the HP of a Pokémon.","de":"Füllt die KP vollständig auf."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A spray-type wound medicine. It fully restores the HP of one Pokémon.","de":"Füllt die KP eines POKéMON vollständig auf."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A spray-type medicine for wounds. It completely restores the HP of a single Pokémon.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon vollständig wieder auf."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A spray-type medicine for treating wounds. It will completely restore the max HP of a single Pokémon.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon wieder vollständig auf."}}],"prices":[{"games":["Red","Blue","Yellow","Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"buying":2500,"selling":1250}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by_percent":100}]}]},"Potion":{"names":{"en":"Potion","de":"Trank","fr":"Potion","es":"Poción","it":"Pozione"},"category":"Potions","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Restores Pokémon HP by 20.","de":"Füllt die KP um 20 auf."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Restores the HP of a Pokémon by 20 points.","de":"Füllt die KP eines POKéMON um 20 Punkte auf."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A spray-type wound medicine. It restores the HP of one Pokémon by 20 points.","de":"Die KP eines POKéMON werden um 20 Punkte aufgefüllt."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A spray-type medicine for wounds. It restores the HP of one Pokémon by just 20 points.","de":"Hilft bei Wunden. Die KP eines Pokémon werden um 20 Punkte aufgefüllt."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A spray-type medicine for treating wounds. It can be used to restore 20 HP to an injured Pokémon.","de":"Hilft bei Wunden. Die KP eines Pokémon werden um 20 Punkte aufgefüllt."}}],"prices":[{"games":["Red","Blue","Yellow","Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire"],"buying":300,"selling":150},{"games":["Sun","Moon","Ultra Sun","Ultra Moon"],"buying":200,"selling":100}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by":20}]}]}} \ No newline at end of file +{"Full Restore":{"names":{"en":"Full Restore","de":"Top-Genesung","fr":"Guérison","es":"Restaurar Todo","it":"Ricarica Totale"},"category":"Potions","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Fully restores HP & status.","de":"Stellt KP und Status wieder her."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Fully restores the HP and status of a Pokémon.","de":"Stellt KP und Status eines POKéMON wieder her."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A medicine that fully restores the HP and heals any status problems of one Pokémon.","de":"Stellt gesamte KP und Status eines POKéMON wieder her."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A medicine that fully restores the HP and heals any status problems of a single Pokémon.","de":"Dieses Item stellt alle KP eines Pokémon wieder her und behebt alle Statusprobleme des Pokémon."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A medicine that can be used to fully restore the HP of a single Pokémon and heal any status conditions it has.","de":"Dieses Item stellt alle KP eines Pokémon wieder her und behebt alle Statusprobleme."}}],"prices":[{"games":["Red","Blue","Yellow","Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"buying":3000,"selling":1500}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by_percent":100},{"field":"status_condition","change":"remove","conditions":["poison","bad_poison","paralysis","sleep","burn","freeze","confusion"]}]}]},"Super Potion":{"names":{"en":"Super Potion","de":"Supertrank","fr":"Super Potion","es":"Súper Poción","it":"Superpozione"},"category":"Potions","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Restores Pokémon HP by 50.","de":"Füllt die KP um 50 auf. Bitter."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Restores the HP of a Pokémon by 50 points.","de":"Füllt KP eines POKéMON um 50 Punkte auf."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A spray-type wound medicine. It restores the HP of one Pokémon by 50 points.","de":"Füllt die KP eines POKéMON um 50 Punkte auf."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A spray-type medicine for wounds. It restores the HP of one Pokémon by 50 points.","de":"Hilft bei Wunden. Es füllt die KP eines Pokémon um 50 Punkte wieder auf."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire"],"translations":{"en":"A spray-type medicine for treating wounds. It can be used to restore 50 HP to an injured Pokémon.","de":" Hilft bei Wunden. Füllt die KP eines Pokémon um 50 Punkte auf."}},{"games":["Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A spray-type medicine for treating wounds. It can be used to restore 60 HP to an injured Pokémon.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon um 60 Punkte auf."}}],"prices":[{"games":["Red","Blue","Yellow","Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"buying":700,"selling":350}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by":60}]}]},"Revive":{"names":{"en":"Revive","de":"Beleber","fr":"Rappel","es":"Revivir","it":"Revitaliz."},"category":"Revives","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Restores a fainted Pokémon to ½ HP.","de":"Belebt POKéMON plus halbe KP."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Revives a fainted Pokémon with half its HP.","de":"Belebt POKéMON und füllt die KP zur Hälfte wieder auf."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A medicine that revives a fainted Pokémon, restoring HP by half the maximum amount.","de":"Belebt ein POKéMON und füllt dessen KP zur Hälfte wieder auf."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A medicine that revives a fainted Pokémon. It restores half the Pokémon's maximum HP.","de":"Eine Medizin, die ein kampfunfähiges Pokémon wiederbelebt. Die Hälfte der maximalen KP werden wiederhergestellt."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A medicine that can revive fainted Pokémon. It also restores half of a fainted Pokémon's maximum HP.","de":"Eine Medizin, die ein kampfunfähiges Pokémon wiederbelebt. Die Hälfte der maximalen KP wird wiederhergestellt."}}],"prices":[{"games":["Red","Blue","Yellow","Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire"],"buying":1500,"selling":750},{"games":["Sun","Moon","Ultra Sun","Ultra Moon"],"buying":2000,"selling":1000}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by_percent":50,"revive":true}]}]},"Max Revive":{"names":{"en":"Max Revive","de":"Top-Beleber","fr":"Rappel Max","es":"Revivir Máximo","it":"Revital. Max"},"category":"Revives","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Fully restores a fainted Pokémon.","de":"Belebt POKéMON plus volle KP."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Revives a fainted Pokémon with all its HP.","de":"Belebt POKéMON und füllt KP vollständig wieder auf."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A medicine that revives a fainted Pokémon, restoring HP fully.","de":"Belebt ein POKéMON und füllt die KP vollständig wieder auf."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A medicine that revives a fainted Pokémon. It fully restores the Pokémon's HP.","de":"Eine Medizin, die ein kampfunfähiges Pokémon wiederbelebt. Die KP werden vollständig wiederhergestellt."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A medicine that can revive fainted Pokémon. It also fully restores a fainted Pokémon's maximum HP.","de":"Eine Medizin, die ein kampfunfähiges Pokémon wiederbelebt. Die KP werden vollständig wiederhergestellt."}}],"prices":[{"games":["Red","Blue","Yellow","Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"buying":0,"selling":2000}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by_percent":100,"revive":true}]}]},"Hyper Potion":{"names":{"en":"Hyper Potion","de":"Hypertrank","fr":"Hyper Potion","es":"Híper Poción","it":"Iperpozione"},"category":"Potions","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Restores Pokémon HP by 200.","de":"Füllt die KP um 200 auf."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Restores the HP of a Pokémon by 200 points.","de":"Füllt die KP eines POKéMON um 200 Punkte auf."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A spray-type wound medicine. It restores the HP of one Pokémon by 200 points.","de":"Füllt die KP eines POKéMON um 200 Punkte auf."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A spray-type medicine for wounds. It restores the HP of one Pokémon by 200 points.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon um 200 Punkte wieder auf."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire"],"translations":{"en":"A spray-type medicine for treating wounds. It can be used to restore 200 HP to an injured Pokémon.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon um 200 Punkte auf."}},{"games":["Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A spray-type medicine for treating wounds. It can be used to restore 120 HP to an injured Pokémon.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon um 120 Punkte auf."}}],"prices":[{"games":["Red","Blue","Yellow"],"buying":1500,"selling":750},{"games":["Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire"],"buying":1200,"selling":600},{"games":["Sun","Moon","Ultra Sun","Ultra Moon"],"buying":1500,"selling":750}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by":120}]}]},"Max Potion":{"names":{"en":"Max Potion","de":"Top-Trank","fr":"Potion Max","es":"Máxima Poción","it":"Pozione Max"},"category":"Potions","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Fully restores Pokémon HP.","de":"Füllt KP vollständig auf."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Fully restores the HP of a Pokémon.","de":"Füllt die KP vollständig auf."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A spray-type wound medicine. It fully restores the HP of one Pokémon.","de":"Füllt die KP eines POKéMON vollständig auf."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A spray-type medicine for wounds. It completely restores the HP of a single Pokémon.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon vollständig wieder auf."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A spray-type medicine for treating wounds. It will completely restore the max HP of a single Pokémon.","de":"Hilft bei Wunden. Füllt die KP eines Pokémon wieder vollständig auf."}}],"prices":[{"games":["Red","Blue","Yellow","Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"buying":2500,"selling":1250}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by_percent":100}]}]},"Potion":{"names":{"en":"Potion","de":"Trank","fr":"Potion","es":"Poción","it":"Pozione"},"category":"Potions","descriptions":[{"games":["Gold","Silver","Crystal"],"translations":{"en":"Restores Pokémon HP by 20.","de":"Füllt die KP um 20 auf."}},{"games":["Ruby","Sapphire","Emerald"],"translations":{"en":"Restores the HP of a Pokémon by 20 points.","de":"Füllt die KP eines POKéMON um 20 Punkte auf."}},{"games":["FireRed","LeafGreen"],"translations":{"en":"A spray-type wound medicine. It restores the HP of one Pokémon by 20 points.","de":"Die KP eines POKéMON werden um 20 Punkte aufgefüllt."}},{"games":["Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2"],"translations":{"en":"A spray-type medicine for wounds. It restores the HP of one Pokémon by just 20 points.","de":"Hilft bei Wunden. Die KP eines Pokémon werden um 20 Punkte aufgefüllt."}},{"games":["X","Y","Omega Ruby","Alpha Sapphire","Sun","Moon","Ultra Sun","Ultra Moon"],"translations":{"en":"A spray-type medicine for treating wounds. It can be used to restore 20 HP to an injured Pokémon.","de":"Hilft bei Wunden. Die KP eines Pokémon werden um 20 Punkte aufgefüllt."}}],"prices":[{"games":["Red","Blue","Yellow","Gold","Silver","Crystal","Ruby","Sapphire","Emerald","FireRed","LeafGreen","Diamond","Pearl","Platinum","HeartGold","SoulSilver","Black","White","Black 2","White 2","X","Y","Omega Ruby","Alpha Sapphire"],"buying":300,"selling":150},{"games":["Sun","Moon","Ultra Sun","Ultra Moon"],"buying":200,"selling":100}],"pockets":[{"generations":[1,2,3],"pocket":"Items"},{"generations":[4,5,6,7],"pocket":"Medicine"}],"fling_power":30,"effects":[{"condition":"Always","target":"Single Pokemon","pokemon_changes":[{"field":"current_hp","change_by":20}]}]}} \ No newline at end of file diff --git a/data/item/max_revive.json b/data/item/max_revive.json new file mode 100644 index 00000000..5b85e17f --- /dev/null +++ b/data/item/max_revive.json @@ -0,0 +1,84 @@ +{ + "names": { + "en": "Max Revive", + "de": "Top-Beleber", + "fr": "Rappel Max", + "es": "Revivir Máximo", + "it": "Revital. Max" + }, + "category": "Revives", + "descriptions": [ + { + "games": ["Gold", "Silver", "Crystal"], + "translations": { + "en": "Fully restores a fainted Pokémon.", + "de": "Belebt POKéMON plus volle KP." + } + }, + { + "games": ["Ruby", "Sapphire", "Emerald"], + "translations": { + "en": "Revives a fainted Pokémon with all its HP.", + "de": "Belebt POKéMON und füllt KP vollständig wieder auf." + } + }, + { + "games": ["FireRed", "LeafGreen"], + "translations": { + "en": "A medicine that revives a fainted Pokémon, restoring HP fully.", + "de": "Belebt ein POKéMON und füllt die KP vollständig wieder auf." + } + }, + { + "games": ["Diamond", "Pearl", "Platinum", "HeartGold", + "SoulSilver", "Black", "White", "Black 2", "White 2"], + "translations": { + "en": "A medicine that revives a fainted Pokémon. It fully restores the Pokémon's HP.", + "de": "Eine Medizin, die ein kampfunfähiges Pokémon wiederbelebt. Die KP werden vollständig wiederhergestellt." + } + }, + { + "games": ["X", "Y", "Omega Ruby", "Alpha Sapphire", "Sun", "Moon", "Ultra Sun", "Ultra Moon"], + "translations": { + "en": "A medicine that can revive fainted Pokémon. It also fully restores a fainted Pokémon's maximum HP.", + "de": "Eine Medizin, die ein kampfunfähiges Pokémon wiederbelebt. Die KP werden vollständig wiederhergestellt." + } + } + ], + "prices": [ + { + "games": [ + "Red", "Blue", "Yellow", "Gold", "Silver", "Crystal", "Ruby", "Sapphire", + "Emerald", "FireRed", "LeafGreen", "Diamond", "Pearl", "Platinum", "HeartGold", + "SoulSilver", "Black", "White", "Black 2", "White 2", "X", "Y", "Omega Ruby", + "Alpha Sapphire", "Sun", "Moon", "Ultra Sun", "Ultra Moon" + ], + "buying": 0, + "selling": 2000 + } + ], + "pockets": [ + { + "generations": [1, 2, 3], + "pocket": "Items" + }, + { + "generations": [4, 5, 6, 7], + "pocket": "Medicine" + } + ], + "fling_power": 30, + "effects": [ + { + "condition": "Always", + "target": "Single Pokemon", + "pokemon_changes": [ + { + "field": "current_hp", + "change_by_percent": 100, + "revive": true + } + ] + } + ] +} diff --git a/data/item/revive.json b/data/item/revive.json new file mode 100644 index 00000000..5ad2d23f --- /dev/null +++ b/data/item/revive.json @@ -0,0 +1,91 @@ +{ + "names": { + "en": "Revive", + "de": "Beleber", + "fr": "Rappel", + "es": "Revivir", + "it": "Revitaliz." + }, + "category": "Revives", + "descriptions": [ + { + "games": ["Gold", "Silver", "Crystal"], + "translations": { + "en": "Restores a fainted Pokémon to ½ HP.", + "de": "Belebt POKéMON plus halbe KP." + } + }, + { + "games": ["Ruby", "Sapphire", "Emerald"], + "translations": { + "en": "Revives a fainted Pokémon with half its HP.", + "de": "Belebt POKéMON und füllt die KP zur Hälfte wieder auf." + } + }, + { + "games": ["FireRed", "LeafGreen"], + "translations": { + "en": "A medicine that revives a fainted Pokémon, restoring HP by half the maximum amount.", + "de": "Belebt ein POKéMON und füllt dessen KP zur Hälfte wieder auf." + } + }, + { + "games": ["Diamond", "Pearl", "Platinum", "HeartGold", + "SoulSilver", "Black", "White", "Black 2", "White 2"], + "translations": { + "en": "A medicine that revives a fainted Pokémon. It restores half the Pokémon's maximum HP.", + "de": "Eine Medizin, die ein kampfunfähiges Pokémon wiederbelebt. Die Hälfte der maximalen KP werden wiederhergestellt." + } + }, + { + "games": ["X", "Y", "Omega Ruby", "Alpha Sapphire", "Sun", "Moon", "Ultra Sun", "Ultra Moon"], + "translations": { + "en": "A medicine that can revive fainted Pokémon. It also restores half of a fainted Pokémon's maximum HP.", + "de": "Eine Medizin, die ein kampfunfähiges Pokémon wiederbelebt. Die Hälfte der maximalen KP wird wiederhergestellt." + } + } + ], + "prices": [ + { + "games": [ + "Red", "Blue", "Yellow", "Gold", "Silver", "Crystal", "Ruby", "Sapphire", + "Emerald", "FireRed", "LeafGreen", "Diamond", "Pearl", "Platinum", "HeartGold", + "SoulSilver", "Black", "White", "Black 2", "White 2", "X", "Y", "Omega Ruby", + "Alpha Sapphire" + ], + "buying": 1500, + "selling": 750 + }, + { + "games": [ + "Sun", "Moon", "Ultra Sun", "Ultra Moon" + ], + "buying": 2000, + "selling": 1000 + } + ], + "pockets": [ + { + "generations": [1, 2, 3], + "pocket": "Items" + }, + { + "generations": [4, 5, 6, 7], + "pocket": "Medicine" + } + ], + "fling_power": 30, + "effects": [ + { + "condition": "Always", + "target": "Single Pokemon", + "pokemon_changes": [ + { + "field": "current_hp", + "change_by_percent": 50, + "revive": true + } + ] + } + ] +} diff --git a/data/schemas/item.json b/data/schemas/item.json index 8da383af..37ac5fbe 100644 --- a/data/schemas/item.json +++ b/data/schemas/item.json @@ -38,6 +38,9 @@ "minimum": -100, "maximum": 100 }, + "revive": { + "type": "boolean" + }, "change_by": { "type": "integer", "minimum": -10000, diff --git a/doc/item.md b/doc/item.md index 11f9a8ef..8db6bbc5 100644 --- a/doc/item.md +++ b/doc/item.md @@ -155,6 +155,8 @@ Additional restrictions: * Minimum: `-100` * Maximum: `100` +#### `revive` (boolean) + #### `change_by` (integer) Additional restrictions: diff --git a/test/test-oakdex-pokedex.js b/test/test-oakdex-pokedex.js index 55f20cac..189fbf26 100644 --- a/test/test-oakdex-pokedex.js +++ b/test/test-oakdex-pokedex.js @@ -322,7 +322,7 @@ describe('OakdexPokedex', function() { describe('#allItems', function() { it('finds all items', function(done) { const list = oakdexPokedex.allItems() - expect(list.length).to.equal(5); + expect(list.length >= 7).to.be(true); done(); });