class OldSchool::HiScores::Minigame
Attributes
@return [String] The name of this minigame
@return [Number] The rank of this minigame on the HiScores
@return [Number] The score of this minigame on the HiScores
@return [Symbol] The symbol of this minigame
Public Class Methods
Creates a new Minigame
instance
@see OldSchool::HiScores::MINIGAMES Complete list of OldSchool
Minigames
@param symbol [Symbol] the symbol of the minigame @param rank [Number] the rank of the minigame on the HiScores
@param score [Number] the score of the minigame on the HiScores
# File lib/oldschool/hiscores/minigame.rb, line 25 def initialize(symbol, rank = 0, score = 0) @symbol = symbol @name = HiScores.human_name_for symbol @rank = rank @score = score end
Public Instance Methods
Determines if this minigame is dangerous
A minigame is dangerous if you lose items when you die
@example Bounty Hunter Rogue is a dangerous minigame
minigame = OldSchool::HiScores::Minigame.new :bh_rogue minigame.dangerous? #=> true
@note This is the inverse of safe?
@see safe?
# File lib/oldschool/hiscores/minigame.rb, line 61 def dangerous? !safe? end
Determines if this minigame is safe
A minigame is safe if when you die while doing the minigame, you don't lose your items.
@example Bounty Hunter you lose items on death
minigame = OldSchool::HiScores::Minigame.new :bh_hunter minigame.safe? #=> false
@note You can die during Clue Scrolls, but their intents are
not PVP or even combat related, so clue scrolls are listed as safe.
@return [true] if the minigame is classified as safe @return [false] if the minigame is classified as dangerous
# File lib/oldschool/hiscores/minigame.rb, line 46 def safe? HiScores::MINIGAMES_SAFE.include? @symbol end