class Rules::Weapon

Weapon Each weapon is responsible of returning the damage that it can make to each armor, for a given modified roll. In these simple rules, the damage is always a d6, if the modified roll surpasses the armor value

Attributes

weapon[RW]

Public Class Methods

new(sheet) click to toggle source
# File data/rpg-prompt/rules_default.rb, line 288
def initialize(sheet)
  @@weapon_hash = RulesHashes::WeaponHash.new()
  @weapon = @@weapon_hash[sheet[:weapon]]
end

Public Instance Methods

damage_roll(armor, mod_roll) click to toggle source
# File data/rpg-prompt/rules_default.rb, line 293
def damage_roll(armor, mod_roll)
  if (mod_roll >= armor[:armor])
    Message.message(:hits_success)
    Dice.prompt_roll(:d6)
  else
    Message.message(:hits_fail)
    0
  end
end