Sha256: a9dc75b236ad487ac6e40848a0e1b99a38e0f428da34e7eff09b8dbadaedabaa

Contents?: true

Size: 581 Bytes

Versions: 2

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.perform :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

2 entries across 2 versions & 1 rubygems

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