Class: Core::Game::Combat::Weapon

Inherits:
Object
  • Object
show all
Defined in:
lib/game/combat/battle.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type, effects, icon) ⇒ Weapon

Returns a new instance of Weapon.



100
101
102
# File 'lib/game/combat/battle.rb', line 100

def initialize(name, type, effects, icon)
  @name, @type, @effects, @icon = name, type, effects, Core.sprite("icons/#{icon}")
end

Instance Attribute Details

#effectsObject (readonly)

Returns the value of attribute effects.



99
100
101
# File 'lib/game/combat/battle.rb', line 99

def effects
  @effects
end

#iconObject (readonly)

Returns the value of attribute icon.



99
100
101
# File 'lib/game/combat/battle.rb', line 99

def icon
  @icon
end

#nameObject (readonly)

Returns the value of attribute name.



99
100
101
# File 'lib/game/combat/battle.rb', line 99

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



99
100
101
# File 'lib/game/combat/battle.rb', line 99

def type
  @type
end