Sha256: 5cfad83a866c8bf7526ace30acd970adf1f665154dd7dcc5885e6972c753ccd0

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

Gamefic.script do
  respond :drop, Use.available do |actor, thing|
    actor.tell "You're not carrying #{the thing}."
  end

  respond :drop, Gamefic::Query::Descendants.new do |actor, thing|
    actor.execute :take, thing
    next unless thing.parent == actor
    thing.parent = actor.parent
    actor.tell "You drop #{the thing}."
  end

  respond :drop, Use.children do |actor, thing|
    thing.parent = actor.parent
    actor.tell "You drop #{the thing}."
  end

  interpret "put down :thing", "drop :thing"
  interpret "put :thing down", "drop :thing"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gamefic-standard-2.4.0 lib/gamefic-standard/actions/drop.rb