Sha256: 02605aaf274441d2bbb8eca0eaadbfe91a0d1e58dca819d4010a94d3eb710b08

Contents?: true

Size: 1.48 KB

Versions: 1

Compression:

Stored size: 1.48 KB

Contents

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

  respond :place, Use.available, Use.available(Supporter) do |actor, thing, supporter|
    actor.perform :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, Use.children, Use.reachable(Supporter) do |actor, thing, supporter|
    thing.parent = supporter
    actor.tell "You put #{the thing} on #{the supporter}."
  end

  respond :place, Use.visible, Use.text do |actor, _thing, supporter|
    actor.tell "You don't see anything called \"#{supporter}\" here."
  end

  respond :place, Use.text, Use.visible do |actor, thing, supporter|
    actor.tell "You don't see anything called \"#{thing}\" here."
  end

  respond :place, Use.text, Use.text do |actor, thing, supporter|
    actor.tell "I don't know what you mean by \"#{thing}\" or \"#{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

1 entries across 1 versions & 1 rubygems

Version Path
gamefic-standard-2.2.0 lib/gamefic-standard/actions/place.rb