summaryrefslogtreecommitdiffstats
path: root/lib/colonial_twilight/actions/fln/extort.rb
blob: 58b4e18572365d6e7a8bd8834301f50083391b40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# frozen_string_literal: true

require_relative 'fln_action'

module ColonialTwilight
  module Actions
    module FLN
      # Extort 4.3.1
      class Extort < FlnAction
        def initialize(space, mode)
          super(space, mode, cost: 0)
        end

        # flip 1 Underground Guerrilla to Active
        # add 1 Resources to FLN track per space.
        def apply!(board)
          raise NotImplementedError
        end

        class << self
          def special?
            true
          end

          # any space with Population, Underground Guerrillas, and FLN Control
          # also Morocco/Tunisia if Independent and have Underground Guerrillas
          def applicable?(space)
            space.fln_underground.positive? &&
              (space.country? ? space.independent? : space.pop.positive? && space.fln_control?)
          end
        end
      end
    end
  end
end