class Weapon
Used w/ Creature
and its subclasses. Weapons add to the attacking power of Creature#attack
. There are two ways to create one:
1. Directly initialize it _weapon_ = Weapon() _weapon_ = Weapon _power_ 2. Create a subclass class _Dragonfire_ < Weapon def initialize; @power = _1000_; end end
You can change your power after initialization:
(Lets say your weapon was damaged) _weapon_.power -= _lostPower_ (Now you get it improved) _weapon_.power += _gainedPower_
end¶ ↑
Attributes
power[RW]