Sha256: b04273b54aafd330455d77b5ef880346ed3c9c3691b342c955b23d7a6f4ec1b3

Contents?: true

Size: 1.02 KB

Versions: 7

Compression:

Stored size: 1.02 KB

Contents

Gamefic::Standard.script do
  respond :place, children, available do |actor, thing, supporter|
    actor.tell "You can't put #{the thing} on #{the supporter}."
  end

  respond :place, available, available(Supporter) do |actor, thing, supporter|
    actor.execute :take, thing unless thing.parent == actor
    next unless thing.parent == actor
    thing.parent = supporter
    actor.tell "You put #{the thing} on #{the supporter}."
  end

  respond :place, children, available(Supporter) do |actor, thing, supporter|
    thing.parent = supporter
    actor.tell "You put #{the thing} on #{the supporter}."
  end

  interpret 'put :thing on :supporter', 'place :thing :supporter'
  interpret 'put :thing down on :supporter', 'place :thing :supporter'
  interpret 'set :thing on :supporter', 'place :thing :supporter'
  interpret 'set :thing down on :supporter', 'place :thing :supporter'
  interpret 'drop :thing on :supporter', 'place :thing :supporter'
  interpret 'place :thing on :supporter', 'place :thing :supporter'
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gamefic-standard-3.2.4 lib/gamefic-standard/actions/place.rb
gamefic-standard-3.2.3 lib/gamefic-standard/actions/place.rb
gamefic-standard-3.2.2 lib/gamefic-standard/actions/place.rb
gamefic-standard-3.2.1 lib/gamefic-standard/actions/place.rb
gamefic-standard-3.2.0 lib/gamefic-standard/actions/place.rb
gamefic-standard-3.1.0 lib/gamefic-standard/actions/place.rb
gamefic-standard-3.0.0 lib/gamefic-standard/actions/place.rb