<commit_before>(ns zetawar.data)

(def terrains
  {:plains        {:name "Plains"
                   :image "tilesets/elite-command/terrains/plains.png"}
   :mountains     {:name "Mountains"
                   :image "tilesets/elite-command/terrains/mountains.png"}
   :woods         {:name "Woods"
                   :image "tilesets/elite-command/terrains/woods.png"}
   :base          {:name "Base"
                   :image "tilesets/elite-command/terrains/base-COLOR.png"}
   :shallow-water {:name "Shallow Water"
                   :image "tilesets/elite-command/terrains/shallow-water.png"}
   :deep-water    {:name "Deep Water"
                   :image "tilesets/elite-command/terrains/deep-water.png"}})

(def unit-state-maps
  {:basic
   {:start-state :start
    :built-state :done
    :states
    {:start      {:move-unit    :moved-once
                  :attack-unit  :done
                  :repair-unit  :done
                  :capture-base :done}
     :moved-once {:attack-unit  :done
                  :capture-base :done}
     :done       {}}}})

(def units
  {:infantry {:name "Infantry"
              :cost 75
              :movement 9
              :can-capture true
              :min-range 1
              :max-range 1
              :armor-type :personnel
              :armor 6
              :capturing-armor 2
              :repair 1
              :state-map :basic
              :image "tilesets/elite-command/units/infantry-COLOR.png"
              :terrain-effects
              {:plains    {:movement-cost 3 :attack-bonus 0 :armor-bonus 0}
               :mountains {:movement-cost 6 :attack-bonus 2 :armor-bonus 5}
               :woods     {:movement-cost 4 :attack-bonus 2 :armor-bonus 3}
               :base      {:movement-cost 2 :attack-bonus 2 :armor-bonus 3}}
              :attack-strengths
              {:personnel 6}}
   :grenadier {:name "Grenadier"
               :cost 150
               :movement 9
               :can-capture true
               :min-range 1
               :max-range 2
               :armor-type :personnel
               :armor 8
               :capturing-armor 2
               :repair 1
               :state-map :basic
               :image "tilesets/elite-command/units/grenadier-COLOR.png"
               :terrain-effects
               {:plains    {:movement-cost 4 :attack-bonus 0  :armor-bonus 0}
                :mountains {:movement-cost 9 :attack-bonus 2  :armor-bonus 5}
                :woods     {:movement-cost 4 :attack-bonus -1 :armor-bonus 3}
                :base      {:movement-cost 3 :attack-bonus -1 :armor-bonus 3}}
               :attack-strengths
               {:personnel 8}}})

;; TODO: rename to maps
(def map-definitions
  {:sterlings-aruba
   {:id :sterlings-aruba
    :name "<NAME>"
    :terrains
    [;; Row 1
     {:q 1
      :r 0
      :terrain-type :plains}
     {:q 2
      :r 0
      :terrain-type :plains}
     {:q 3
      :r 0
      :terrain-type :mountains}
     {:q 4
      :r 0
      :terrain-type :deep-water}
     {:q 5
      :r 0
      :terrain-type :deep-water}
     {:q 6
      :r 0
      :terrain-type :deep-water}
     ;; Row 2
     {:q 0
      :r 1
      :terrain-type :plains}<commit_msg>Adding mortar, ranger, and tank unit types<commit_after>(ns zetawar.data)

(def terrains
  {:plains        {:name "Plains"
                   :image "tilesets/elite-command/terrains/plains.png"}
   :mountains     {:name "Mountains"
                   :image "tilesets/elite-command/terrains/mountains.png"}
   :woods         {:name "Woods"
                   :image "tilesets/elite-command/terrains/woods.png"}
   :base          {:name "Base"
                   :image "tilesets/elite-command/terrains/base-COLOR.png"}
   :shallow-water {:name "Shallow Water"
                   :image "tilesets/elite-command/terrains/shallow-water.png"}
   :deep-water    {:name "Deep Water"
                   :image "tilesets/elite-command/terrains/deep-water.png"}})

;; TODO: remove redundancy between state map and unit/can-capture flag (?)
(def unit-state-maps
  {:move-attack
   {:start-state :start
    :built-state :done
    :states
    {:start {:move-unit    :moved
             :attack-unit  :done
             :repair-unit  :done
             :capture-base :done}
     :moved {:attack-unit  :done
             :capture-base :done}
     :done  {}}}
   ;; :free-attack-twice
   ;; {:start-state :start
   ;;  :built-state :done
   ;;  :states
   ;;  {:start              {:move-unit    :moved-1-attacked-0
   ;;                        :attack-unit  :moved-0-attacked-1
   ;;                        :repair-unit  :done}
   ;;   :moved-0-attacked-1 {:attack-unit  :moved-0-attacked-2
   ;;                        :move-unit    :moved-1-attacked-1}
   ;;   :moved-0-attacked-2 {:move-unit    :done}
   ;;   :moved-1-attacked-0 {:attack-unit  :moved-1-attacked-1}
   ;;   :moved-1-attacked-1 {:attack-unit  :done}
   ;;   :done               {}}}
   })

;; TODO: check how capturing armor works in Elite Command
;; TODO: check how repair amount works in Elite Command
(def units
  {:infantry {:name "Infantry"
              :cost 75
              :movement 9
              :can-capture true
              :min-range 1
              :max-range 1
              :armor-type :personnel
              :armor 6
              :capturing-armor 2
              :repair 1
              :state-map :move-attack
              :image "tilesets/elite-command/units/infantry-COLOR.png"
              :terrain-effects
              {:plains    {:movement-cost 3 :attack-bonus 0 :armor-bonus 0}
               :mountains {:movement-cost 6 :attack-bonus 2 :armor-bonus 5}
               :woods     {:movement-cost 4 :attack-bonus 2 :armor-bonus 3}
               :base      {:movement-cost 2 :attack-bonus 2 :armor-bonus 3}}
              :attack-strengths
              {:personnel 6
               :armored 3}}
   :grenadier {:name "Grenadier"
               :cost 150
               :movement 9
               :can-capture true
               :min-range 1
               :max-range 2
               :armor-type :personnel
               :armor 8
               :capturing-armor 2
               :repair 1
               :state-map :move-attack
               :image "tilesets/elite-command/units/grenadier-COLOR.png"
               :terrain-effects
               {:plains    {:movement-cost 4 :attack-bonus 0  :armor-bonus 0}
                :mountains {:movement-cost 9 :attack-bonus 2  :armor-bonus 5}
                :woods     {:movement-cost 4 :attack-bonus -1 :armor-bonus 3}
                :base      {:movement-cost 3 :attack-bonus -1 :armor-bonus 3}}
               :attack-strengths
               {:personnel 8
                :armored 9}}
   :mortar {:name "Mortar"
            :cost 200
            :movement 9
            :can-capture true
            :min-range 2
            :max-range 3
            :armor-type :personnel
            :armor 6
            :capturing-armor 2
            :repair 1
            :state-map :move-attack
            :image "tilesets/elite-command/units/mortar-COLOR.png"
            :terrain-effects
            {:plains    {:movement-cost 4 :attack-bonus  0 :armor-bonus 0}
             :mountains {:movement-cost 9 :attack-bonus  3 :armor-bonus 5}
             :woods     {:movement-cost 4 :attack-bonus -2 :armor-bonus 3}
             :base      {:movement-cost 3 :attack-bonus -2 :armor-bonus 3}}
            :attack-strengths
            {:personnel 10
             :armored 10}}
   :ranger {:name "Ranger"
            :cost 200
            :movement 9
            :can-capture true
            :min-range 1
            :max-range 1
            :armor-type :personnel
            :armor 6
            :capturing-armor 2
            :repair 1
            :state-map :move-attack
            :image "tilesets/elite-command/units/ranger-COLOR.png"
            :terrain-effects
            {:plains    {:movement-cost 3 :attack-bonus 0 :armor-bonus 0}
             :mountains {:movement-cost 6 :attack-bonus 2 :armor-bonus 5}
             :woods     {:movement-cost 3 :attack-bonus 2 :armor-bonus 4}
             :base      {:movement-cost 2 :attack-bonus 2 :armor-bonus 3}}
            :attack-strengths
            {:personnel 9
             :armored 4}}
   ;; :humvee {:name "Humvee"
   ;;          :cost 300
   ;;          :movement 15
   ;;          :can-capture false
   ;;          :min-range 1
   ;;          :max-range 1
   ;;          :armor-type :armored
   ;;          :armor 8
   ;;          :capturing-armor 2
   ;;          :repair 1
   ;;          :state-map :free-attack-twice
   ;;          :image "tilesets/elite-command/units/humvee-COLOR.png"
   ;;          :terrain-effects
   ;;          {:plains    {:movement-cost 3 :attack-bonus  0 :armor-bonus  0}
   ;;           :woods     {:movement-cost 6 :attack-bonus -2 :armor-bonus -2}
   ;;           :base      {:movement-cost 2 :attack-bonus  0 :armor-bonus  0}}
   ;;          :attack-strengths
   ;;          {:personnel 9
   ;;           :armored 3}}
   :tank {:name "Tank"
          :cost 350
          :movement 12
          :can-capture false
          :min-range 1
          :max-range 1
          :armor-type :armored
          :armor 12
          :capturing-armor 2
          :repair 1
          :state-map :move-attack
          :image "tilesets/elite-command/units/tank-COLOR.png"
          :terrain-effects
          {:plains    {:movement-cost 3 :attack-bonus 0 :armor-bonus  0}
           :woods     {:movement-cost 6 :attack-bonus 0 :armor-bonus -3}
           :base      {:movement-cost 2 :attack-bonus 0 :armor-bonus -2}}
          :attack-strengths
          {:personnel 10
           :armored 10}}
   })

;; TODO: rename to maps
(def map-definitions
  {:sterlings-aruba
   {:id :sterlings-aruba
    :name "<NAME>"
    :terrains
    [;; Row 1
     {:q 1
      :r 0
      :terrain-type :plains}
     {:q 2
      :r 0
      :terrain-type :plains}
     {:q 3
      :r 0
      :terrain-type :mountains}
     {:q 4
      :r 0
      :terrain-type :deep-water}
     {:q 5
      :r 0
      :terrain-type :deep-water}
     {:q 6
      :r 0
      :terrain-type :deep-water}
     ;; Row 2
     {:q 0
      :r 1
      :terrain-type :plains}
{'fraction_non_alphanumeric': 0.12108498390086837, 'fraction_numerical': 0.022538784271636258, 'mean_word_length': 1.414036740461611, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '484932', 'n_tokens_mistral': 3759, 'n_tokens_neox': 3336, 'n_words': 752}