Combat

## How Combat Works

On pc, if the weapon or spell hitbox of a given attack or spell intersects with the hitbox of an actor, this triggers the universal combat formula to determine if the actor recieves a hit or a glancing blow. For tabletop, it can be assumed that the hitbox connects for all single target attacks made from within range or if the aoe of a spell or attack covers at least half of an actor's 1m occupancy square (at the dm's discretion).

> **The universal combat formula is: (attacker offensive stat) - (defender defensive stat) + (roll d100) - 50**
>
>

If this number is positive, the attack or spell hits. If it is positive and the d100 roll is above the attacker's critical hit threshold, then it scores a critical hit and does double damage (in addition to other critical hit effects that may apply due to feats, items, or damage type).

If this number is zero or negative, the attack or spell is a glancing blow, which does no HP damage but reduces the defender's stamina by a proportional amount. If the number is zero or negative and the d100 roll is above the attacker's critical hit threshold, then the attack or spell hits, but does not score a critical hit. Hits reduce both stamina and health of the defender. Active blocking reduces the amount of stamina damage received (further reduced by Resolve) when struck by a hit or glancing blow, as well as temporarily raising defensive stats to decrease the chance of being hit. Certain items and feats may change the effect of dealing or receiving glancing blows, and certain spells and attacks cannot be defended against at all.

Damage is calculated similarly:

Incoming Damage = (((Base Damage + (attacker damage stat/10))\*outgoing damage modifier)\*incoming damage modifier)-incoming damage reduction

In the case of percentage-based effects that may result in a decimal figure in an attack or defense roll, rounding is always in favor of the defender.

### Staggering

If an attacker scores a hit against a defender with a spell or attack, dealing damage to health, the attacker may also briefly stagger the defender. The length of time a defender is staggered is determined by the weight of the weapon used to hit them, with heavier weapons generally having a greater stagger time. The length of time is reduced by the total damage/stagger reduction (from armor, helmet, gauntlets, and other items and feats) percentage of the defender, with heavier armor generally granting more stagger protection. If a player is staggered, any action they are performing is interrupted and canceled, they cannot move, block, cast spells, or attack for the duration of the stagger, and attacks or spells directed at the player will automatically hit. If the stagger time is reduced to less than 0.25s, it is ignored. If the time is between 0.25s and 0.75s and lands while the defender is performing an attack, the defender's attack will not be interrupted, but when it completes they will still be staggered for the remaining duration. Spells and skills are always interrupted by a stagger. A player may be staggered again while they are already staggered, but the maximum time a player can be staggered is 3s, after which they receive 2s of stagger immunity. Further, if a player is staggered while already staggered, and the total stagger time exceeds 3s, they are knocked down, allowing them to roll to escape further punishment.

Spells, like attacks, also inflict stagger but only if they deal damage "up front" - damage-over-time spells do not stagger. The stagger length of a damaging spell is determined by its level - 0.5\*spell level, with first-level spells staggering for 0.5s, similar to a sword attack, and 6th level spells staggering for a maximum of 3s, like a maul.

Stagger length is calculated similarly to damage upon being staggered or re-staggered:

for(stagger immunity == 0): newstaggerlength=(existingstaggerlength)+(((attackerweaponstaggertime)\*(percentagestaggerreduction))-(flatstaggerreduction))

if (newstaggerlength=>3): newstaggerlength=0, knockdown=1

Figured that's the clearest way to express it.

### Conditions

Many spells and attacks do not just deal damage, but also inflict a variety of negative conditions on their victims. These may run their entire durations, or be cleansed by a variety of spells, skills, or items. The possible conditions are:

* Bleeding - 1% health loss per second for 10 seconds, can stack up to three times
* Blind - Screen goes cloudy, attacks and spells have 90% miss chance for 5 seconds
* Burning - 5% health and stamina loss per second for 6 seconds, roll to extinguish, after 4s, causes a large amount of stagger
* Disarmed - Cannot use weapon attacks for 5 seconds
* Knocked Down - Cannot attack, cast spells or move for 2 seconds but can roll to stand up
* Rooted - Unable to move for 10 seconds, freed if struck
* Silenced - Unable to cast spells for 5 seconds
* Snared - 30% movement speed reduction for 10 seconds, cannot sprint or roll
* Stunned - Unable to move or act, freed if struck
* Terrified - Flee the source of terror for up to 5 seconds, freed if struck
* Wounded - Incoming healing is reduced by 30% for 10 seconds
* Staggered - above

A player may have at most one instance of each of these effects at a time, and application a second time will replace the existing one with a new one. Some spells produce effects that are similar to conditions, producing a negative effect over time, and these may be removed by the same mechanisms that remove conditions, however, spell effects are unique, allowing similar spell effects and conditions to stack. Like conditions, though, an application of the same spell will overwrite an older one. For example, the spells **Illusory Burden** and **Grasping Roots** both produce a movement speed reduction effect, and if they are both present on the same player, that player's movement speed is reduced the total percentage of both spells (20% each for a total of 40%). The player however will only have their movement speed reduced by 20% if **Illusory Burden** is cast twice. To complicate this further, this movement speed reduction effect is separate from the **Snared** condition applied by many melee attacks, which causes 30% movement speed reduction, and either or both spells may stack with this effect, producing a total possible movement speed reduction of -70%. Now that would be a sticky situation indeed.

### Critical Hits

Every player has a base chance to critically hit, determined by the Accuracy stat. On any offensive roll that allows critical hits, a roll above the critical hit threshold (100-(accuracy/10)) will result in a critical hit. Certain feats, spells, skills or attacks may increase or decrease the chance that a critical hit occurs. Critical hits always stagger for their maximum duration, ignoring armor stagger reduction, deal double damage, and depending on damage type, inflict additional effects.

* Piercing - Wounded
* Slashing - Bleeding
* Crushing - Disarmed
* Fire - Burning
* Cold - Rooted
* Electricity - Stunned
* Shadow - Blind
* Light - Silenced
* Arcane damage cannot critically hit

### Stances

Certain trees provide skills that enhance some combat abilities at the expense of others, known as stances. Every player begins the game knowing two basic stances: Offensive Stance and Defensive Stance. Offensive Stance increases your chance to hit with weapon attacks and spells while increasing damage received from all sources by a small amount. Defensive stance decreases the amount that a player is staggered by any attack, but decreases damage output by a small amount. A player may equip two stances and toggle between them by pressing the down button on the gamepad. Stances may be instantly switched at any time as long as the player is not staggered, knocked down, or stunned, and a few special attacks require and lead to certain stances.

## Actions in Combat

### Spells, Skills, and Attacks

During combat, players may perform actions at any time. There are three basic types of actions: spells, skills, and attacks. Spells and skills are accessed by holding the left or right trigger and pressing one of the ABXY buttons corresponding to the desired action. Attacks are executed with the X (horizontal) and Y (vertical) buttons, and all weapons have a weapon art activated by the A button. All players may execute basic horizontal and vertical attacks with any weapon they meet the requirements to wield, but special attacks are unlocked only through spending points in trees. Special attacks are executed by holding the basic attack buttons, inputting a simple combination of vertical and/or horizontal attacks, or inputting a direction while performing a vertical or horizontal attack or combo. Players may also activate special items that they have equipped to their belt or accessory slots, which requires binding that item to a trigger menu slot and activating it as if it were a spell or skill.

### Movement

Players can also move, sprint, dash and roll during combat. The camera will automatically lock on to your nearest target, which can be cycled with the right stick, and lock will be turned off while rolling or sprinting (but not while dashing). Players can move during the windup of an attack, or while inputting a combo, but for spells that have a cast time, players may not move while activating them.efensively

### Blocking

An actor may choose, in lieu of attacking or casting a spell, to actively block for any period of time. While blocking, movement rate is decreased by 50% and melee, spell, projectile, and area defense (Focus, Faith, Reflexes, Perception) are all increased as long as active blocking is maintained, depending on the shield or weapon being used to block with. Further, the stamina damage received on a glancing blow is decreased depending on the actor's Resolve stat, while blocking is active. While blocking stamina is not drained, but normal regeneration is paused. Regeneration from active potion/magic or other effects will continue.

### Parrying

When a player selects active blocking, and raises their shield or weapon to defend themselves, the first 0.15s of their block is capable of triggering a timed block, or **Parry**. Parries may also be triggered by certain abilities, such as the basic sword weapon art **Parry-Riposte**. Parries are also triggered if two players strike at each other in melee and their weapon hitboxes collide without intersecting a body hitbox. When an attack is deliberately parried through timed blocking or a parry-specific skill or attack, the attacker's weapon is deflected or bound, and the defender may execute a riposte, or counterattack. When two weapons collide, the weapon that would deal a longer stagger time will deflect the weapon that would deal a shorter stagger time, usually a larger weapon deflecting a smaller one, with some exceptions due to special attacks or feats. \*\*\*

\*\*\*is it possible to do weapon binds? and possible to encode the "strong" and "weak" of a given weapon - like the area near the crossguard is the strong, and near the point is the weak. two weapons parrying or entering a bind give the advantage to a duelist using their strong against an opponent's weak, so it results in duelists moving towards each other as they bind, and essentially grappling in the second stage of a duel. it's because you have more leverage near your hands, so like a dagger could parry the weak of a greatsword, but the strong of a greatsword will knock anyone down. This could maybe be a duelist tree thing