Class: Lich::Gemstone::CharacterStatus
- Inherits:
-
Object
- Object
- Lich::Gemstone::CharacterStatus
- Defined in:
- documented/games.rb
Class Method Summary collapse
-
.fix_injury_mode(mode = 'both') ⇒ Object
Default mode ‘both’ handles wounds (precedence) then scars.
- .method_missing(_method_name = nil) ⇒ Object
Class Method Details
.fix_injury_mode(mode = 'both') ⇒ Object
Default mode ‘both’ handles wounds (precedence) then scars
738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 |
# File 'documented/games.rb', line 738 def fix_injury_mode(mode = 'both') # Default mode 'both' handles wounds (precedence) then scars case mode when 'scar', 'scars' unless XMLData.injury_mode == 1 Game._puts '_injury 1' 150.times { sleep 0.05; break if XMLData.injury_mode == 1 } end when 'wound', 'wounds' # future proof leaving in place, but this will likely not be used unless XMLData.injury_mode == 0 Game._puts '_injury 0' 150.times { sleep 0.05; break if XMLData.injury_mode == 0 } end when 'both' unless XMLData.injury_mode == 2 Game._puts '_injury 2' 150.times { sleep 0.05; break if XMLData.injury_mode == 2 } end else raise ArgumentError, "Invalid mode: #{mode}. Use 'scar', 'wound', or 'both'." end end |
.method_missing(_method_name = nil) ⇒ Object
760 761 762 763 764 |
# File 'documented/games.rb', line 760 def method_missing(_method_name = nil) result = Lich::Messaging.mono(Lich::Messaging.msg_format("bold", "#{self.name.split('::').last}: Invalid area, try one of these: arms, limbs, torso, #{XMLData.injuries.keys.join(', ')}")) # the _respond method used in Lich::Messaging returns nil upon success return result end |