Sha256: e28e97de8349f36cecd63c2848dab7642217f9a7ecb0cdcf87e65a1909314935

Contents?: true

Size: 1.94 KB

Versions: 18

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

18 entries across 18 versions & 1 rubygems

Version Path
gemwarrior-0.9.16 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.15 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.14 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.13 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.12 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.10 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.9 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.8 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.7 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.6 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.5 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.4 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.3 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.2 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.1 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.9.0 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.8.8 lib/gemwarrior/entities/monsters/bosses/emerald.rb
gemwarrior-0.8.7 lib/gemwarrior/entities/monsters/bosses/emerald.rb