mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 00:07:36 +02:00
Add Pokedex Ability and Move
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
const { firstUpperCase } = require('../../util/Util');
|
||||
|
||||
module.exports = class Ability {
|
||||
constructor(store, data) {
|
||||
this.store = store;
|
||||
this.id = data.id;
|
||||
const slugName = firstUpperCase(data.name).replaceAll('-', ' ');
|
||||
this.name = data.names.length
|
||||
? data.names.find(entry => entry.language.name === 'en').name
|
||||
: slugName;
|
||||
this.description = data.effect_entries.find(entry => entry.language.name === 'en').effect;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user