Module: Faker::Game
- Defined in:
- lib/faker/game.rb,
lib/faker/game/place.rb,
lib/faker/game/version.rb,
lib/faker/game/character.rb,
lib/faker/game/achievement.rb,
lib/faker/game/character_title.rb
Defined Under Namespace
Modules: Achievement, Character, CharacterTitle, Place
Constant Summary
collapse
- VERSION =
"0.1.3"
Class Method Summary
collapse
Class Method Details
.ability_measurement ⇒ Object
15
16
17
|
# File 'lib/faker/game.rb', line 15
def ability_measurement
%w(Renown Mana XP Experience Power).sample
end
|
.currency ⇒ Object
19
20
21
|
# File 'lib/faker/game.rb', line 19
def currency
%w(Credit Point Gem Orb Coin).sample
end
|
.enemy ⇒ Object
31
32
33
|
# File 'lib/faker/game.rb', line 31
def enemy
%w(Ghost Titan Banshee Witch Insurgent Thief Ghoul Monster Tango Terrorist).sample
end
|
.franchise ⇒ Object
11
12
13
|
# File 'lib/faker/game.rb', line 11
def franchise
"#{enemy} #{verb_noun}"
end
|
.hero ⇒ Object
23
24
25
|
# File 'lib/faker/game.rb', line 23
def hero
%w(Soldier Hero Knight Savior Commander).sample
end
|
.name ⇒ Object
45
46
47
48
49
50
51
52
|
# File 'lib/faker/game.rb', line 45
def name
["The #{verb_noun} of #{enemy.pluralize}",
"#{franchise} #{suffix}".strip,
"#{enemy} #{verb_noun}",
"#{adjective} #{hero}",
franchise,
"#{prefix}", nil].sample || name_with_franchise
end
|
.name_with_franchise ⇒ Object
54
55
56
|
# File 'lib/faker/game.rb', line 54
def name_with_franchise
"#{creator}'s #{franchise} #{suffix}: #{subtitle}".squish
end
|
.prefix ⇒ Object
35
36
37
|
# File 'lib/faker/game.rb', line 35
def prefix
"#{creator}'s #{franchise}"
end
|
.subtitle ⇒ Object
39
40
41
42
43
|
# File 'lib/faker/game.rb', line 39
def subtitle
["The #{verb_noun} of #{enemy.pluralize}",
"#{adjective} #{enemy.pluralize}",
"#{adjective} #{hero}"].sample
end
|
.verb_noun ⇒ Object
27
28
29
|
# File 'lib/faker/game.rb', line 27
def verb_noun
%w(Killer Destroyer Fighter Battler Vanquisher Hunter Commander Collector).sample
end
|