Module: Lich::Gemstone::Armor

Defined in:
documented/gemstone/psms/armor.rb

Overview

Provides logic for detecting, checking, and using PSM3 armor techniques in GemStone IV.

This module defines a registry of available armor-related abilities and wraps common queries Provides logic for detecting, checking, and using PSM3 armor techniques in GemStone IV.

This module defines a registry of available armor-related abilities and wraps common queries.

Constant Summary collapse

@@armor_techniques =
{
  "armor_blessing"      => {
    :short_name => "blessing",
    :type       => :buff,
    :cost       => { stamina: 0 },
    :regex      => /As \w+ prays? over \w+(?:'s)? [\w\s]+, you sense that (?:the Arkati's|a) blessing will be granted against magical attacks\./i,
    :usage      => "blessing"
  },
  "armor_reinforcement" => {
    :short_name => "reinforcement",
    :type       => :buff,
    :cost       => { stamina: 0 },
    :regex      => /\w+ adjusts? \w+(?:'s)? [\w\s]+, reinforcing weak spots\./i,
    :usage      => "reinforcement"
  },
  "armor_spike_mastery" => {
    :short_name => "spikemastery",
    :type       => :passive,
    :cost       => { stamina: 0 },
    :regex      => /Armor Spike Mastery is passive and always active once learned\./i,
    :usage      => "spikemastery"
  },
  "armor_support"       => {
    :short_name => "support",
    :type       => :buff,
    :cost       => { stamina: 0 },
    :regex      => /\w+ adjusts? \w+(?:'s)? [\w\s]+, improving its ability to support the weight of \w+ gear\./i,
    :usage      => "support"
  },
  "armored_casting"     => {
    :short_name => "casting",
    :type       => :buff,
    :cost       => { stamina: 0 },
    :regex      => /\w+ adjusts? \w+(?:'s)? [\w\s]+, making it easier for \w+ to recover from failed spell casting\./i,
    :usage      => "casting"
  },
  "armored_evasion"     => {
    :short_name => "evasion",
    :type       => :buff,
    :cost       => { stamina: 0 },
    :regex      => /\w+ adjusts? \w+(?:'s)? [\w\s]+, improving its comfort and maneuverability\./i,
    :usage      => "evasion"
  },
  "armored_fluidity"    => {
    :short_name => "fluidity",
    :type       => :buff,
    :cost       => { stamina: 0 },
    :regex      => /\w+ adjusts? \w+(?:'s)? [\w\s]+, making it easier for \w+ to cast spells\./i,
    :usage      => "fluidity"
  },
  "armored_stealth"     => {
    :short_name => "stealth",
    :type       => :buff,
    :cost       => { stamina: 0 },
    :regex      => /\w+ adjusts? \w+(?:'s)? [\w\s]+ to cushion \w+ movements\./i,
    :usage      => "stealth"
  },
  "crush_protection"    => {
    :short_name => "crush",
    :type       => :passive,
    :cost       => { stamina: 0 },
    :regex      => Regexp.union(
      /You adjust \w+(?:'s)? [\w\s]+ with your (?:cloth|leather|scale|chain|plate|accessory) armor fittings, rearranging and reinforcing the armor to better protect against crushing damage\./i,
      /You must specify an armor slot\./,
      /You don't seem to have the necessary armor fittings in hand\./
    ),
    :usage      => "crush"
  },
  "puncture_protection" => {
    :short_name => "puncture",
    :type       => :passive,
    :cost       => { stamina: 0 },
    :regex      => Regexp.union(
      /You adjust \w+(?:'s)? [\w\s]+ with your (?:cloth|leather|scale|chain|plate|accessory) armor fittings, rearranging and reinforcing the armor to better protect against puncturing damage\./i,
      /You must specify an armor slot\./,
      /You don't seem to have the necessary armor fittings in hand\./
    ),
    :usage      => "puncture"
  },
  "slash_protection"    => {
    :short_name => "slash",
    :type       => :passive,
    :cost       => { stamina: 0 },
    :regex      => Regexp.union(
      /You adjust \w+(?:'s)? [\w\s]+ with your (?:cloth|leather|scale|chain|plate|accessory) armor fittings, rearranging and reinforcing the armor to better protect against slashing damage\./i,
      /You must specify an armor slot\./,
      /You don't seem to have the necessary armor fittings in hand\./
    ),
    :usage      => "slash"
  }
}

Class Method Summary collapse

Class Method Details

.armor_lookupsArray<Hash>

Returns an array of armor techniques with their long and short names and costs.

Returns:

  • (Array<Hash>)

    an array of hashes containing armor technique details.



105
106
107
108
109
110
111
112
113
# File 'documented/gemstone/psms/armor.rb', line 105

def self.armor_lookups
  @@armor_techniques.map do |long_name, psm|
    {
      long_name: long_name,
      short_name: psm[:short_name],
      cost: psm[:cost]
    }
  end
end