Sha256: 7202b9251fbb175dce90aafcd97865ff61895195159b84ac43c33c8c3705e8c1

Contents?: true

Size: 779 Bytes

Versions: 3

Compression:

Stored size: 779 Bytes

Contents

Gamefic.script do
  respond :enter, Use.siblings do |actor, thing|
    actor.tell "#{The thing} can't accommodate you."
  end

  respond :enter, Use.siblings(Enterable, :enterable?) do |actor, supporter|
    actor.parent = supporter
    actor.tell "You get in #{the supporter}."
  end

  respond :enter, Use.parent do |actor, container|
    actor.tell "You're already in #{the container}."
  end

  respond :enter, Use.parent(Supporter) do |actor, supporter|
    actor.tell "You're inside #{the supporter} already."
  end

  respond :enter, Use.siblings(Container, :enterable?, :closed?) do |actor, container|
    actor.tell "#{The container} is closed."
  end

  interpret "get on :thing", "enter :thing"
  interpret "get in :thing", "enter :thing"
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gamefic-standard-2.4.0 lib/gamefic-standard/actions/enter.rb
gamefic-standard-2.3.1 lib/gamefic-standard/actions/enter.rb
gamefic-standard-2.3.0 lib/gamefic-standard/actions/enter.rb