diff --git a/examples.js b/examples.js
index 6356834395a..20fbcfab5da 100644
--- a/examples.js
+++ b/examples.js
@@ -49,9 +49,9 @@ let folders = [
params: ['flame', '5, { matchCategories: true }', 'noblesse/[\'2pc\']'],
},
{
- function: 'recipes',
- params: ['temptation', '4, { matchCategories: true }', 'warrior, { matchCategories: true }',
- 'cabbage, { matchCategories: true }', 'atK, { matchCategories: true }', 'diluc, { matchAliases: true }'],
+ function: 'foods',
+ params: ['temptation', '4, { matchCategories: true }', 'def, { matchCategories: true }',
+ 'cabbage, { matchCategories: true }', 'diluc, { matchAliases: true }'],
},
{
function: 'elements',
diff --git a/examples.md b/examples.md
index 5faca120e93..c9299b4ce74 100644
--- a/examples.md
+++ b/examples.md
@@ -14,7 +14,7 @@ const genshindb = require('genshin-db');
- [genshindb.weaponmaterialtypes(query[, opts])](#genshindbweaponmaterialtypesquery-opts)
- [genshindb.talentmaterialtypes(query[, opts])](#genshindbtalentmaterialtypesquery-opts)
- [genshindb.artifacts(query[, opts])](#genshindbartifactsquery-opts)
-- [genshindb.recipes(query[, opts])](#genshindbrecipesquery-opts)
+- [genshindb.foods(query[, opts])](#genshindbfoodsquery-opts)
- [genshindb.elements(query[, opts])](#genshindbelementsquery-opts)
- [genshindb.rarity(query[, opts])](#genshindbrarityquery-opts)
@@ -925,7 +925,7 @@ const genshindb = require('genshin-db');
goblet: 'https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15018_1.png',
circlet: 'https://upload-os-bbs.mihoyo.com/game_record/genshin/equip/UI_RelicIcon_15018_3.png'
},
- url: undefined
+ url: { fandom: 'https://genshin-impact.fandom.com/wiki/Pale_Flame' }
}
```
@@ -964,116 +964,118 @@ const genshindb = require('genshin-db');
-## genshindb.recipes(query[, opts])]
+## genshindb.foods(query[, opts])]
-genshindb.recipes('temptation')
+genshindb.foods('temptation')
```js
{
name: "Adeptus' Temptation",
- rarity: '5',
- foodrecipetype: 'Warrior',
- effect: "Increases all party members' ATK by 260-372 and CRIT Rate by 8-12% for 300s.",
- description: 'A complex, famous type of Liyue cuisine, in which specially selected ingredients are submerged and slowly bowled in soup stock. The recipe scribbled from memory alone was enough to urge the adepti to once again return to the world of men.',
- buffs: [ 'ATK', 'CRIT Rate %' ],
- images: {
- image: 'https://static.wikia.nocookie.net/gensin-impact/images/5/5e/Item_Adeptus%27_Temptation.png'
+ rarity: 5,
+ foodtype: 'NORMAL',
+ foodfilter: 'ATK-Boosting Dish',
+ foodcategory: 'Atk_Add',
+ effect: "Increases all party members' ATK by 260–372 and CRIT Rate by 8–12% for 300s.\n" +
+ 'In Co-Op Mode, this effect only applies to your own character(s).',
+ description: 'A complex, famous type of Liyue cuisine, in which specially selected ingredients are submerged and slowly boiled in soup stock. The recipe scribbled from memory alone was enough to urge the adepti to once again return to the world of men.',
+ suspicious: {
+ effect: "Increases all party members' ATK by 260 and CRIT Rate by 8% for 300s. In Co-Op Mode, this effect only applies to your own character(s).",
+ description: "A complex, famous type of Liyue cuisine. Without having mastered the art of simmering, the resulting stew-like dish has a salty, fishy taste. But, just considering the costly ingredients will be enough to keep you going until the pot's empty."
+ },
+ normal: {
+ effect: "Increases all party members' ATK by 316 and CRIT Rate by 10% for 300s. In Co-Op Mode, this effect only applies to your own character(s).",
+ description: 'A complex, famous type of Liyue cuisine, in which specially selected ingredients are submerged and slowly boiled in soup stock. The recipe scribbled from memory alone was enough to urge the adepti to once again return to the world of men.'
},
- ingredients: [ 'Ham x4', 'Crab x3', 'Shrimp Meat x3', 'Matsutake x3' ],
- source: `Chest at the Adeptus' Abode above Qingyun Peak, Liyue after completing "3 Divine Birds" mini quest.`
+ delicious: {
+ effect: "Increases all party members' ATK by 372 and CRIT Rate by 12% for 300s. In Co-Op Mode, this effect only applies to your own character(s).",
+ description: "A complex, famous type of Liyue cuisine. This dish is a rare and exquisite mix of both land and sea, combining countless delicious delicacies in one flavor-filled pot. Each mouthful is a moment to remember — it's even irresistible enough to entice the adepti down from their celestial abode."
+ },
+ ingredients: [
+ { name: 'Ham', count: 4 },
+ { name: 'Crab', count: 3 },
+ { name: 'Shrimp Meat', count: 3 },
+ { name: 'Matsutake', count: 3 }
+ ],
+ images: {},
+ url: {
+ fandom: "https://genshin-impact.fandom.com/wiki/Adeptus'_Temptation"
+ }
}
```
-genshindb.recipes('4', { matchCategories: true })
-
-```js
-[ 'Golden Crab', 'Jade Parcels', 'Moon Pie', 'Tianshu Meat' ]
-```
-
-
-
-genshindb.recipes('warrior', { matchCategories: true })
+genshindb.foods('4', { matchCategories: true })
```js
[
- "Adeptus' Temptation",
- "Adventurer's Breakfast Sandwich",
- 'Almond Tofu',
- 'Cold Cut Platter',
- 'Come and Get It',
- 'Der Weisheit Letzter Schluss (Life)',
- 'Die Heilige Sinfonie',
- 'Fried Radish Balls',
+ 'Golden Crab',
+ 'Golden Fried Chicken',
'Jade Parcels',
- 'Jueyun Chili Chicken',
- 'Jueyun Guoba',
- 'No Tomorrow',
- '"Once Upon a Time in Mondstadt"',
- `"Pile 'Em Up"`,
- 'Qingce Stir Fry',
- "Rockin' Riffin' Chicken!",
- 'Satisfying Salad',
- 'Sautéed Matsutake',
+ 'Stormcrest Pie',
'Tianshu Meat'
]
```
-genshindb.recipes('cabbage', { matchCategories: true })
+genshindb.foods('def', { matchCategories: true })
```js
[
- 'Crab, Ham & Veggie Bake',
- 'Der Weisheit Letzter Schluss (Life)',
- 'Invigorating Pizza',
- 'Jade Parcels',
- 'Mushroom Pizza',
- 'Northern Smoked Chicken',
- 'Nutritious Meal (V.593)',
- 'Qingce Stir Fry',
- 'Satisfying Salad'
+ 'A Prize Catch',
+ 'Fish-Flavored Toast',
+ 'Golden Crab',
+ 'Jewelry Soup',
+ 'Lotus Flower Crisp',
+ 'Stormcrest Pie',
+ 'Woodland Dream',
+ 'Triple-Layered Consommé'
]
```
-genshindb.recipes('atK', { matchCategories: true })
+genshindb.foods('cabbage', { matchCategories: true })
```js
[
- "Adeptus' Temptation",
- "Adventurer's Breakfast Sandwich",
- 'Almond Tofu',
- 'Fried Radish Balls',
+ 'Nutritious Meal (V.593)',
+ 'Golden Chicken Burger',
'Jade Parcels',
+ 'Invigorating Pizza',
+ 'Northern Smoked Chicken',
'Qingce Stir Fry',
- 'Sautéed Matsutake'
+ 'Der Weisheit Letzter Schluss (Life)'
]
```
-genshindb.recipes('diluc', { matchAliases: true })
+genshindb.foods('diluc', { matchAliases: true })
```js
{
name: '"Once Upon a Time in Mondstadt"',
- rarity: '3',
- foodrecipetype: 'Warrior',
- effect: "Increases all party members' CRIT Rate by 20% and CRIT DMG by 20% for 300s.",
+ rarity: 3,
+ foodtype: 'SPECIALTY',
+ foodfilter: 'ATK-Boosting Dish',
+ foodcategory: 'Atk_CritRate',
+ effect: "Increases all party members' CRIT Rate by 20% and CRIT DMG by 20% for 300s. In Co-Op Mode, this effect only applies to your own character(s)",
description: "Diluc's specialty. Feast your eyes and then your stomach upon this delicacy as the soft ribs melt in your mouth. Who knew Diluc was able to cook this well?",
- buffs: [ 'CRIT Rate %', 'CRIT DMG %' ],
- images: {
- image: 'https://static.wikia.nocookie.net/gensin-impact/images/e/e0/Item_%22Once_Upon_a_Time_in_Mondstadt%22.png'
- },
- ingredients: [ 'Raw Meat x3', 'Potato x3', 'Small Lamp Grass x1', 'Cheese x1' ],
- source: `Diluc's specialty dish from cooking "Pile 'Em Up".`,
- base: `"Pile 'Em Up"`,
- cook: 'Diluc'
+ basedish: `"Pile 'Em Up"`,
+ character: 'Diluc',
+ ingredients: [
+ { name: 'Raw Meat', count: 3 },
+ { name: 'Potato', count: 3 },
+ { name: 'Small Lamp Grass', count: 1 },
+ { name: 'Cheese', count: 1 }
+ ],
+ images: {},
+ url: {
+ fandom: 'https://genshin-impact.fandom.com/wiki/"Once_Upon_a_Time_in_Mondstadt"'
+ }
}
```
diff --git a/readme.md b/readme.md
index 7925d1c4452..1639627c3ba 100644
--- a/readme.md
+++ b/readme.md
@@ -6,7 +6,7 @@
Flexibly search and get the information of characters, talents, constellations, weapons, weapon material, talent material, artifacts, food recipes.
-All in-game languages are supported for query and result. (translations available only for characters, talents, constellations, weapons, artifacts currently).
+All in-game languages are supported for query and result. (translations available only for characters, talents, constellations, weapons, artifacts, foods currently).
Install with:
```cmd
@@ -38,7 +38,7 @@ If you need help or have questions, you can talk to me in [my discord](https://d
- [genshindb.weaponmaterialtypes(query[, opts])](#genshindbweaponmaterialtypesquery-opts)
- [genshindb.talentmaterialtypes(query[, opts])](#genshindbtalentmaterialtypesquery-opts)
- [genshindb.artifacts(query[, opts])](#genshindbartifactsquery-opts)
-- [genshindb.recipes(query[, opts])](#genshindbrecipesquery-opts)
+- [genshindb.foods(query[, opts])](#genshindbfoodsquery-opts)
- [genshindb.elements(query[, opts])](#genshindbelementsquery-opts)
- [genshindb.rarity(query[, opts])](#genshindbrarityquery-opts)
@@ -142,7 +142,7 @@ Possible inputs for query parameter are:
Check out [categories.json](https://github.com/theBowja/genshin-db/blob/main/src/english/categories.json) file to see choices for each category.\
Check out [examples.md](https://github.com/theBowja/genshin-db/blob/main/examples.md#genshindbartifactsquery-opts) to see example inputs and outputs for this function.
-## genshindb.recipes(query[, opts])
+## genshindb.foods(query[, opts])
Possible inputs for query parameter are:
@@ -154,7 +154,7 @@ Possible inputs for query parameter are:
- all characters with specialty dishes
Check out [categories.json](https://github.com/theBowja/genshin-db/blob/main/src/english/categories.json) file to see choices for each category.\
-Check out [examples.md](https://github.com/theBowja/genshin-db/blob/main/examples.md#genshindbrecipesquery-opts) to see example inputs and outputs for this function.
+Check out [examples.md](https://github.com/theBowja/genshin-db/blob/main/examples.md#genshindbfoodsquery-opts) to see example inputs and outputs for this function.
## genshindb.elements(query[, opts])
diff --git a/src/getdata.js b/src/getdata.js
index 409939c73a6..581a7227d87 100644
--- a/src/getdata.js
+++ b/src/getdata.js
@@ -6,7 +6,7 @@ const allstats = require('./min/stats.min.json');
const allcurve = require('./min/curve.min.json');
const availableimage = ['characters', 'artifacts', 'weapons', 'constellations', 'talents'];
-const availableurl = ['characters', 'artifacts', 'weapons']
+const availableurl = ['characters', 'artifacts', 'weapons', 'foods'];
const availablestats = ['characters', 'weapons'];
const availablecurve = ['characters', 'weapons'];
diff --git a/src/main.js b/src/main.js
index 51396de6015..54e433a5d35 100644
--- a/src/main.js
+++ b/src/main.js
@@ -149,10 +149,10 @@ genshin.rarity = function(query, opts) {
return searchFolder(query, 'rarity', opts);
}
-genshin.recipes = function(query, opts) {
- return searchFolder(query, 'recipes', opts)
+genshin.foods = function(query, opts) {
+ return searchFolder(query, 'foods', opts)
}
-genshin.recipe = genshin.recipes;
+genshin.food = genshin.foods;
// genshin.reactions = function(query, opts={}) {
// opts = Object.assign({}, baseoptions, sanitizeOptions(opts));