package tw

import (
	"encoding/xml"
)

type Unit struct {
	BuildTime      float64 `xml:"build_time"`
	Pop            int     `xml:"pop"`
	Speed          float64 `xml:"speed"`
	Attack         int     `xml:"attack"`
	Defense        int     `xml:"defense"`
	DefenseCavalry int     `xml:"defense_cavalry"`
	DefenseArcher  int     `xml:"defense_archer"`
	Carry          int     `xml:"carry"`
}

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"`
}
