diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-12-04 15:17:13 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:38 +0100 |
commit | d6d8c0a5ee9df15b1527b12e5f6def162dd124eb (patch) | |
tree | af343de4fa832bdbdeada814072ebcf702d48edc | |
parent | 2fe325b65b8107bb424b686855c2a1cc9dea4f2e (diff) | |
download | nevsky-d6d8c0a5ee9df15b1527b12e5f6def162dd124eb.tar.gz |
Ravage check.
-rw-r--r-- | rules.js | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -2130,13 +2130,22 @@ function do_action_forage() { // === ACTION: RAVAGE === +function can_ravage_locale(loc) { + return ( + is_enemy_territory(loc) && + !has_conquered_marker(loc) && + !has_ravaged_marker(loc) && + !is_friendly_locale(loc) + ) +} + function can_action_ravage() { let where = get_lord_locale(game.who) // TODO: cost 2 if enemy lord is adjacent in 2nd ed // TODO: adjacent ability - if (is_enemy_territory(where) && !has_ravaged_marker(where)) + if (can_ravage_locale(loc)) return true return false |