<!-- version="0.2.8_beta3" -->
<!ELEMENT Resource (Map)>

<!ATTLIST Resource
       type (aamap) "aamap" 
       name CDATA #REQUIRED
       version CDATA "1.0"
       author CDATA "Anonymous"
       category CDATA "unsorted"
       comissioner CDATA #IMPLIED
>

<!ELEMENT Map (Settings?, World)> 

<!ELEMENT Settings (Setting*)>
<!ELEMENT Setting EMPTY>
<!ATTLIST Setting name CDATA #REQUIRED>
<!ATTLIST Setting value CDATA #REQUIRED>

<!-- ATM, a map contain only one Field -->
<!ELEMENT World (Field)>
<!-- a field 
  - may have an axes declared
  - need at least one spawn
  - need at least one wall -->
<!ELEMENT Field (Axes?, (Spawn | Wall | Zone)*)>

<!ELEMENT Axes (Axis*)>
<!ELEMENT Spawn EMPTY> 
<!ELEMENT Wall (Point+) >
<!ELEMENT Point EMPTY>
<!ELEMENT Axis EMPTY>
<!ELEMENT Zone (ShapeCircle) >

<!ATTLIST Map version CDATA #REQUIRED>

<!ATTLIST Field logicalBox (true | false) "true">

<!ATTLIST Axes number CDATA "4">
<!ATTLIST Axes normalize (true | false) "true">

<!ATTLIST Spawn x CDATA #REQUIRED>
<!ATTLIST Spawn y CDATA #REQUIRED>
<!ATTLIST Spawn xdir CDATA #IMPLIED>
<!ATTLIST Spawn ydir CDATA #IMPLIED>
<!ATTLIST Spawn angle CDATA #IMPLIED>
<!ATTLIST Spawn length CDATA "1.0">

<!ATTLIST Wall height CDATA #IMPLIED>

<!ATTLIST Point x CDATA #REQUIRED>
<!ATTLIST Point y CDATA #REQUIRED>

<!ATTLIST Axis xdir CDATA #IMPLIED>
<!ATTLIST Axis ydir CDATA #IMPLIED>
<!ATTLIST Axis angle CDATA #IMPLIED>
<!ATTLIST Axis length CDATA "1.0">

<!ATTLIST Zone effect (win | death | fortress ) "death" >

<!ELEMENT ShapeCircle (Point)>
<!ATTLIST ShapeCircle radius CDATA #REQUIRED>
<!ATTLIST ShapeCircle growth CDATA "0.0">

