Add pokememes info, convert it to new format and drop unnecessary database tables
This commit introduces pokememes information storage in source code (because they're rarely changed and I always update them manually). All information about pokememes updated after nerf of 25 April. Also, added buttons to /pokedeks command for changing pages (there are 21 pages already!), and limited one page to 35 pokememes.
This commit is contained in:
12
lib/datamapping/levels.go
Normal file
12
lib/datamapping/levels.go
Normal file
@@ -0,0 +1,12 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package datamapping
|
||||
|
||||
// Level is a struct, which represents level data
|
||||
type Level struct {
|
||||
ID int `yaml:"id"`
|
||||
MaxExp int `yaml:"max_exp"`
|
||||
MaxEgg int `yaml:"max_egg"`
|
||||
LevelStart int `yaml:"level_start"`
|
||||
}
|
28
lib/datamapping/pokememes.go
Normal file
28
lib/datamapping/pokememes.go
Normal file
@@ -0,0 +1,28 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017-2018 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package datamapping
|
||||
|
||||
// Pokememe is a struct, which represents pokememes item data
|
||||
type Pokememe struct {
|
||||
ID int `yaml:"id"`
|
||||
Grade int `yaml:"grade"`
|
||||
Name string `yaml:"name"`
|
||||
Description string `yaml:"description"`
|
||||
Attack int `yaml:"attack"`
|
||||
HP int `yaml:"health"`
|
||||
MP int `yaml:"mana"`
|
||||
Defence int `db:"defence"`
|
||||
Price int `yaml:"cost"`
|
||||
Purchaseable bool `yaml:"purchaseable"`
|
||||
ImageURL string `yaml:"image"`
|
||||
Elements []int `yaml:"elements"`
|
||||
Locations []int `yaml:"locations"`
|
||||
}
|
||||
|
||||
// PokememeFull is a struct for handling pokememe with all informations about locations and elements
|
||||
type PokememeFull struct {
|
||||
Pokememe Pokememe
|
||||
Locations []Location
|
||||
Elements []Element
|
||||
}
|
Reference in New Issue
Block a user