class Armour

Used with Creature and its subclasses. Armour decreases damage taken in Creature#damage. There are two ways of initialization:

1. Direct
        _armour_ = Armour
        _armour_ = Armour _protection_
2. Create a subclass
        class _Platemail_ < Armour
                def initialize; @protection = _5_; end
        end

You can change @protection at any time.

end

Attributes

protection[RW]

Public Class Methods

new(protection) click to toggle source

Initializes a new Armour. Set original protection here. Alias: Armour()

# File lib/battlefield.rb, line 18
def initialize(protection); @protection = protection; end