Module: Lich::Gemstone::Creature
- Defined in:
- documented/gemstone/creature.rb
Overview
Provides methods for managing creature instances. This module serves as a facade for interacting with creature instances.
Class Method Summary collapse
-
.[](id) ⇒ CreatureInstance?
Retrieves a creature instance by ID.
- .all ⇒ Object
-
.cleanup_old(**options) ⇒ void
Cleans up old creature instances based on specified options.
-
.clear ⇒ void
Clears all registered creature instances.
-
.configure(**options) ⇒ void
Configures the creature instance settings.
- .damage_report(**options) ⇒ Object
- .print_damage_report(**options) ⇒ Object
-
.register(name, id, noun = nil) ⇒ CreatureInstance?
Registers a new creature instance with the specified name and ID.
-
.stats ⇒ Hash
Retrieves statistics about the current state of creature instances.
Class Method Details
.[](id) ⇒ CreatureInstance?
Retrieves a creature instance by ID.
591 592 593 |
# File 'documented/gemstone/creature.rb', line 591 def self.[](id) CreatureInstance[id] end |
.all ⇒ Object
643 644 645 |
# File 'documented/gemstone/creature.rb', line 643 def self.all CreatureInstance.all end |
.cleanup_old(**options) ⇒ void
This method returns an undefined value.
Cleans up old creature instances based on specified options.
631 632 633 |
# File 'documented/gemstone/creature.rb', line 631 def self.cleanup_old(**) CreatureInstance.cleanup_old(**) end |
.clear ⇒ void
This method returns an undefined value.
Clears all registered creature instances.
624 625 626 |
# File 'documented/gemstone/creature.rb', line 624 def self.clear CreatureInstance.clear end |
.configure(**options) ⇒ void
This method returns an undefined value.
Configures the creature instance settings.
607 608 609 |
# File 'documented/gemstone/creature.rb', line 607 def self.configure(**) CreatureInstance.configure(**) end |
.damage_report(**options) ⇒ Object
635 636 637 |
# File 'documented/gemstone/creature.rb', line 635 def self.damage_report(**) CreatureInstance.damage_report(**) end |
.print_damage_report(**options) ⇒ Object
639 640 641 |
# File 'documented/gemstone/creature.rb', line 639 def self.print_damage_report(**) CreatureInstance.print_damage_report(**) end |
.register(name, id, noun = nil) ⇒ CreatureInstance?
Registers a new creature instance with the specified name and ID.
600 601 602 |
# File 'documented/gemstone/creature.rb', line 600 def self.register(name, id, noun = nil) CreatureInstance.register(name, id, noun) end |
.stats ⇒ Hash
Retrieves statistics about the current state of creature instances.
613 614 615 616 617 618 619 620 |
# File 'documented/gemstone/creature.rb', line 613 def self.stats { instances: CreatureInstance.size, templates: CreatureTemplate.all.size, max_size: CreatureInstance.class_variable_get(:@@max_size), auto_register: CreatureInstance.auto_register? } end |