class Arkham::Enemy

Attributes

health[R]

Public Class Methods

new(game, health) click to toggle source
# File lib/arkham/enemy.rb, line 8
def initialize(game, health)
  @deck = Deck.new
  @discard = Discard.new
  @health = health
  @shield = 0
  @game = game
end

Public Instance Methods

add_shield(amount) click to toggle source
# File lib/arkham/enemy.rb, line 25
def add_shield(amount)
  @shield += amount
end
damage(amount) click to toggle source
# File lib/arkham/enemy.rb, line 16
def damage(amount)
  @health = @health - amount
end
heal(amount) click to toggle source
# File lib/arkham/enemy.rb, line 29
def heal(amount)
  @health += amount
end
print_summary() click to toggle source
take_turn() click to toggle source
# File lib/arkham/enemy.rb, line 20
def take_turn
  card = @deck.draw_random
  card.enemy_play(@game)
end