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

Class Method Details

.ability_measurementObject



10
11
12
# File 'lib/faker/game.rb', line 10

def ability_measurement
  %w(Renown Mana XP Experience Power).sample
end

.adjectiveObject



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

.creatorObject



65
66
67
# File 'lib/faker/game.rb', line 65

def creator
  "#{Faker::Name.first_name} #{Faker::Name.last_name}"
end

.currencyObject



14
15
16
# File 'lib/faker/game.rb', line 14

def currency
  %w(Credit Point Gem Orb)
end

.enemyObject



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

.franchiseObject



6
7
8
# File 'lib/faker/game.rb', line 6

def franchise
  "#{enemy} #{verb_noun}"
end

.heroObject



26
27
28
# File 'lib/faker/game.rb', line 26

def hero
  %w(Soldier Hero Knight Savior Commander).sample
end

.nameObject



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_franchiseObject



61
62
63
# File 'lib/faker/game.rb', line 61

def name_with_franchise
  "#{creator}'s #{franchise} #{suffix}: #{subtitle}".squish
end

.nounObject



22
23
24
# File 'lib/faker/game.rb', line 22

def noun
  %w(Power War Heart Darkness Soul Lost).sample
end

.prefixObject



42
43
44
# File 'lib/faker/game.rb', line 42

def prefix
  "#{creator}'s #{franchise}"
end

.subtitleObject



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

.suffixObject



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_nounObject



30
31
32
# File 'lib/faker/game.rb', line 30

def verb_noun
  %w(Killer Destroyer Fighter Battler Vanquisher Hunter Commander Collector).sample
end