Class: Alchemist::Commands::Formulate

Inherits:
Base show all
Defined in:
lib/alchemist-server/commands/formulate.rb

Instance Attribute Summary

Attributes inherited from Base

#avatar_name, #history

Instance Method Summary collapse

Methods inherited from Base

#initialize, #outcome, pattern, run

Constructor Details

This class inherits a constructor from Alchemist::Commands::Base

Instance Method Details

#run(elem_1, elem_2, novel_elem, *name) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/alchemist-server/commands/formulate.rb', line 6

def run(elem_1, elem_2, novel_elem, *name)
  world = history.world.formulate avatar_name,
                                  elem_1,
                                  elem_2,
                                  novel_elem,
                                  name.join(' ')
  a = world.avatar avatar_name

  outcome "inventory #{a.inventory}",
          world,
          Commands::Compounds
end