class Merit
  def self.merits(pdf)
    merits = []
    merits << Merit.new(
      :name          => "Cybernetic Permanence",
      :dot_ratings   => (1..5),
      :prerequisites => "Free Council Status #{1.to_dots} to #{5.to_dots}",
      :adjectives    => "Order",
      :rules_text    => "While any Mage can create some kind of enhanced cybernetic parts for themselves, they are all beyond the realm of belief for most people. They create Dissonance. They count against a willworker's maximum spell count or must be relinquished to avoid this. They can be dispelled in any case. Whatever the case may be, they aren't really a part of the world. They haven't fully overcome the Lie. They're superimposed upon the Fallen World by the Supernal, but they aren't really <i>part</i> of it.\nBy spending a <i>point</i> of Willpower, the Mage can render a spell that creates a cybernetic or similarly transhuman effect Lasting, as long as he is the one who cast that spell. By spending a Willpower <i>dot</i>, he can render another willworker's spell Lasting instead. The spell is no longer a superimposition, but an actual part of the Fallen World.\nThis Merit can only be used on spells whose highest Arcanum dot rating are at or below this Merit. This Merit's dot rating cannot exceed the person's status in the Free Council.",
      :pdf           => pdf
    )

    merits << Merit.new(
      :name          => "Paradox Resistant",
      :dot_ratings   => [1,3,5],
      :prerequisites => "Silver Ladder Status #{1.to_dots}, #{3.to_dots}, or #{5.to_dots}",
      :adjectives    => "Order",
      :rules_text    => "The Silver Ladder scoffs at the idea that you canb reach too far. They've made an ideology out of, in some ways. There is clearly more to their thinking than this, but it's definitely something that comes to the fore quite often. Some of them have honed their skills enough for this thinking to materialize in a way that other Mages just can't compare.\nAt one dot, remove one success from every Paradox roll. At three dots, remove two successes from every Paradox roll. At five dots, remove three successes from every Paradox roll.\nThis Merit's rating cannot exceed the dot rating of a person's Silver Ladder status.",
      :pdf           => pdf
    )

    merits << Merit.new(
      :name          => "Ex Machina",
      :dot_ratings   => 2,
      :prerequisites => "Techne #{2.to_dots}",
      :adjectives    => "Order",
      :rules_text    => "You have poured your heart and soul into your craft, making it a core part of your magical identity and style. As long as you have worked with and on a specific expression of your Art for at least a story, you can use it as an Order Yantra with a value equal to its hlf of its Equipment bonus rounded up. This bonus cannot exceed five. (This Merit was written by Altasaire)",
      :pdf           => pdf
    )

    merits << Merit.new(
      :name          => "Ward of the Forbidden",
      :dot_ratings   => (1..5),
      :prerequisites => "Guardians of the Veil Status #{1.to_dots} to #{5.to_dots}",
      :adjectives    => "Order",
      :rules_text    => "The Guardians always protected Pentacle Mages from the Seers of the Throne, but after their being duped so thoroughly in the 2020's, this has become more of a focus than perhaps is reasonable. This has become one of their core Exoteric properties, and this new focus in no small part is what makes them worth keeping around to the other Pentacle Orders.\nOnce per Chapter, the willworker who has this Merit may bestow the Occultation Merit at a dot rating equal to this Merit's onto another willworker for an amount of time based on his Gnosis.\nOne Gnosis offers the Merit for one day. Two Gnosis offers the Merit for one week. Three Gnosis offers it for a month. Four Gnosis offers it for a full year. Five Gnosis and above offers the Merit for an entire decade.\nIf they already have the Occultation Merit, add the dot rating of Ward of the Forbidden to it instead. Normally, one can only have an Occultation Merit rating at up to three, but this one allows the beneficiary of this to it to go above that.",
      :pdf           => pdf
    )


    merits << Merit.new(
      :name          => "Adamant Hand",
      :dot_ratings   => (1..5),
      :prerequisites => ["Adamantine Arrow Status #{2.to_dots}", "Brawl, Firearms or Weaponry at #{3.to_dots}"],
      :adjectives    => ["Order", "Style", "Replacement / House Rule"],
      :rules_text    => "Your character has studied extensively in the Adamantine Arrow martial arts. This allows her to use combat techniques as Yantras. When taking this Merit, choose Athletics, Weaponry, or Brawl, which your character must have three or more dots in. You may purchase additional skills as two-dot Merits.\n<b>Practical Training (#{1.to_dots}):</b> Your character may use her chosen Skill in combat as a reflexive Yantra, adding dice to a spell cast on subsequent turns.\n<b>Muscle Memory (#{2.to_dots}):</b> Your character may use her chosen skill as a reflexive Yantra on any spell cast reflexively in the same turn as the combat action.\n<b>Specialist Training (#{3.to_dots}):</b> If your character possesses an applicable specialty in their chosen skill, the Yantra bonus it provides increases from +1 to +2.\n<b>Unity (#{4.to_dots}):</b> The Mage’s skill and mystic power become truly one. At this level of proficiency, she may, by spending a point of Willpower and two Reach, reflexively cast spells to enhance an action undertaken with her chosen skill, even if that spell would not normally be reflexive. Effectively, she may lash out with body and magic as one, performing an instant action that combines a mundane attack and a spell action. Normally, the spells that qualify for this enhance the Arrow or harm the target of the mundane attack in some way.\n<b>The Adamant Way (#{5.to_dots}):</b> Internalizing the lessons of the Bladeless Sword, the masters of the Adamantine Hand become deceptively outwardly complacent. By spending a point of both Mana and Willpower before attacking, a master of Adamantine Hand may make any attack (including harmful spells) they want to employ mundanely imperceptible. For the world at large (and more importantly, for the Abyssal shard inside Sleeper onlookers) the harm appears to occur suddenly and without apparent cause, obviating the automatic +2 Paradox dice from Sleeper onlookers. Active Mage Sight and similar powers let one see such an attack normally.",
      :pdf           => pdf
    )

    merits << Merit.new(
      :name          => "Supernal Textbook",
      :dot_ratings   => 3,
      :prerequisites => ["Mysterium Status #{3.to_dots}", "High Speech #{1.to_dots}"],
      :adjectives    => ["Order"],
      :rules_text    => "Mystagogues spend so much time in libraries for a reason: it's because the books contain information that is actually valuable. Once per chapter, if she gained an Arcane Beat through first-hand experience, she can inscribe one of her grimoires, or a similar magical tome, with that experience. Others may read this document and gain the Arcane Beat that the willworker gained; they can only use a Supernal Textbook once per chapter, as the Supernal mind can be boosted by second-handy study, but only at a certain pace.\nWhen a person does use one such Supernal Textbook, they get the full anecdote from the writing in addition to its Arcane Beat, and the possibility of learning the Arcane Beat a second time through first-hand experience is eliminated. If the Storyteller determines that the person reading the Supernal Textbook has already had a comparable experience, they gain no Arcane Beat from it.",
      :pdf           => pdf
    )

    merits << Merit.new(
      :name          => "Thunder",
      :dot_ratings   => 2,
      :prerequisites => ["Adamantine Arrow Status #{2.to_dots}", "Adamant Hand #{1.to_dots}"],
      :adjectives    => ["Order"],
      :rules_text    => "The meditations of the Thunderous Mind gird the novice’s Wisdom against aggravation. The Mage may add her Adamantine Hand dots to any check for Wisdom degeneration resulting from violence inflicted in line of duty, upholding of her Oaths, or ordered by her superiors in the order.\nIn addition, her chosen skill counts as a Dedicated Tool, stacking with any actual dedicated tool she uses.",
      :pdf           => pdf
    )


    merits << Merit.new(
      :name          => "Diamond",
      :dot_ratings   => 2,
      :prerequisites => ["Adamantine Arrow Status #{3.to_dots}", "Adamant Hand #{2.to_dots}"],
      :adjectives    => ["Order"],
      :rules_text    => "Employing the lessons of the Diamond Fist, the initiate gains skill to pierce defences born of mystic understanding.\nThe Mage may subtract her Adamantine Hand score from effective Arcana ratings of Mage Armor she confronts with her mundane attacks. For those Arcana where the effect is not reliant on the numerical value of the Arcanum, this ability instead allows to have an amount of lethal damage equal to the practitioner’s Adamantine Hand dots to pass through undeterred. Applying the same effect to other inherent defensive abilities may be allowed at ST’s discretion.",
      :pdf           => pdf
    )

    merits << Merit.new(
      :name          => "Star",
      :dot_ratings   => 3,
      :prerequisites => ["Adamantine Arrow Status #{4.to_dots}", "Adamant Hand #{3.to_dots}"],
      :adjectives    => ["Order"],
      :rules_text    => "An Adamantine Hand practitioner is inherently lord and master of mortal ways of dealing harm, his enlightened skill impossibly broad.\nBy reflexively spending a point of Mana, the Adamantine Hand journeyman may become able to employ any one maneuver with a dot rating equal or lower to their Adamantine Hand score of any combat style allowed in the chronicle, for the use of which she otherwise qualifies. This effect lasts until the end of the scene.",
      :pdf           => pdf
    )

    merits << Merit.new(
      :name          => "Occultation",
      :dot_ratings   => (1..5),
      :prerequisites => ["No Fame Merit", "No infamy Flaw"],
      :adjectives    => ["Replacement"],
      :rules_text    => "Your character is unnoticeable and inoffensive on a mystical level. Any time a character tries to read your character’s aura, or otherwise use magic to discern bits of truth within her, subtract your Merit dots from their pool. Normally, a mage’s spells carry with them a hint of his Nimbus. This Merit allows a mage to hide that, to metaphysically sweep that under a rug. Your character’s Signature Nimbus is faint, vague, and couched in more symbolism and oblique references than other mages’. When someone attempts to scrutinize her Nimbus to identify her or track her, subtract your Merit dots from their rolls. Add the number of Occultation dots the character has to any Withstand spell that uses sympathy.",
      :drawback      => "If your character ever gains the Fame Merit, or becomes noticed by the public at large, you can lose this Merit.",
      :pdf           => pdf
    )

    merits.sort_by! {|m| m.name }

    merits
  end
end