Class: Lich::GameBase::GameInstance::Base
- Inherits:
-
Object
- Object
- Lich::GameBase::GameInstance::Base
show all
- Defined in:
- documented/games.rb
Overview
Base instance class that defines the interface Base instance class that defines the interface This class provides the basic structure for game instances
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
78
79
80
81
82
|
# File 'documented/games.rb', line 78
def initialize
@atmospherics = false
@combat_count = 0
@end_combat_tags = ["<prompt", "<clearStream", "<component", "<pushStream id=\"percWindow"]
end
|
Instance Method Details
#atmospherics ⇒ Object
116
117
118
|
# File 'documented/games.rb', line 116
def atmospherics
@atmospherics
end
|
#atmospherics=(value) ⇒ Object
120
121
122
|
# File 'documented/games.rb', line 120
def atmospherics=(value)
@atmospherics = value
end
|
#clean_serverstring(server_string) ⇒ Object
84
85
86
|
# File 'documented/games.rb', line 84
def clean_serverstring(server_string)
raise NotImplementedError, "#{self.class} must implement #clean_serverstring"
end
|
#combat_count ⇒ Object
112
113
114
|
# File 'documented/games.rb', line 112
def combat_count
@combat_count
end
|
#get_documentation_url ⇒ Object
96
97
98
|
# File 'documented/games.rb', line 96
def get_documentation_url
raise NotImplementedError, "#{self.class} must implement #get_documentation_url"
end
|
#handle_atmospherics(server_string) ⇒ Object
92
93
94
|
# File 'documented/games.rb', line 92
def handle_atmospherics(server_string)
raise NotImplementedError, "#{self.class} must implement #handle_atmospherics"
end
|
88
89
90
|
# File 'documented/games.rb', line 88
def handle_combat_tags(server_string)
raise NotImplementedError, "#{self.class} must implement #handle_combat_tags"
end
|
#increment_combat_count(server_string) ⇒ Object
126
127
128
129
130
|
# File 'documented/games.rb', line 126
def increment_combat_count(server_string)
@combat_count += server_string.scan("<pushStream id=\"combat\" />").length
@combat_count -= server_string.scan("<popStream id=\"combat\" />").length
@combat_count = 0 if @combat_count < 0
end
|
#modify_room_display(alt_string, uid_from_string, lichid_from_uid_string) ⇒ Object
104
105
106
|
# File 'documented/games.rb', line 104
def modify_room_display(alt_string, uid_from_string, lichid_from_uid_string)
raise NotImplementedError, "#{self.class} must implement #modify_room_display"
end
|
#process_game_specific_data(server_string) ⇒ Object
100
101
102
|
# File 'documented/games.rb', line 100
def process_game_specific_data(server_string)
raise NotImplementedError, "#{self.class} must implement #process_game_specific_data"
end
|
#process_room_display(alt_string) ⇒ Object
108
109
110
|
# File 'documented/games.rb', line 108
def process_room_display(alt_string)
raise NotImplementedError, "#{self.class} must implement #process_room_display"
end
|