======Combat Magic====== Battle [[magic]] can only be cast during a tactical battle. These spells have battle effects like inflicting damage, [[combat summons|summoning units]], granting increased [[protection]], reducing [[fatigue]], or some similar effect which only makes sense in the context of the battle mechanics. Battle magic can be scripted into a mage’s list of battle actions using Set battle orders. If a battle spell requires [[gems]], that mage must have those gems in his inventory before the battle begins. Some battle spells affect the whole battlefield and are termed [[battle enchantment]]s. Some of these last the length of the battle. A battle enchantment is dispelled if its caster dies. ===== Combat Magic Workflow ===== When a mage attempts to cast a spell the game goes through a workflow to determine whether the spell is cast. - The game checks if any potential targets are within range. - The mage's current path level is checked to determine if the mage is able to cast the spell at all. - If the spell requires [[gems]], those are spent. If the mage has additional gems those may be spent to help cast the spell. The gems are consumed at the point of casting. - The casting point for the spell is calculated. It is approximately half the total casting time. - If the mage takes damage before the casting point a check is made to determine if the spellcast was interrupted. - The effect of a succesful spellcast is resolved. - [[Fatigue]] is calculated ==== Targets in Range ==== Certain spells have specific requirements to who they can affect. E.g. ??Dust to Dust?? only affects [[undead]] units within range. When attempting to cast a scripted spell, if no available targets are within range the mage will skip casting that spell. When picking a target the mage will generally go for the square with the highest damage potential. This means that units with high [[units-attributes#General Attributes|hit points]] per square and no [[elemental resistance|elemental resistances]] are more likely to be targeted by damage spells than other units. * Note that the AI will regard units with high amounts of elemental resistance as being immune to spells of that damage type, even when they are clearly not. The AI might refuse to cast elemental damage spells if all possible targets have high elemental resistance. ==== Current Path Level ==== When a spell is being cast the current level of the mage determines whether the spell can be cast at all. The current level of the mage is the basic path level of the mage plus any kind of path-boosting effects currently affecting the mage. The path level of a mage can be boosted in a number of ways: * Equipping [[Items]] such as ??Earth Boots?? or a ??Thistle Mace?? that boost one or more paths. * Casting path-boosting spells such as ??Summon Earthpower?? or ??Power of the Sphere??. Note that a ??Crystal Shield?? casts ??Power of the Sphere?? at the beginning of a battle. * Being a master in a [[communion]]. * Using //one// gem to boost current path level by //one//. Note that a mage can never boost paths outside their basic paths. A {{path>F1}} mage cannot equip ??Earth Boots?? to gain {{path>E1}}. ==== Gem Usage ==== If the mage has [[gems]] in their inventory or blood slaves in their vicinity these can be used to fuel their spellcasting. In combat, gems may do one of three things: * Some very powerful spells require gems to cast at all: Specifically, spells require one gem per 100 fatigue they incur. * A mage may use a single gem per turn to increase his level in that path by one. For instance, an {{path>E2}} mage normally cannot cast ??Blade Wind??, but he can if he consumes a single {{gems>1E}}. * A mage may use additional gems to increase his level in that path further, but only for the purposes of reducing the fatigue incurred by spellcasting. For instance, an {{path>E3}} mage who consumes three earth gems counts as an {{path>E6}} mage for the purposes of calculating [[fatigue]], but only an {{path>E4}} mage for determining what spells he can cast. {{template>rulesforgemuse}} //Example:// Consider the Alteration 5 spell ??Maws of the Earth??, which requires an {{path>E3}} caster and {{gems>1E}}. * An {{path>E1}} mage cannot cast this spell at all. * An {{path>E2}} mage can cast it by spending {{gems>2E}}; one to boost to {{path>E3}}, and another for the spell's requirement. * An {{path>E1}} mage who has {{gems>3E}} //can// cast ??Maws of the Earth??. First the mage uses {{gems>1E}} to cast ??Summon Earthpower?? to raise their current level to {{path>E2}}. The mage then spends {{gems>2E}} to cast the spell. {{ :gem:gem_b.png |}}Mages can only use gems from their own inventory. However, blood slaves are special in that **any** blood mage within **8 squares** of a blood slave can use that slave to fuel their magic. ==== Casting Point ==== The casting time detailed as a percentage of a round in the description of a spell is divided into two steps: the first half is spent by the mage preparing to cast the spell, the second half is spent recovering from the casting. The spell itself resolves somewhere in the middle, the **Casting Point**, at approximately half the casting time of the spell. Of note is the fact that a spell does not resolve exactly at half its casting time. Instead, some randomness is involved: a spell will resolves at half its casting time plus or minus up to 15% of a round, linearly distributed ((According to [[:user:loggy:casttime|Loggy's research.]])) This can be mechanically important, such as in the interaction between ??Storm?? and ??Summon Storm Power??. ==== The Casting Point ==== **Casting point:** Casting time / 2 \\ +/- up to 15% of a round //Example:// Let us assume we set up one mage to cast ??Storm?? with his first script slot, and a group of {{path>A2}} mages to cast ??Summon Storm Power?? then ??Thunder Strike??. We get the following result: * Among the {{path>A2}} mages, some will start their second spell right before ??Storm?? is up, i.e. before receiving the air boost, and thus will cast another spell instead as they do not meet the requirement for ??Thunder Strike?? * Others will cast their second spell right after ??Storm?? is up, and thus will be able to cast ??Thunder Strike??. {{ :abilities:innate_spellcaster.png?nolink |}}Some mages are [[innate spellcaster]] (X). These monsters do not require any preparation time for their spells. They also completely ignore the casting times of spells they cast. Instead they cast X amount of spells at the start of each round. Mechanically this means that a mage with [[innate spellcaster|innate spellcaster (1)]] has a 100% casting time for all spells they cast with a casting point of 0%. {{ :abilities:spell_singer.png?nolink |}}A mage with [[spell singer]] adds a **flat 50% of a combat turn** to the casting time for all spells cast. ==== Interrupts ==== During the preparation time mentioned in the previous section, the caster can be interrupted by taking damage. The chance of being interrupted when taking damage while casting a spell is expressed as a percentage of your full hit points caused by the damage, plus 25%. Thus, a strike that inflicted half of a spellcaster’s full hit points in damage would have a 75% chance of interrupting the spell being cast. ==== Interrupt Chance When Taking Damage ==== **Interrupt chance:** ( Damage / Max HP )% + 25% \\ **/ 2** if [[Combat Caster]] or [[Mindless]] {{ :abilities:innate_spellcaster.png?nolink|}}A mage with [[Innate Spellcaster]] cannot be interrupted by damage. They cast spells at the very beginning of a round leaving no time for damage to interrupt the cast. {{:abilities:combat_caster.png?nolink&25|}}{{:abilities:mindless.png?nolink&25|}} A mage with [[Combat Caster]] or [[Mindless]] is half as likely to be interrupted by damage. ==== Spell effect resolution ==== When a spell has been succesfully cast the spell's effect is resolved. Each spell has a [[spell description]] that determines what happens when a spell is cast. ==== Fatigue ==== Just like attacking in combat, casting spells in battle incurs [[fatigue]]. And just like all other units, a mage that reaches **100 fatigue** will pass out. For this reason, fatigue management is very important for spellcasters. It is often the limiting factor in combat, and higher-pathed mages thus have an advantage in that they incur less fatigue. * Each spell has a listed fatigue cost which a caster incurs when casting that spell. For each skill level in the required path that the mage exceeds the minimum, he incurs 1 / (1 + (mage skill – minimum skill) of the listed spell fatigue. * In other words, having an extra skill level means the mage suffers only half fatigue. * Two extra skill levels means he suffers only 1/3 as much. * Three extra is ¼, and so forth. * Spellcasters also incur fatigue equal to their base [[Encumbrance]] value + 2 x Encumbrance value of any armor worn for each spell cast. This is not subject to reduction by skill bonuses. It is harder to make magical gestures in heavy armor. * Finally there is a random component that might increase the fatigue cost of a spell. Various factors may affect this basic calculation: * Fighting in Cold or Heat without Cold or Fire resistance gives a penalty to encumbrance. * Casting in Drain scales adds 10% per scale to the fatigue cost of the spell. Correspondingly Magic scales reduce the fatigue cost by 10% per scale. * Some effects might incur a fatigue penalty to spellcasters. Most notably Fire spells cost double when cast during a ??Rain??. {{template>spellfatigue}} Spells that reduce fatigue, like ??Reinvigoration??, ??Summon Earthpower?? and ??Relief??, can be very useful as a way of getting mages to cast more spells in combat. {{ :abilities:spell_singer.png?nolink |}}A mage with [[spell singer]] halves the basic fatigue cost of all spells cast by the mage. ===== Communions ===== Joining a communion significantly changes spellcasting in different ways. It boosts the path level of communion masters and spreads the fatigue cost between masters and slaves. Please refer to the [[Communions]] page for an in-depth explanation. {{template>magicindex}}