Module: Faker::Game
- Defined in:
- lib/faker/game.rb,
lib/faker/game/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
- .ability_measurement ⇒ Object
- .adjective ⇒ Object
- .creator ⇒ Object
- .currency ⇒ Object
- .enemy ⇒ Object
- .franchise ⇒ Object
- .hero ⇒ Object
- .name ⇒ Object
- .name_with_franchise ⇒ Object
- .noun ⇒ Object
- .prefix ⇒ Object
- .subtitle ⇒ Object
- .suffix ⇒ Object
- .verb_noun ⇒ Object
Class Method Details
.ability_measurement ⇒ Object
10 11 12 |
# File 'lib/faker/game.rb', line 10 def ability_measurement %w(Renown Mana XP Experience Power).sample end |
.adjective ⇒ Object
18 19 20 |
# File 'lib/faker/game.rb', line 18 def adjective %w(Gold Golden Bloodied Bloody Mighty Powerful Damaged Dark Black Silver Iron).sample end |
.creator ⇒ Object
65 66 67 |
# File 'lib/faker/game.rb', line 65 def creator "#{Faker::Name.first_name} #{Faker::Name.last_name}" end |
.currency ⇒ Object
14 15 16 |
# File 'lib/faker/game.rb', line 14 def currency %w(Credit Point Gem Orb) end |
.enemy ⇒ Object
34 35 36 |
# File 'lib/faker/game.rb', line 34 def enemy %w(Ghost Titan Banshee Witch Insurgent Thief Ghoul Monster Tango Terrorist).sample end |
.franchise ⇒ Object
6 7 8 |
# File 'lib/faker/game.rb', line 6 def franchise "#{enemy} #{verb_noun}" end |
.hero ⇒ Object
26 27 28 |
# File 'lib/faker/game.rb', line 26 def hero %w(Soldier Hero Knight Savior Commander).sample end |
.name ⇒ Object
52 53 54 55 56 57 58 59 |
# File 'lib/faker/game.rb', line 52 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
61 62 63 |
# File 'lib/faker/game.rb', line 61 def name_with_franchise "#{creator}'s #{franchise} #{suffix}: #{subtitle}".squish end |
.noun ⇒ Object
22 23 24 |
# File 'lib/faker/game.rb', line 22 def noun %w(Power War Heart Darkness Soul Lost).sample end |
.prefix ⇒ Object
42 43 44 |
# File 'lib/faker/game.rb', line 42 def prefix "#{creator}'s #{franchise}" end |
.subtitle ⇒ Object
46 47 48 49 50 |
# File 'lib/faker/game.rb', line 46 def subtitle [ "The #{verb_noun} of #{enemy.pluralize}", "#{adjective} #{enemy.pluralize}", "#{adjective} #{hero}" ].sample end |
.suffix ⇒ Object
38 39 40 |
# File 'lib/faker/game.rb', line 38 def suffix (%w(II III IV V VI X SE HD Remastered 2 3 4) << nil).sample end |
.verb_noun ⇒ Object
30 31 32 |
# File 'lib/faker/game.rb', line 30 def verb_noun %w(Killer Destroyer Fighter Battler Vanquisher Hunter Commander Collector).sample end |