Sha256: 528ac0dab41a7600cbf8542b783457a4193e0d50fb4f6cf2fe6556db030e1543

Contents?: true

Size: 1.94 KB

Versions: 27

Compression:

Stored size: 1.94 KB

Contents

# lib/gemwarrior/entities/monsters/bosses/emerald.rb
# Emerald boss monster

require_relative '../../monster'
require_relative '../../items/sparklything'

module Gemwarrior
  class Emerald < Monster
    attr_accessor :defeated_text

    def initialize
      self.name           = 'Emerald'
      self.description    = 'A wily, beefy, tower of a man, champion of both wisdom and strength, sporting a constant glint in his eyes.'
      self.face           = 'gleaming'
      self.hands          = 'tantalizing'
      self.mood           = 'enraged'

      self.level          = 15
      self.hp_cur         = rand((level * 2)..(level * 3))
      self.hp_max         = hp_cur
      self.atk_lo         = rand(level..(level * 2.5).floor)
      self.atk_hi         = rand((level * 2.5).floor..(level * 3).floor)
      self.defense        = rand(5..7)
      self.dexterity      = rand(8..10)

      self.inventory      = Inventory.new(items = [SparklyThing.new])
      self.rox            = rand((level * 2)..(level * 3))
      self.xp             = rand(level..(level * 2))

      self.battlecry      = 'Ha ha ha ha ha! Prepare yourself: today your whole life crumbles!'
      self.is_boss        = true
      self.defeated_text  = defeated_text
    end

    def defeated_text
      text =  "<^><^><^><^><^><^><^><^><^><^>\n"
      text <<  "You beat #{name}! You win!\n"
      text << 'You receive the '
      text << 'SparklyThing(tm)'.colorize(:magenta)
      text << ' and become the true '
      text << 'Gem Warrior'.colorize(:yellow)
      text << "!\n"
      text << 'You decide to ignore '
      text << 'Queen Ruby'.colorize(:red)
      text << " and take your spoils back home\n"
      text << "where you live out the rest of your days staring at it, wondering\n"
      text << "what it was all about.\n\n"
      text << "Thank you for playing. Goodbye.\n"
      text << "<^><^><^><^><^><^><^><^><^><^>\n"
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
gemwarrior-0.10.7 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.10.6 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.10.5 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.10.4 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.10.2 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.10.1 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.10.0 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.39 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.37 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.36 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.35 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.34 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.33 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.32 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.31 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.30 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.28 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.27 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.26 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.24 lib/gemwarrior/entities/monsters/bosses/emerald.rb