forked from RobWC/riotapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchampion.go
102 lines (93 loc) · 3.83 KB
/
champion.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
package riotapi
type ChampionData struct {
Type string `json:"type"`
Format string `json:"format"`
Version string `json:"version"`
Champions map[string]Champion `json:"data"`
Keys map[string]string `json:"keys"`
}
type Champion struct {
ID int `json:"id"`
Key string `json:"key"`
Name string `json:"name"`
Title string `json:"title"`
Blurb string `json:"blurb"`
AllyTips []string `json:"allytips"`
EnemyTips []string `json:"enemytips"`
Spells []ChampionSpell `json:"spells"`
Passive ChampionPassive `json:"passive"`
Info ChampionInfo `json:"info"`
Image Image `json:"image"`
Skins []ChampionSkin `json:"skins"`
Lore string `json:"lore"`
Tags []string `json:"tags"`
ParType string `json:"partype"`
Stats ChampionStats `json:"stats"`
Recommended []ChampionRecommended `json:"recommended"`
}
type ChampionRecommended struct{}
type ChampionSkin struct {
ID int `json:"id"`
Num int `json:"num"`
Name string `json:"name"`
}
type ChampionSpell struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
ToolTip string `json:"tooltip"`
LevelTip map[string][]string `json:"leveltip"`
MaxRank int `json:"maxrank"`
Cooldown []float32 `json:"cooldown"`
CooldownBurn string `json:"cooldownBurn"`
Cost []int `json:"cost"`
CostBurn string `json:"costBurn"`
Effect [][]float32 `json:"effect"` //TODO: What is this really?
EffectBurn []string `json:"effectburn"`
Vars []SpellVar `json:"vars"`
CostType string `json:"costType"`
Range []float32 `json:"range"`
RangeBurn string `json:"rangeBurn"`
Image Image `json:"image"`
AltImages Image `json:"altimages"`
Resource string `json:"resource"`
}
type SpellVar struct {
Link string `json:"link"`
Coeff []float32 `json:"coeff"`
Key string `json:"key"`
}
type ChampionInfo struct {
Attack int `json:"attack"`
Defense int `json:"defense"`
Magic int `json:"magic"`
Difficulty int `json:"difficulty" gorethink:"difficulty"`
}
type ChampionStats struct {
HP float32 `json:"hp"`
HPPerLevel float32 `json:"hpperlevel"`
MP float32 `json:"mp"`
MPPerLevel float32 `json:"mpperlevel"`
MoveSpeed float32 `json:"movespeed"`
Armor float32 `json:"armor"`
ArmorPerLevel float32 `json:"armorperlevel"`
SpellBlock float32 `json:"spellblock"`
SpellBlockPerLevel float32 `json:"spellblockperlevel"`
AttackRange float32 `json:"attackrange"`
HPRegen float32 `json:"hpregen"`
HPRegenPerLevel float32 `json:"hpregenperlevel"`
MPRegen float32 `json:"mpregen"`
MPRegenPerLevel float32 `json:"mpregenperlevel"`
Crit float32 `json:"crit"`
CritPerLevel float32 `json:"critperlevel"`
AttackDamage float32 `json:"attackdamage"`
AttackDamagePerLevel float32 `json:"attackdamageperlevel"`
AttackSpeedOffset float32 `json:"attackspeedoffset"`
AttackSpeedPerLevel float32 `json:"attackspeedperlevel"`
}
type ChampionPassive struct {
Description string `json:"description"`
SanitizedDescription string `json:"sanitizedDescription"`
Name string `json:"name"`
Image Image `json:"image"`
}