core/internal/tw/unit_info.go

35 lines
918 B
Go
Raw Permalink Normal View History

2023-12-15 07:16:51 +00:00
package tw
import (
"encoding/xml"
)
type Unit struct {
Attack int `xml:"attack"`
2024-02-10 12:28:41 +00:00
BuildTime float64 `xml:"build_time"`
Carry int `xml:"carry"`
2023-12-15 07:16:51 +00:00
Defense int `xml:"defense"`
DefenseArcher int `xml:"defense_archer"`
2024-02-10 12:28:41 +00:00
DefenseCavalry int `xml:"defense_cavalry"`
Pop int `xml:"pop"`
Speed float64 `xml:"speed"`
2023-12-15 07:16:51 +00:00
}
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"`
2023-12-15 07:16:51 +00:00
Catapult Unit `xml:"catapult"`
Knight Unit `xml:"knight"`
Snob Unit `xml:"snob"`
Militia Unit `xml:"militia"`
}