core/internal/tw/unit_info.go

35 lines
918 B
Go

package tw
import (
"encoding/xml"
)
type Unit struct {
Attack int `xml:"attack"`
BuildTime float64 `xml:"build_time"`
Carry int `xml:"carry"`
Defense int `xml:"defense"`
DefenseArcher int `xml:"defense_archer"`
DefenseCavalry int `xml:"defense_cavalry"`
Pop int `xml:"pop"`
Speed float64 `xml:"speed"`
}
type UnitInfo struct {
XMLName xml.Name `xml:"config"`
Text string `xml:",chardata"`
Spear Unit `xml:"spear"`
Sword Unit `xml:"sword"`
Axe Unit `xml:"axe"`
Archer Unit `xml:"archer"`
Spy Unit `xml:"spy"`
Light Unit `xml:"light"`
Marcher Unit `xml:"marcher"`
Heavy Unit `xml:"heavy"`
Ram Unit `xml:"ram"`
Catapult Unit `xml:"catapult"`
Knight Unit `xml:"knight"`
Snob Unit `xml:"snob"`
Militia Unit `xml:"militia"`
}