summaryrefslogtreecommitdiffstats
path: root/lib/colonial_twilight
diff options
context:
space:
mode:
Diffstat (limited to 'lib/colonial_twilight')
-rw-r--r--lib/colonial_twilight/spaces.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/colonial_twilight/spaces.rb b/lib/colonial_twilight/spaces.rb
index bc0bfbd..14d95a4 100644
--- a/lib/colonial_twilight/spaces.rb
+++ b/lib/colonial_twilight/spaces.rb
@@ -12,14 +12,10 @@ module ColonialTwilight
@max = max
end
- # FIXME: is that needed ?
- # def shift(val)
- # w = @v + val
- # return false if w.negative? || w > @max
- #
- # @v = w
- # true
- # end
+ def shift(val)
+ @v += val
+ raise "out of track #{@v}" if @v.negative? || @v > @max
+ end
def clamp(val)
@v = (@v + val).clamp(0, @max)
@@ -117,6 +113,10 @@ module ColonialTwilight
(@attrs & MOUNTAIN) == MOUNTAIN
end
+ def terror?
+ @terror.positive?
+ end
+
def support?
@alignment == :support
end
@@ -189,6 +189,7 @@ module ColonialTwilight
def initialize(name)
super(name, nil, nil, 1, MOUNTAIN | BORDER | COASTAL)
+ @independent = false
@descr += ' : French'
end