horse: generate json
This commit is contained in:
@@ -27,37 +27,37 @@ func (x TenThousandths) String() string {
|
||||
|
||||
// Skill is the internal data about a skill.
|
||||
type Skill struct {
|
||||
ID SkillID
|
||||
Name string
|
||||
Description string
|
||||
Group int32
|
||||
Rarity int8
|
||||
GroupRate int8
|
||||
GradeValue int32
|
||||
WitCheck bool
|
||||
Activations []Activation
|
||||
UniqueOwner string
|
||||
SPCost int
|
||||
IconID int
|
||||
ID SkillID `json:"skill_id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Group SkillGroupID `json:"group"`
|
||||
Rarity int8 `json:"rarity"`
|
||||
GroupRate int8 `json:"group_rate"`
|
||||
GradeValue int32 `json:"grade_value,omitzero"`
|
||||
WitCheck bool `json:"wit_check"`
|
||||
Activations []Activation `json:"activations"`
|
||||
UniqueOwner string `json:"unique_owner,omitzero"`
|
||||
SPCost int `json:"sp_cost,omitzero"`
|
||||
IconID int `json:"icon_id"`
|
||||
}
|
||||
|
||||
// Activation is the parameters controlling when a skill activates.
|
||||
type Activation struct {
|
||||
Precondition string
|
||||
Condition string
|
||||
Duration TenThousandths
|
||||
DurScale DurScale
|
||||
Cooldown TenThousandths
|
||||
Abilities []Ability
|
||||
Precondition string `json:"precondition,omitzero"`
|
||||
Condition string `json:"condition"`
|
||||
Duration TenThousandths `json:"duration,omitzero"`
|
||||
DurScale DurScale `json:"dur_scale,omitzero"`
|
||||
Cooldown TenThousandths `json:"cooldown,omitzero"`
|
||||
Abilities []Ability `json:"abilities"`
|
||||
}
|
||||
|
||||
// Ability is an individual effect applied by a skill.
|
||||
type Ability struct {
|
||||
Type AbilityType
|
||||
ValueUsage AbilityValueUsage
|
||||
Value TenThousandths
|
||||
Target AbilityTarget
|
||||
TargetValue int32
|
||||
Type AbilityType `json:"type"`
|
||||
ValueUsage AbilityValueUsage `json:"value_usage"`
|
||||
Value TenThousandths `json:"value"`
|
||||
Target AbilityTarget `json:"target"`
|
||||
TargetValue int32 `json:"target_value"`
|
||||
}
|
||||
|
||||
func (a Ability) String() string {
|
||||
@@ -202,3 +202,26 @@ const (
|
||||
TargetCharacter AbilityTarget = 22 // specific character
|
||||
TargetTriggering AbilityTarget = 23 // whosoever triggered this skill
|
||||
)
|
||||
|
||||
type SkillGroupID int32
|
||||
|
||||
// SkillGroup is a group of skills which are alternate versions of each other.
|
||||
//
|
||||
// Any of the skill IDs in a group may be zero, indicating that there is no
|
||||
// skill with the corresponding group rate.
|
||||
// Some skill groups contain only Skill2 or SkillBad, while others may have all
|
||||
// four skills.
|
||||
type SkillGroup struct {
|
||||
ID SkillGroupID `json:"skill_group"`
|
||||
// Skill1 is the base version of the skill, either a common (white) skill
|
||||
// or an Uma's own unique.
|
||||
Skill1 SkillID `json:"skill1,omitzero"`
|
||||
// Skill2 is the first upgraded version of the skill: a rare (gold)
|
||||
// skill, a double circle skill, or an inherited unique skill.
|
||||
Skill2 SkillID `json:"skill2,omitzero"`
|
||||
// Skill3 is the highest upgraded version, a gold version of a skill with
|
||||
// a double circle version.
|
||||
Skill3 SkillID `json:"skill3,omitzero"`
|
||||
// SkillBad is a negative (purple) skill.
|
||||
SkillBad SkillID `json:"skill_bad,omitzero"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user