Module: Lich::Gemstone::Experience

Defined in:
lib/gemstone/experience.rb

Class Method Summary collapse

Class Method Details

.axpInteger

Retrieves the current ascension experience value.

Examples:

Lich::Gemstone::Experience.axp

Returns:

  • (Integer)

    the current ascension experience value.

Raises:

  • (StandardError)

    if there is an issue retrieving the ascension experience.



52
53
54
# File 'lib/gemstone/experience.rb', line 52

def self.axp
  Infomon.get("experience.ascension_experience")
end

.deaths_stingInteger

Retrieves the deaths sting value.

Examples:

Lich::Gemstone::Experience.deaths_sting

Returns:

  • (Integer)

    the deaths sting value.

Raises:

  • (StandardError)

    if there is an issue retrieving the deaths sting value.



122
123
124
# File 'lib/gemstone/experience.rb', line 122

def self.deaths_sting
  Infomon.get("experience.deaths_sting")
end

.deedsInteger

Retrieves the deeds value.

Examples:

Lich::Gemstone::Experience.deeds

Returns:

  • (Integer)

    the deeds value.

Raises:

  • (StandardError)

    if there is an issue retrieving the deeds value.



112
113
114
# File 'lib/gemstone/experience.rb', line 112

def self.deeds
  Infomon.get("experience.deeds")
end

.expInteger

Retrieves the current experience value.

Examples:

Lich::Gemstone::Experience.exp

Returns:

  • (Integer)

    the current experience value.

Raises:

  • (StandardError)

    if there is an issue retrieving the experience value.



42
43
44
# File 'lib/gemstone/experience.rb', line 42

def self.exp
  Stats.exp
end

.fameInteger

Retrieves the current fame value.

Examples:

Lich::Gemstone::Experience.fame

Returns:

  • (Integer)

    the current fame value.

Raises:

  • (StandardError)

    if there is an issue retrieving the fame value.



12
13
14
# File 'lib/gemstone/experience.rb', line 12

def self.fame
  Infomon.get("experience.fame")
end

.fxp_currentInteger

Retrieves the current field experience value.

Examples:

Lich::Gemstone::Experience.fxp_current

Returns:

  • (Integer)

    the current field experience value.

Raises:

  • (StandardError)

    if there is an issue retrieving the current field experience.



22
23
24
# File 'lib/gemstone/experience.rb', line 22

def self.fxp_current
  Infomon.get("experience.field_experience_current")
end

.fxp_maxInteger

Retrieves the maximum field experience value.

Examples:

Lich::Gemstone::Experience.fxp_max

Returns:

  • (Integer)

    the maximum field experience value.

Raises:

  • (StandardError)

    if there is an issue retrieving the maximum field experience.



32
33
34
# File 'lib/gemstone/experience.rb', line 32

def self.fxp_max
  Infomon.get("experience.field_experience_max")
end

.lteInteger

Retrieves the long-term experience value.

Examples:

Lich::Gemstone::Experience.lte

Returns:

  • (Integer)

    the long-term experience value.

Raises:

  • (StandardError)

    if there is an issue retrieving the long-term experience.



102
103
104
# File 'lib/gemstone/experience.rb', line 102

def self.lte
  Infomon.get("experience.long_term_experience")
end

.percent_axpFloat

Calculates the percentage of ascension experience relative to total experience.

Examples:

Lich::Gemstone::Experience.percent_axp

Returns:

  • (Float)

    the percentage of ascension experience.

Raises:

  • (ZeroDivisionError)

    if total experience is zero.



82
83
84
# File 'lib/gemstone/experience.rb', line 82

def self.percent_axp
  (axp.to_f / txp.to_f) * 100
end

.percent_expFloat

Calculates the percentage of current experience relative to total experience.

Examples:

Lich::Gemstone::Experience.percent_exp

Returns:

  • (Float)

    the percentage of current experience.

Raises:

  • (ZeroDivisionError)

    if total experience is zero.



92
93
94
# File 'lib/gemstone/experience.rb', line 92

def self.percent_exp
  (exp.to_f / txp.to_f) * 100
end

.percent_fxpFloat

Calculates the percentage of current field experience relative to the maximum field experience.

Examples:

Lich::Gemstone::Experience.percent_fxp

Returns:

  • (Float)

    the percentage of current field experience.

Raises:

  • (ZeroDivisionError)

    if the maximum field experience is zero.



72
73
74
# File 'lib/gemstone/experience.rb', line 72

def self.percent_fxp
  (fxp_current.to_f / fxp_max.to_f) * 100
end

.txpInteger

Retrieves the total experience value.

Examples:

Lich::Gemstone::Experience.txp

Returns:

  • (Integer)

    the total experience value.

Raises:

  • (StandardError)

    if there is an issue retrieving the total experience.



62
63
64
# File 'lib/gemstone/experience.rb', line 62

def self.txp
  Infomon.get("experience.total_experience")
end