Repository navigation
Expand file tree
/
Copy pathdnd.rb
More file actions
136 lines (125 loc) · 3.16 KB
/
Copy pathdnd.rb
File metadata and controls
136 lines (125 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# frozen_string_literal: true
module Faker
class Games
class DnD < Base
class << self
##
# Produces the name of an alignment from Dungeons and Dragons.
#
# @return [String]
#
# @example
# Faker::Games::DnD.alignment #=> "Lawful Neutral"
#
# @faker.version 2.13.0
def alignment
fetch('dnd.alignments')
end
##
# Produces the name of a background from Dungeons and Dragons (PHB).
#
# @return [String]
#
# @example
# Faker::Games::DnD.background #=> "Urchin"
#
# @faker.version 2.13.0
def background
fetch('dnd.backgrounds')
end
##
# Produces the name of a city from Dungeons and Dragons.
#
# @return [String]
#
# @example
# Faker::Games::DnD.city #=> "Earthfast"
#
# @faker.version 2.14.0
def city
fetch('dnd.cities')
end
##
# Produces the name of a class from Dungeons and Dragons (PHB).
#
# @return [String]
#
# @example
# Faker::Games::DnD.klass #=> "Warlock"
#
# @faker.version 2.13.0
def klass
fetch('dnd.klasses')
end
##
# Produces the name of a language from Dungeons and Dragons.
#
# @return [String]
#
# @example
# Faker::Games::DnD.language #=> "Gnomish"
#
# @faker.version 2.14.0
def language
fetch('dnd.languages')
end
##
# Produces the name of a melee weapon from Dungeons and Dragons.
#
# @return [String]
#
# @example
# Faker::Games::DnD.melee_weapon #=> "Handaxe"
#
# @faker.version 2.14.0
def melee_weapon
fetch('dnd.melee_weapons')
end
##
# Produces the name of a monster from Dungeons and Dragons.
#
# @return [String]
#
# @example
# Faker::Games::DnD.monster #=> "Manticore"
#
# @faker.version 2.14.0
def monster
fetch('dnd.monsters')
end
##
# Produces the name of a race from Dungeons and Dragons (PHB).
#
# @return [String]
#
# @example
# Faker::Games::DnD.races #=> "Dwarf"
#
# @faker.version 2.14.0
def race
fetch('dnd.races')
end
##
# Produces the name of a ranged weapon from Dungeons and Dragons.
#
# @return [String]
#
# @example
# Faker::Games::DnD.ranged_weapon #=> "Shortbow"
#
# @faker.version 2.14.0
def ranged_weapon
fetch('dnd.ranged_weapons')
end
# This method is deprecated. The implementation will be removed in a near future release.
# Use `DnD.race` instead.
#
# @deprecated Use {#race} instead.
def species
warn '`DnD.species` is deprecated. Use `DnD.race` instead.'
super
end
end
end
end
end