Sha256: 7413d8dd19aa1eb8058b50ee57e5a020a9b038c436c0be7466857464181a7920

Contents?: true

Size: 709 Bytes

Versions: 2

Compression:

Stored size: 709 Bytes

Contents

# @gamefic.script standard/give

respond :give, Use.available, Gamefic::Query::Children.new do |actor, _character, gift|
  actor.tell "Nothing happens."
end

respond :give, Use.available(Character), Use.available do |actor, character, gift|
  actor.tell "#{The character} doesn't want #{the gift}."
end

respond :give, Use.available(Character), Use.available do |actor, _character, gift|
  if gift.parent == actor
    actor.proceed
  else
    actor.tell "You don't have #{the gift}."
  end
end

respond :give, Use.text, Use.available do |actor, character, _gift|
  actor.tell "You don't see any \"#{character}\" here."
end

interpret "give :gift to :character", "give :character :gift"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gamefic-standard-2.2.0 lib/gamefic-standard/give.rb
gamefic-standard-2.1.0 lib/gamefic-standard/give.rb