A book for a Mage: the Awakened game set in a cyberpunk dystopia.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
3.4KB

  1. class Spell
  2. def self.spells(pdf)
  3. spells = []
  4. spells << Spell.new(
  5. :name => "Add Contact",
  6. :forces => 1,
  7. :practice => "Compelling",
  8. :primary_factor => "Duration",
  9. :withstand => "Resolve",
  10. :suggested_rote_skills => ["Computer", "Politics", "Socialize"],
  11. :authors => ["NEETzsche"],
  12. :rules_text => "With this spell, the willworker can add someone to their contacts list without having to pay up for it, or have mundane computer knowledge. For the Duration of the spell, the two people may communicate as though they were on each other's contact lists.",
  13. :reaches => [
  14. [2, "The effect is Lasting."]
  15. ],
  16. :pdf => pdf
  17. )
  18. spells << Spell.new(
  19. :name => "Control Computer",
  20. :forces => 2,
  21. :practice => "Ruling",
  22. :primary_factor => "Duration",
  23. :suggested_rote_skills => ["Computer", "Crafts", "Science"],
  24. :authors => ["NEETzsche"],
  25. :rules_text => "With this spell, the willworker can control a computer or other similar digital device. He can make it do anything the device can normally do, like run or install existing apps, visit websites, or share its GPS location data. The spell cannot, however, make the device do something more sophisticated than it normally could. The willworker must know specifically what the device should do unconditionally upon casting, and cannot change her mind on its effects on-the-fly.",
  26. :adds => [
  27. {:arcana => { :fate => 2 }, :effect => "When Reaching as above, willworker can implant software with outright subjective parameters."},
  28. ],
  29. :reaches => [
  30. [1, "The willworker can implant custom software into the device, either software he has written personally beforehand or software that he envisions in his mind. The software must be computable and must not require more system resources than the device can process. For example, he could implant a program that decrypts the owner's passwords and sends them off to some third party source because that requires minimal system resources, but he could not implant a program that instantly mines the next BitCoin, because someone's smartphone likely lacks the required processing power to do this. He also could not implant software that uses conditionals that are outright subjective, like separating someone's \"shitposts\" from their \"effortposts\" and putting them in separate folders."]
  31. ],
  32. :pdf => pdf
  33. )
  34. # TESTS
  35. duplicate_spells = spells.group_by(&:name).select {| k, v| v.length > 1 }
  36. raise "Duplicate spells (on name) detected: #{duplicate_spells.collect{ |k,v| k}.to_list}" if duplicate_spells.length > 0
  37. unpunctuated_spells = spells.select { |spell| spell.rules_text.unpunctuated? || spell.reaches.collect{|reach| reach[1]}.any?(&:unpunctuated?) || spell.adds.any? { |add| add[:effect].unpunctuated? } }
  38. raise "The following spells lack punctuation: #{unpunctuated_spells.collect(&:name).to_list}" if unpunctuated_spells.length > 0
  39. spells
  40. end
  41. end