Sha256: a2ae30d1519769dde1a1fa9da5686b90033734b6d2ed17b7d09bd76747f209f9

Contents?: true

Size: 680 Bytes

Versions: 4

Compression:

Stored size: 680 Bytes

Contents

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

require_relative '../item'

module Gemwarrior
  class Gun < Item
    def initialize
      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
      self.equipped     = false
    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

4 entries across 4 versions & 1 rubygems

Version Path
gemwarrior-0.9.37 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.9.36 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.9.35 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.9.34 lib/gemwarrior/entities/items/gun.rb