class Core::Game::Wound

Attributes

location[R]
severity[R]

Public Class Methods

new(location, severity) click to toggle source
# File lib/game/constitution.rb, line 6
def initialize(location, severity)
  if !WOUND_LOCATIONS.include?(location)
    puts("WARNING: Unknown wound location #{location}")
  end
  @location = location
  @severity = severity
end

Public Instance Methods

location_factor() click to toggle source
# File lib/game/constitution.rb, line 13
def location_factor
  case @location
  when :head
    return 5
  when :neck
    return 3
  when :torso
    return 2
  when :abdomen
    return 3
  when :leg
    return 1
  when :foot
    return 1
  when :arm
    return 2
  else
    return 1
  end
end