Sha256: bf8aaff63a316c5586e1723eac776bdc7043c0df3d4ac4c10997a3703dd7e7f3

Contents?: true

Size: 644 Bytes

Versions: 7

Compression:

Stored size: 644 Bytes

Contents

# frozen_string_literal: true

module Gamefic
  module Standard
    script do
      respond :move, Thing do |actor, thing|
        if thing.portable?
          actor.tell "Maybe you want to <em>take</em> it?"
        else
          actor.tell "You can't move #{the thing}."
        end
      end

      respond :move, children(Thing) do |actor, thing|
        actor.tell "You're already carrying #{the thing}."
      end

      interpret "push :thing", "move :thing"
      interpret "pull :thing", "move :thing"
      interpret "drag :thing", "move :thing"
      interpret "lift :thing", "move :thing"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gamefic-standard-3.2.4 lib/gamefic-standard/actions/move.rb
gamefic-standard-3.2.3 lib/gamefic-standard/actions/move.rb
gamefic-standard-3.2.2 lib/gamefic-standard/actions/move.rb
gamefic-standard-3.2.1 lib/gamefic-standard/actions/move.rb
gamefic-standard-3.2.0 lib/gamefic-standard/actions/move.rb
gamefic-standard-3.1.0 lib/gamefic-standard/actions/move.rb
gamefic-standard-3.0.0 lib/gamefic-standard/actions/move.rb