lib/hero.rb
# Sets default values for new heroes
Sets default values for new heroes
Sets default values for new heroes
def init
    self.story ||= hero_story_generator
    self.experience ||= 1
    self.max_health ||= 100
    self.current_health ||= 100
    self.power ||= 20
    self.save
  end
def init self . story ||= hero_story_generator self . experience ||= 1 self . max_health ||= 100 self . current_health ||= 100 self . power ||= 20 self . save end
Sets default values for new heroes
Sets default values for new heroes