Skip to content

Commit

Permalink
wrapped up talents
Browse files Browse the repository at this point in the history
  • Loading branch information
theBowja committed Nov 27, 2020
1 parent a458872 commit 2fa802e
Show file tree
Hide file tree
Showing 10 changed files with 184 additions and 16 deletions.
91 changes: 91 additions & 0 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const genshin = require('genshin-db');
## Table of Contents

- [genshin.characters(query[, opts])](#genshincharactersquery-opts)
- [genshin.talents(query[, opts])](#genshintalentsquery-opts)
- [genshin.constellations(query[, opts])](#genshinconstellationsquery-opts)
- [genshin.weapons(query[, opts])](#genshinweaponsquery-opts)
- [genshin.weaponmaterialtypes(query[, opts])](#genshinweaponmaterialtypesquery-opts)
Expand Down Expand Up @@ -90,6 +91,96 @@ const genshin = require('genshin-db');
[ 'Fischl', 'Kaeya', 'Lisa', 'Venti' ]
```

# genshin.talents(query[, opts])

- [genshin.talents('ninguang')](#genshintalentsninguang)
- [genshin.talents('klee').passive3](#genshintalentskleepassive3)
- [genshin.talents('mona').combatsp](#genshintalentsmonacombatsp)

## genshin.talents('ninguang')

```js
{
name: 'Ningguang',
combat1: {
name: 'Normal Attack: Sparkling Scatter',
image: '',
info: '**Normal Attack**\n' +
'Shoots gems that deal Geo DMG.\n' +
'Upon hit, this grants Ningguang 1 Star Jade.\n' +
'\n' +
'**Charged Attack**\n' +
'Consumes a certain amount of stamina to fire off a giant gem that deals Geo DMG.\n' +
'If Ningguang has any Star Jades, unleashing a Charged Attack will cause the Star Jades to be fired at the enemy as well, dealing additional DMG.\n' +
'\n' +
'**Plunging Attack**\n' +
'Gathering the might of Geo, Ningguang plunges towards the ground from mid-air, damaging all enemies in her path. Deals AoE Geo DMG upon impact with the ground.',
attributes: ''
},
combat2: {
name: 'Jade Screen',
image: '',
info: 'Ningguang creates a Jade Screen out of gold, obsidian and her great opulence, dealing AoE Geo DMG.\n' +
'\n' +
'**Jade Screen**\n' +
'- Blocks enemy projectiles.\n' +
"- Endurance scales based on Ningguang's Max HP.\n" +
'\n' +
'Jade Screen is considered a Geo Construct and can be used to block certain attacks, but cannot be climbed. Only one Jade Screen may exist at any one time.',
description: 'The canvas of stars is written upon this jade screen.',
attributes: ''
},
combat3: {
name: 'Starshatter',
image: '',
info: 'Gathering a great number of gems, Ningguang scatters them all at once, sending homing projectiles at her enemies that deal massive Geo DMG. If Starshatter is cast when a Jade Screen is nearby, the Jade Screen will fire additional gem projectiles at the same time.',
description: 'Stars shatter. Silence falls.',
attributes: ''
},
passive1: {
name: 'Backup Plan',
image: '',
info: 'When Ningguang is in possession of Star Jades, her Charged Attack does not consume Stamina.'
},
passive2: {
name: 'Strategic Reserve',
image: '',
info: 'A character that passes through the Jade Screen will gain a 12% Geo DMG Bonus for 10s.'
},
passive3: {
name: 'Trove of Marvelous Treasures',
image: '',
info: 'Displays the location of nearby ore veins (Iron Ore, White Iron Ore, Crystal Ore, and Magical Crystal Ore) on them mini-map.'
}
}
```

## genshin.talents('klee').passive3

```js
{
name: 'All Of My Treasures!',
image: '',
info: 'Displays the location of nearby resources unique to Mondstadt on the mini-map.'
}
```

## genshin.talents('mona').combatsp

```js
{
name: 'Illusory Torrent',
image: '',
info: '**Alternate Sprint**\n' +
"Mona cloaks herself within the water's flow, consuming Stamina to move rapidly.\n" +
'\n' +
'When under the effect of Illusory Torrent, Mona can move at high speed on water.\n' +
'Applies the Wet status to nearby enemies when she reappears.',
description: "This is something that Mona can do, but her teacher cannot. Well, but it's not as if her teacher would pursue any matter concerning Hydro Visions anyways...",
attributes: ''
}
```

# genshin.constellations(query[, opts])

- [genshin.constellations('amber')](#genshinconstellationsamber)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "genshin-db",
"version": "1.8.1",
"version": "1.9.0",
"description": "api for detailed information on genshin impact based on version 1.0.1 from the fandom and various others.",
"main": "./src/main.js",
"scripts": {
Expand Down
30 changes: 17 additions & 13 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

------------------------------------

Flexibly search and get the information of characters, weapons, weapon material, talent material, artifacts and more.
Flexibly search and get the information of characters, talents, constellations, weapons, weapon material, talent material, artifacts.

```js
const genshin = require('genshin-db');
Expand All @@ -19,6 +19,7 @@ NOTES: every input string to the query parameter will be autocompleted to match
- [genshin.setOptions(opts)](#genshinsetoptionsopts)
- [genshin.getOptions()](#genshingetoptions)
- [genshin.characters(query[, opts])](#genshincharactersquery-opts)
- [genshin.talents(query[, opts])](#genshintalentsquery-opts)
- [genshin.constellations(query[, opts])](#genshinconstellationsquery-opts)
- [genshin.weapons(query[, opts])](#genshinweaponsquery-opts)
- [genshin.weaponmaterialtypes(query[, opts])](#genshinweaponmaterialtypesquery-opts)
Expand All @@ -44,18 +45,25 @@ Possible inputs for query parameter are:
- all rarities
- "names"

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 [categories.json](https://github.com/theBowja/genshin-db/blob/main/src/english/categories.json) file to see choices for each category.\n
Check out [examples.md](https://github.com/theBowja/genshin-db/blob/main/examples.md#genshincharactersquery-opts) to see example inputs and outputs for this function.

## genshin.talents(query[, opts])

Possible inputs for query parameter are:

- all character names

Check out [categories.json](https://github.com/theBowja/genshin-db/blob/main/src/english/categories.json) file to see choices for each category.\n
Check out [examples.md](https://github.com/theBowja/genshin-db/blob/main/examples.md#genshintalentsquery-opts) to see example inputs and outputs for this function.

## genshin.constellations(query[, opts])

Possible inputs for query paremter are:

- all character names

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 [categories.json](https://github.com/theBowja/genshin-db/blob/main/src/english/categories.json) file to see choices for each category.\n
Check out [examples.md](https://github.com/theBowja/genshin-db/blob/main/examples.md#genshinconstellationsquery-opts) to see example inputs and outputs for this function.

## genshin.weapons(query[, opts])
Expand All @@ -68,8 +76,7 @@ Possible inputs for query parameter are:
- all weapon ascension material types
- "names"

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 [categories.json](https://github.com/theBowja/genshin-db/blob/main/src/english/categories.json) file to see choices for each category.\n
Check out [examples.md](https://github.com/theBowja/genshin-db/blob/main/examples.md#genshinweaponsquery-opts) to see example inputs and outputs for this function.

## genshin.weaponmaterialtypes(query[, opts])
Expand All @@ -82,8 +89,7 @@ Possible inputs for query parameter are:
- all domains of forgery
- "names"

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 [categories.json](https://github.com/theBowja/genshin-db/blob/main/src/english/categories.json) file to see choices for each category.\n
Check out [examples.md](https://github.com/theBowja/genshin-db/blob/main/examples.md#genshinweaponmaterialtypesquery-opts) to see example inputs and outputs for this function.

## genshin.talentmaterialtypes(query[, opts])
Expand All @@ -96,8 +102,7 @@ Possible inputs for query parameter are:
- all domains of mastery
- "names"

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 [categories.json](https://github.com/theBowja/genshin-db/blob/main/src/english/categories.json) file to see choices for each category.\n
Check out [examples.md](https://github.com/theBowja/genshin-db/blob/main/examples.md#genshintalentmaterialtypesquery-opts) to see example inputs and outputs for this function.


Expand All @@ -109,8 +114,7 @@ Possible inputs for query parameter are:
- all rarities
- "names"

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 [categories.json](https://github.com/theBowja/genshin-db/blob/main/src/english/categories.json) file to see choices for each category.\n
Check out [examples.md](https://github.com/theBowja/genshin-db/blob/main/examples.md#genshinartifactsquery-opts) to see example inputs and outputs for this function.

## genshin.talents(query[, opts])
Expand Down
6 changes: 4 additions & 2 deletions src/design.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"languages": ["english"],
"folders": ["characters", "weapons", "elements", "rarity", "artifacts",
"weaponmaterialtypes", "talentmaterialtypes", "constellations"],
"weaponmaterialtypes", "talentmaterialtypes", "constellations",
"talents"],
"indexByCategories": {
"characters": ["element", "weapontype", "talentmaterialtype", "gender", "region", "rarity"],
"weapons": ["weapontype", "rarity", "weaponmaterialtype"],
Expand All @@ -11,6 +12,7 @@
},
"altnames": {
"weaponmaterialtypes": ["2starname", "3starname", "4starname", "5starname"],
"constellations": ["aliases"]
"constellations": ["aliases"],
"talents": ["aliases"]
}
}
1 change: 1 addition & 0 deletions src/english/talents/tartaglia.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "Tartaglia",
"aliases": ["Childe"],
"combat1": {
"name": "Normal Attack: Cutting Torrent",
"image": "",
Expand Down
1 change: 1 addition & 0 deletions src/english/talents/traveler (anemo).json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "Traveler (Anemo)",
"aliases": ["Anemo Traveler"],
"combat1": {
"name": "Normal Attack: Foreign Ironwind",
"image": "",
Expand Down
1 change: 1 addition & 0 deletions src/english/talents/traveler (geo).json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "Traveler (Geo)",
"aliases": ["Geo Traveler"],
"combat1": {
"name": "Normal Attack: Foreign Rockblade",
"image": "",
Expand Down
62 changes: 62 additions & 0 deletions src/index/english/talents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"file": [
"amber.json",
"barbara.json",
"beidou.json",
"bennett.json",
"chongyun.json",
"diluc.json",
"diona.json",
"fischl.json",
"jean.json",
"kaeya.json",
"keqing.json",
"klee.json",
"lisa.json",
"mona.json",
"ningguang.json",
"noelle.json",
"qiqi.json",
"razor.json",
"sucrose.json",
"tartaglia.json",
"tartaglia.json",
"traveler (anemo).json",
"traveler (anemo).json",
"traveler (geo).json",
"traveler (geo).json",
"venti.json",
"xiangling.json",
"xingqiu.json"
],
"names": [
"Amber",
"Barbara",
"Beidou",
"Bennett",
"Chongyun",
"Diluc",
"Diona",
"Fischl",
"Jean",
"Kaeya",
"Keqing",
"Klee",
"Lisa",
"Mona",
"Ningguang",
"Noelle",
"Qiqi",
"Razor",
"Sucrose",
"Tartaglia",
"Childe",
"Traveler (Anemo)",
"Anemo Traveler",
"Traveler (Geo)",
"Geo Traveler",
"Venti",
"Xiangling",
"Xingqiu"
]
}
4 changes: 4 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ genshin.characters = function(query, opts={}) {
return searchFolder(query, 'characters', opts);
}

genshin.talents = function(query, opts={}) {
return searchFolder(query, 'talents', opts);
}

genshin.weapons = function(query, opts={}) {
return searchFolder(query, 'weapons', opts);
}
Expand Down
2 changes: 2 additions & 0 deletions todo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## Todo
- [ ] make collapsable sections for examples.md
- [ ] add properties information of data to readme.md
- [ ] add function to get lists verbose
- [ ] language-specific sanitation of query inputs
- [ ] birthdays for characters
Expand Down

0 comments on commit 2fa802e

Please sign in to comment.