Module: Lich::DragonRealms::DRSpells

Defined in:
documented/dragonrealms/drinfomon/drspells.rb

Overview

Module for managing spells in DragonRealms.

This module contains methods to access and manipulate known spells and features.

Constant Summary collapse

@@known_spells =
{}
@@known_feats =
{}
@@spellbook_format =

'column-formatted' or 'non-column'

nil
@@grabbing_known_spells =
false
@@grabbing_known_barbarian_abilities =
false
@@grabbing_known_khri =
false

Class Method Summary collapse

Class Method Details

.active_spellsArray<String>

Retrieves the currently active spells.

Returns:

  • (Array<String>)

    list of active spells.



21
22
23
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 21

def self.active_spells
  XMLData.dr_active_spells
end

.check_known_barbarian_abilitiesBoolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Checks if known barbarian abilities are being grabbed.

Returns:

  • (Boolean)

    true if grabbing, false otherwise.



60
61
62
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 60

def self.check_known_barbarian_abilities
  @@grabbing_known_barbarian_abilities
end

.check_known_barbarian_abilities=(val) ⇒ Object



64
65
66
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 64

def self.check_known_barbarian_abilities=(val)
  @@grabbing_known_barbarian_abilities = val
end

.grabbing_known_khriBoolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Checks if known khri are being grabbed.

Returns:

  • (Boolean)

    true if grabbing, false otherwise.



71
72
73
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 71

def self.grabbing_known_khri
  @@grabbing_known_khri
end

.grabbing_known_khri=(val) ⇒ Object



75
76
77
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 75

def self.grabbing_known_khri=(val)
  @@grabbing_known_khri = val
end

.grabbing_known_spellsObject



49
50
51
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 49

def self.grabbing_known_spells
  @@grabbing_known_spells
end

.grabbing_known_spells=(val) ⇒ Object



53
54
55
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 53

def self.grabbing_known_spells=(val)
  @@grabbing_known_spells = val
end

.known_featsHash

Returns a hash of known feats.

Returns:

  • (Hash)

    known feats with their details.



33
34
35
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 33

def self.known_feats
  @@known_feats
end

.known_spellsHash

Returns a hash of known spells.

Returns:

  • (Hash)

    known spells with their details.



27
28
29
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 27

def self.known_spells
  @@known_spells
end

.sliversArray<String>

Retrieves the slivers of currently active spells.

Returns:

  • (Array<String>)

    list of spell slivers.



39
40
41
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 39

def self.slivers
  XMLData.dr_active_spells_slivers
end

.spellbook_formatString?

Retrieves the current spellbook format.

Returns:

  • (String, nil)

    the format of the spellbook or nil if not set.



81
82
83
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 81

def self.spellbook_format
  @@spellbook_format
end

.spellbook_format=(val) ⇒ Object



85
86
87
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 85

def self.spellbook_format=(val)
  @@spellbook_format = val
end

.stellar_percentageInteger

Retrieves the stellar percentage of active spells.

Returns:

  • (Integer)

    percentage value.



45
46
47
# File 'documented/dragonrealms/drinfomon/drspells.rb', line 45

def self.stellar_percentage
  XMLData.dr_active_spells_stellar_percentage
end