       false)))
 
 (defn attack-damage [db game attacker defender attacker-terrain defender-terrain]
-  (let [defender-armor-type (get-in defender [:unit/type :unit-type/armor-type])
+  (let [defender-armor-type (to-armor-type (get-in defender [:unit/type :unit-type/armor-type]))
         [attacker-q attacker-r] (unit-hex attacker)
         [defender-q defender-r] (unit-hex defender)
         attack-strength (oonly (d/q '[:find ?s

  (check-unit-current db game unit)
  (when (:unit/capturing unit)
    (throw (unit-ex "Unit cannot make repairs while capturing" unit)))
  (when-not (get-in unit [:unit/type :unit-type/can-repair])
    (throw (unit-ex "Unit cannot repair other units" unit)))
  (checked-next-state db unit :action.type/repair-other-unit))


         :unit/state (e new-state)}])))
  ([db game q1 r1 q2 r2]
   (let [repairer (checked-unit-at db game q1 r1)
         wounded (checked-unit-at db game q2 r2)]
     (repair-other-tx db game repairer wounded))))

(defn repair! [conn game-id q r]
