Sha256: 30c1861963187bc16188faef692ef2ad28e46934e5b0db71eee157fc90dbde68

Contents?: true

Size: 662 Bytes

Versions: 9

Compression:

Stored size: 662 Bytes

Contents

# lib/gemwarrior/entities/items/gun.rb
# Item::Gun

require_relative '../item'

module Gemwarrior
  class Gun < Item
    def initialize
      super

      self.name         = 'gun'
      self.description  = 'Pew pew goes this firearm, you suspect.'
      self.atk_lo       = 2
      self.atk_hi       = 4
      self.takeable     = true
      self.useable      = true
      self.equippable   = true
    end

    def use(player = nil)
      puts 'You pull the trigger on the gun, but it does not fire. An inscription on the barrel reads: "Only shoots when pointed at a monster." How safe!'
      { type: nil, data: nil }
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gemwarrior-0.10.8 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.10.7 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.10.6 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.10.5 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.10.4 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.10.2 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.10.1 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.10.0 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.9.39 lib/gemwarrior/entities/items/gun.rb