# Rist card catalogue.
#
# One card per line:
#
#   id | Name | flavour text | effect | value-per-rank | bonus effect | bonus value | sigil
#
# "effect" is either the literal name of a public float field on the game's SE_Stats
# class, or one of the specials below. Using the field name directly means any of the
# ~45 modifiers the game already has can be turned into a card by adding a line here -
# no code change, no rebuild.
#
# Specials:
#   *inventoryrow           adds rows to the player inventory grid - UNUSED, see below
#   *stamina:move           run, jump, dodge, swim and sneak all cost less
#   *stamina:fight          attacking and blocking both cost less
#   *attackspeed:melee      swings faster with a weapon
#   *attackspeed:tools      swings faster with a pickaxe, hammer, hoe or cultivator
#   *attackspeed:ranged     a bow reaches full draw sooner, a crossbow reloads sooner, and both fire faster
#   *attackspeed:magic      a staff casts faster
#   *damage:ranged          more damage from bows and crossbows only
#   *unbroken               a hit cannot stagger you out of a cast before it fires (value 1)
#   *answer                 a perfect dodge makes your next hit within 4 seconds stronger
#   *answer:stagger         chance that answering blow staggers what a parry would (0.30 is 30%)
#   *lowdraw                seconds of a bow draw from a crouch that still count as sneaking
#   *lowdraw:silent         arrows loosed from a crouch make no noise where they land (value 1)
#   *sneakattack            multiplies a weapon's own sneak attack bonus
#   *sneakattack:stagger    a sneak attack on an unalerted creature staggers it (value 1)
#   *mead:duration          buff meads last longer (every mead that does not restore health, stamina or eitr)
#   *mead:fullcask          chance a buff mead is not used up when drunk (0.25 is 25%)
#   *power:cooldown         the forsaken power's cooldown, negative is shorter
#   *power:duration         seconds added to the forsaken power for everyone it reaches, when you cast it
#   *exploreradius          the map uncovers further as you walk
#   *windcone               sail closer to the wind before the sail dies
#   *rowspeed               rows faster, forward and back
#
# Rank 5 is meant to be the moment, so a capstone should be an unlock rather than a larger
# number wherever the game gives us one: a row of inventory, immunity to falling, levels in
# every skill, a stagger. Several do that now. Nothing anywhere carries a drawback, on purpose - a
# choice you regret is a choice that stops you playing.
#
# NO CARD GRANTS AN INVENTORY ROW ANY MORE, and *inventoryrow is left in the code rather
# than removed so an older catalogue still loads. Rist gave rows because vanilla gave none;
# Valheim 1.0 sells them from the trader, so the mod was answering a question the game has
# since answered itself. Two capstones used to hand one out on top of everything a player
# could buy, and the result was an inventory nobody had to think about.
#
# The older argument still holds and is kept here because it is the reason not to bring the
# row back as a card of its own: as its own card it was the strongest pick in the catalogue
# and taken first every time, which is not a choice.
#
# MOVE SPEED IS CAPPED AT 10% AND COMES FROM ONE CARD ONLY. Long stride is the only source;
# Tireless used to add 8% on top, and the two together reached 23%. Speed is the one stat a
# player carries out of this world: it is always on, never noticed while you have it, and its
# absence is what gets felt - a player told us Rist had made his other, unmodded playthroughs
# feel broken. Every other card here is felt in the moment it matters. Do not add a second
# source, and note that m_windMovementModifier multiplies speed too, so a wind card would sit
# on top of this cap rather than inside it.
#
# THICK-HIDED IS A PERCENTAGE, NOT FLAT ARMOUR, and the game's own damage curve is why.
# A hit that is at least half your armour lands for dmg * dmg / (4 * armour), so damage taken
# is inversely proportional to armour and a percentage is worth exactly the same at every
# tier. The old +2 a rank was +10 at rank 5: a third of a hit gone at 20 armour, under a tenth
# of it at 100, which is a card that stops mattering in the Plains. Rattennest said so on the
# ideas board and the formula agrees with him.
#
# NOTHING GRANTS FLAT ARMOUR ANY MORE. Steady footing's capstone went the same way, +5% rather
# than +2, which keeps the two stones mirrors of each other: Steady footing's capstone has
# always been a dose of whatever Thick-hided does per rank. The case flat armour was kept for is
# the other branch of the curve, a hit bigger than twice your armour, where the game subtracts
# rather than divides - and there +2 saves exactly 2 damage while +5% saves 5% of your armour,
# so the flat number only wins below 40 armour. That is leather and troll hide, and it is a
# small loss taken on purpose to stop a stat that scales being sold as a number that does not.
# m_addArmor is unused now and stays supported; a card line is all it would take to bring back.
#
# Value is per rank and accumulates: rank 3 of a 15-per-rank card gives 45.
# Cards stop being offered once they reach MaxRank in the config.
#
# The last field is the SIGIL: the rune cut into the middle of this rist's stone in the
# rists panel. Optional; a card without one falls back to the first letter of its id.
#
# Written as a Latin letter, not as a runic Unicode character. The game font called "rune"
# is a Latin-mapped decorative face - type F, get the rune - and runic code points come out
# of it as empty boxes. Confirmed the hard way, on a screen of twenty-five tofu squares.
#
# The two fields before it are the CAPSTONE and are optional. A card that names one grants it
# once per BonusEvery ranks - at the default MaxRank 5 and BonusEvery 5, that is once, on
# the final upgrade. A capstone can name anything an effect can, including a special.
#
# Sign conventions differ between fields and are the game's, not ours. The stamina-use
# modifiers are fractions where negative means cheaper, so -0.05 is a 5% discount per
# rank. Read a value out loud before adding it.
#
# STEALTH IS NEGATIVE TOO. m_stealthModifier scales how far away a creature sees you while
# you crouch, so -0.08 is 8% harder to spot. Soft step and Quiet wake's capstone shipped
# positive, which made a sneaking player easier to find. Rist warns at load now if a field
# where lower is better is given a positive value.
#
# RUNNING IS m_runStaminaDrainModifier. m_runStaminaUseModifier looks like the right name
# beside the other *StaminaUseModifier fields and the game never reads it; Long wind and Long
# stride's capstones named it and did nothing. Rist warns at load if a card names it.
#
# Four fields count from 1 rather than 0 and the code adds that 1 for you - the three
# regen multipliers and m_damageModifier. Write the plain fraction here.

# ÆTTIR. A line reading "== Name" starts an ætt, and every card below it stands in that ætt
# until the next one. The panel draws each ætt as a tower two stones wide and up to four tall under
# its name, towers side by side, so a new theme adds a tower to the right and never a row -
# which is what a short, wide screen has room for. Eight is the cap, the way the futhark is
# cut into ættir of eight: a ninth card under one heading stands as a second tower of the
# same name and Rist warns about it. Split the heading instead.
#
# Order and headings are layout only. A card's id is still its only identity, so moving a line
# between ættir never touches anyone's ranks. It does change this file, and the file is part
# of what Core's gate compares, so client and server need the same copy.

# Valheim has no attack-speed stat: SE_Stats carries no such field and SEMan has no
# ModifyAttackSpeed among its hooks, because swing speed comes off the animator. These
# three ride a patch on Attack.Start instead - see AttackSpeed.cs - and are split by what
# is in your hands, so a card that helps you fight does not also help you mine.
#
# The axe counts as a tool, so Sure hand speeds both chopping and axe combat - it is one
# item with one animation and had to be one card or the other. A staff is ElementalMagic or
# BloodMagic, and Quick chant is its card.
#
# Quick draw on a bow is a second patch, because the animator is not what a draw waits on.
# Humanoid.GetAttackDrawPercentage divides a timer counted in fixed updates by the bow's draw
# duration, and no animation speed touches that timer, so the Attack.Start patch alone only
# ever sped up the release. The draw is scaled where that percentage is read, which moves
# damage, spread, arrow speed, the reticle and the bow's bend together.
#
# The same card reloads a crossbow sooner, because a bow's draw and a crossbow's reload are
# the same wait to the person holding the weapon; Windlass was designed as its own card and
# folded in here. Its capstone is damage from bows and crossbows only. It used to be
# m_damageModifier, which Rist applies to every skill, so it was a second Keen edge.
#
# Quick chant's burst staffs have their burst clock sped with the animation, or a faster cast
# ends before its last projectiles fire. A looping staff that pays eitr once per hold is left
# at vanilla speed, since a faster loop there is free projectiles rather than a faster cast.
#
# Sure hand is not here: it speeds tools as well as the axe in a fight, and stands under
# Utility with the other work done along the way.

== Combat

steadyarm   | Steady arm     | Nothing you swing costs what it did.| *stamina:fight         | -0.05 | m_timedBlockBonus         | 0.20 | P
keenhand    | Keen hand      | The swing comes back sooner.      | *attackspeed:melee       | 0.03  | m_damageModifier          | 0.05 | Z
keenedge    | Keen edge      | The blow goes deeper.             | m_damageModifier         | 0.03  | m_attackStaminaUseModifier| -0.08 | K
turnedblade | Turned blade   | The parry answers back.           | m_timedBlockBonus        | 0.08  | m_blockStaminaUseModifier | -0.08 | X
quickdraw   | Quick draw     | The string is back before you are.| *attackspeed:ranged      | 0.03  | *damage:ranged            | 0.05 | Y
quickchant  | Quick chant    | The chant is done before the staff is raised.| *attackspeed:magic | 0.03 | *unbroken          | 1    | T

# Answering blow is armed by the game's own perfect-dodge check and spent on the next enemy
# you hit, applied to that one hit rather than as a damage field, so a sweep cannot carry it
# to every target. The capstone is a 30% chance to stagger, only what a parry would, never a boss.
answeringblow | Answering blow | Slip the blow, then make them pay for it. | *answer | 0.10 | *answer:stagger | 0.30 | C

# What keeps you alive through a hit or a fall.

== Survival

thickhide   | Thick-hided    | Blows land shallower.             | m_armorMultiplier        | 0.03  | m_armorMultiplier         | 0.05 | H
steadyfoot  | Steady footing | Harder to knock out of stance.    | m_staggerModifier        | -0.06 | m_armorMultiplier         | 0.05 | E
swiftmend   | Swift-mending  | Flesh knits without asking.       | m_healthRegenMultiplier  | 0.08  | m_addArmor                | 2 | D
surefooted  | Sure-footed    | You have fallen further than this.| m_fallDamageModifier     | -0.10 | m_fallDamageModifier      | -0.50 | S

# How long you can keep going, and how much you carry while you do.

== Endurance

oxback      | Ox-backed      | The load sits easy on you.        | m_addMaxCarryWeight      | 30    | m_staggerModifier         | -0.15 | U
tireless    | Tireless       | The day does not wear on you.     | *stamina:move            | -0.05 | m_runStaminaDrainModifier | -0.15 | A
longwind    | Long wind      | Breath comes back quicker.        | m_staminaRegenMultiplier | 0.08  | m_runStaminaDrainModifier | -0.05 | L
brimming    | Brimming       | It returns before you need it.    | m_eitrRegenMultiplier    | 0.08  | m_eitrRegenMultiplier     | 0.10 | Q

# A buff mead is decided from the item, not a name list: a consumable, not food, an SE_Stats
# effect, restoring nothing. In vanilla that is fifteen: Fire Resistance Barley Wine, Frost and
# Poison Resistance Mead, Berserkir Mead, Mead of Troll Endurance, Draught of Vananidir, Brew of
# Animal Whispers, Tasty Mead, Anti-Sting Concoction, Love Potion, the Lingering Healing, Stamina
# and Eitr Meads, Tonic of Ratatosk and Lightfoot Mead. The Minor, Medium and Major healing,
# stamina and eitr meads restore, and are left alone. Tonic of Ratatosk lasting longer is a mead's
# own speed, not a card's, so the move speed cap above does not cover it - Robbin's call.
deepdraught | Deep draught   | A long pull lasts a long way.     | *mead:duration           | 0.10  | *mead:fullcask            | 0.25 | V

# Stealth is negative on purpose; see the sign conventions above.

== Stealth

# The game stands you up to draw a bow, and stealth only counts a crouch it can see, so a
# drawn bow used to give you away whatever your Sneak. Low draw tells the stealth update you
# are still crouched while you draw from a crouch toggle, and through the shot that ends a
# qualifying draw; the character still rises on screen. Its capstone silences where the arrow
# lands, which is what alerts the animals around a miss.
# Unseen blow raises a weapon's own sneak attack bonus before the hit leaves, so it only ever
# helps a weapon that has one.
lowdraw     | Low draw       | The deer never hears the string.  | *lowdraw                 | 1     | *lowdraw:silent           | 1 | G
unseenblow  | Unseen blow    | The first cut lands before they know.| *sneakattack          | 0.10  | *sneakattack:stagger      | 1 | B
softstep    | Soft step      | The woods do not notice you.      | m_stealthModifier        | -0.08 | m_noiseModifier           | -0.10 | I
quietwake   | Quiet wake     | You leave less behind you.        | m_noiseModifier          | -0.08 | m_stealthModifier         | -0.10 | N

# Two cards that widen what the world gives back rather than what you do to it, and neither
# can follow you out of this world the way move speed did. Far sight is felt only on ground
# you have not walked; Weatherly only at sea.
#
# Far sight multiplies Minimap.m_exploreRadius, which is 100 in vanilla - so rank 5 is 125.
#
# Weatherly is the sailing model, which is seven lines in Ship.GetWindAngleFactor: sailing
# across the wind gives 1.0, dead up or downwind gives 0.7, and a hard cone from dot 0.75 to
# 0.8 takes it to nothing. That cone is the only reason tacking exists. The card narrows it,
# scaling both edges 6% a rank closer to dead upwind, and bends the sail's push toward the bow
# by the same amount inside the arc it opens. The bend is not decoration: vanilla aims the force
# along windDir + forward, which goes sideways near the wind, so narrowing alone unlocked
# headings that were all slower to windward than vanilla's own best, and nobody could feel it.
# At rank 5 the best windward heading moves from 52 degrees off the wind to about 36, roughly
# 71% faster upwind. Dead upwind stays fully dead at every rank, so tacking survives.
#
# The capstone rows faster, not sails faster. Rowing is a separate force from the sail
# (m_backwardForce, used only at Slow and Back), and it is what you are left doing when you
# still cannot point high enough. It used to be a tacking bonus on the sail, which only made
# the card's own job more so; rowing answers the same annoyance from the other end.

== Utility

longstride  | Long stride    | Ground passes under you.          | m_speedModifier          | 0.02  | m_runStaminaDrainModifier | -0.06 | R
farsight    | Far sight      | The land gives up its shape.      | *exploreradius           | 0.05  | *exploreradius            | 0.10 | F
tideborne   | Tide-borne     | The water gives way.              | m_swimSpeedModifier      | 0.06  | m_swimStaminaUseModifier  | -0.10 | O
weatherly   | Weatherly      | She points nearer the wind.       | *windcone                | 0.06  | *rowspeed                 | 0.20 | W
surehand    | Sure hand      | Axe and pick bite without waiting.| *attackspeed:tools       | 0.03  | m_staminaRegenMultiplier  | 0.12 | J
quickstudy  | Quick study    | Lessons stick the first time.     | m_raiseSkillModifier     | 0.05  | m_skillLevelModifier      | 2 | M

# The forsaken power. The cooldown cut applies when you cast, and has a floor of half. The
# extra minute goes to everyone the power reaches when the carver casts it, and to nobody when
# someone without it casts. Every power, Moder's +10% move speed included. All 26
# Latin sigils are spoken for at this card, so it shares H with Thick-hided, in another tower.
oathbound   | Oath-bound     | The old ones answer sooner.       | *power:cooldown          | -0.05 | *power:duration           | 60 | H
