diff options
| author | 0xNul <57599792+0xNul@users.noreply.github.com> | 2023-07-22 14:09:34 -0700 |
|---|---|---|
| committer | 0xNul <57599792+0xNul@users.noreply.github.com> | 2023-07-22 14:09:34 -0700 |
| commit | 9f88b58d1a290d8ab81c86c798690d22ef3b77e5 (patch) | |
| tree | ff7311e74f9cd7b66a3b77b8a87f20778c6cd77c /src/votann_battle_simulator | |
| parent | 6bcbcd4d60f2032c7aa2cda2f5d831bb99a11f67 (diff) | |
set correct combat-phase
Diffstat (limited to 'src/votann_battle_simulator')
| -rw-r--r-- | src/votann_battle_simulator/battle_round.clj | 10 |
1 files changed, 7 insertions, 3 deletions
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)] |