Module: Moves

Defined in:
app/models/moves/basic.rb,
app/models/moves/rollable.rb,
app/models/moves/descriptive.rb

Overview

Schema Information

Table name: moves

Indexes

index_moves_on_playbook_id  (playbook_id)

Foreign Keys

fk_rails_...  (playbook_id => playbooks.id)

Defined Under Namespace

Classes: Basic, Descriptive, Rollable

Instance Attribute Summary collapse

Instance Attribute Details

#created_atTime

Returns:

  • (Time)

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#descriptionString

Returns:

  • (String)

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#havenBoolean

Returns:

  • (Boolean)

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#idObject

Returns [].

Returns:


42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#nameString

Returns:

  • (String)

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#playbook_idObject

Returns [].

Returns:


42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#ratingInteger

Returns:

  • (Integer)

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#seven_to_nineString

Returns:

  • (String)

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#six_and_underString

Returns:

  • (String)

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#ten_plusString

Returns:

  • (String)

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#twelve_plusString

Returns:

  • (String)

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#typeString

Returns:

  • (String)

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end

#updated_atTime

Returns:

  • (Time)

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/moves/basic.rb', line 42

module Moves
  # This  class represents the basic moves that all Hunters have
  class Basic < Move
    include ::Rollable

    def outcome(roll, hunter)
      case roll
      when 0..6
        six_and_under
      when 7..9
        seven_to_nine
      when 10..11
        ten_plus
      else
        hunter.advanced?(self) ? twelve_plus : ten_plus
      end
    end
  end
end