Sha256: 9d6d06544f38709abc0ffc2a9f6de405b43af7db3bfd751c2d2a4bcadfce6858
Contents?: true
Size: 1.39 KB
Versions: 1
Compression:
Stored size: 1.39 KB
Contents
# frozen_string_literal: true module Gamefic module Standard module Actions module Place extend Gamefic::Scriptable 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 respond :place, children, room do |actor, thing| actor.execute :drop, thing 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 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gamefic-standard-3.3.0 | lib/gamefic-standard/actions/place.rb |