summaryrefslogtreecommitdiff
path: root/app/models/monster.rb
blob: d1e1b9978c3e3c15ec3f4fe98947f312bc4303d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class Monster < ApplicationRecord
  include HasWhatnot

  def max_hp
    self.whatnot[:max_hp][:base]
  end

  def speed
    self.whatnot[:speed][:base]
  end

  def accuracy(with_combat_style: false)
    self.whatnot[:accuracy][:base]
  end

  def power(with_combat_style: false)
    self.whatnot[:power][:base]
  end

  def evasion(with_combat_style: false)
    self.whatnot[:evasion][:base]
  end

  def block(with_combat_style: false)
    self.whatnot[:block][:base]
  end

  def block_value
    self.whatnot[:block_value][:base]
  end
end