Sha256: 70992f224183349d0766bba6d4c23c70ccd133f240eaf04af295632b718fa7a4

Contents?: true

Size: 824 Bytes

Versions: 1

Compression:

Stored size: 824 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|
  if gift.sticky?
    actor.tell gift.sticky_message || "You need to keep #{the gift} for now."
  else
    actor.tell "#{The character} doesn't want #{the gift}."
  end
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

1 entries across 1 versions & 1 rubygems

Version Path
gamefic-standard-2.0.0 lib/gamefic-standard/give.rb