From 9f88b58d1a290d8ab81c86c798690d22ef3b77e5 Mon Sep 17 00:00:00 2001 From: 0xNul <57599792+0xNul@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:09:34 -0700 Subject: set correct combat-phase --- src/votann_battle_simulator/battle_round.clj | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/votann_battle_simulator') diff --git a/src/votann_battle_simulator/battle_round.clj b/src/votann_battle_simulator/battle_round.clj index 4ac95ee..b351faa 100644 --- a/src/votann_battle_simulator/battle_round.clj +++ b/src/votann_battle_simulator/battle_round.clj @@ -46,13 +46,17 @@ (defn movement-phase []) -(defn combat-phase [^String phase ^Integer unit-size ^Model model ^Integer target-size ^Model target battle-modifiers] - (println (str "\n----------\nStarting " phase "-phase")) +(defn combat-phase [phase ^Integer unit-size ^Model model ^Integer target-size ^Model target battle-modifiers] + (cond + (= phase :ranged-weapons) + (println (str "\n----------\nStarting shooting-phase")) + (= phase :melee-weapons) + (println (str "\n----------\nStarting fight-phase"))) (println (str (:name model) " x" unit-size " target " (:name target) " W: " (:w target) " T: " (:t target) " SV: " (:sv target))) - (for [weapon (:ranged-weapons model)] + (for [weapon (phase model)] (do (println (str "\nUsing weapon: " (:name weapon))) (let [damage (resolve-damage unit-size weapon target-size target battle-modifiers)] -- cgit v1.2.3