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
730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 |
# File 'documented/games.rb', line 730 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
752 753 754 755 756 |
# File 'documented/games.rb', line 752 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 |