|
@@ -6,8 +6,11 @@
|
|
|
{
|
|
|
"spellName":
|
|
|
{
|
|
|
- // Mandatory. Spell type
|
|
|
// Allowed values: "adventure", "combat", "ability"
|
|
|
+ // adventure spells can only be cast by hero on adventure map
|
|
|
+ // combat spells can be cast by hero or by creatures during combat
|
|
|
+ // ability-type spells can not be rolled in town mage guild
|
|
|
+ // learned by hero and can only be used by creatures
|
|
|
"type": "adventure",
|
|
|
|
|
|
// Mandatory. Spell target type
|
|
@@ -20,16 +23,17 @@
|
|
|
// Localizable name of this spell
|
|
|
"name": "Localizable name",
|
|
|
|
|
|
- // Mandatory. List of spell schools this spell belongs to
|
|
|
+ // List of spell schools this spell belongs to. Require for spells other than abilities
|
|
|
"school": {"air":true, "earth":true, "fire":true, "water":true},
|
|
|
|
|
|
- // Mandatory. Spell level, value in range 1-5, or 0 for abilities
|
|
|
+ // Spell level, value in range 1-5, or 0 for abilities
|
|
|
"level": 1,
|
|
|
|
|
|
- // Mandatory. Base power of the spell
|
|
|
+ // Base power of the spell. To see how it affects spell,
|
|
|
+ // see description of corresponding battle effect(s)
|
|
|
"power": 10,
|
|
|
|
|
|
- // Mandatory. Default chance for this spell to appear in Mage Guilds
|
|
|
+ // Default chance for this spell to appear in Mage Guilds
|
|
|
// Used only if chance for a faction is not set in gainChance field
|
|
|
"defaultGainChance": 0,
|
|
|
|
|
@@ -43,20 +47,23 @@
|
|
|
"animation":{<Animation format>},
|
|
|
|
|
|
// List of spells that will be countered by this spell
|
|
|
+ // If unit is affected by any spells from this list,
|
|
|
+ // then casting this spell will remove effect of countered spell
|
|
|
"counters": {
|
|
|
"spellID" : true,
|
|
|
...
|
|
|
},
|
|
|
|
|
|
- //Mandatory. List of flags that describe this spell
|
|
|
- // positive - this spell is positive to target (buff)
|
|
|
- // negative - this spell is negative to target (debuff)
|
|
|
+ // List of flags that describe this spell
|
|
|
+ // positive - this spell is positive to target (buff) and can target allies
|
|
|
+ // negative - this spell is negative to target (debuff) and can target enemies
|
|
|
// indifferent - spell is neither positive, nor negative
|
|
|
- // damage - spell does damage (direct or indirect)
|
|
|
- // offensive - direct damage (implicitly sets damage and negative)
|
|
|
- // rising - rising spell (implicitly sets positive)
|
|
|
- // special - this spell is normally unavailable and can only be received explicitly, e.g. from bonus SPELL
|
|
|
- // nonMagical - this spell is not affected by Sorcery or magic resistance. School resistances apply.
|
|
|
+ // damage - spell does damage (direct or indirect).
|
|
|
+ // If set, AI will avoid obstacles with such effect, and spellbook popup will also list damage of the spell
|
|
|
+ // offensive - (Deprecated?) direct damage (implicitly sets damage and negative)
|
|
|
+ // rising - (Deprecated?) rising spell (implicitly sets positive)
|
|
|
+ // special - this spell can not be present in mage guild, or leared by hero, and can only be received explicitly, e.g. from bonus SPELL
|
|
|
+ // nonMagical - this spell is not affected by Sorcery or magic resistance. School resistances (if any) apply.
|
|
|
"flags" : {
|
|
|
"positive": true,
|
|
|
},
|
|
@@ -195,36 +202,40 @@ TODO
|
|
|
```json
|
|
|
|
|
|
{
|
|
|
- //Mandatory, localizable description. Use {xxx} for formatting
|
|
|
+ //Localizable description. Use {xxx} for formatting
|
|
|
"description": "",
|
|
|
|
|
|
- //Mandatory, cost in mana points
|
|
|
+ //Cost in mana points
|
|
|
"cost": 1,
|
|
|
|
|
|
- //Mandatory, number
|
|
|
+ // Base power of the spell. To see how it affects spell,
|
|
|
+ // see description of corresponding battle effect(s)
|
|
|
"power": 10,
|
|
|
|
|
|
- //Mandatory, number
|
|
|
- "aiValue": 20,
|
|
|
-
|
|
|
//Mandatory, flags structure //TODO
|
|
|
// modifiers make sense for creature target
|
|
|
"targetModifier":
|
|
|
{
|
|
|
- "smart": false, //true: friendly/hostile based on positiveness; false: all targets
|
|
|
- "clearTarget": false,
|
|
|
+ // If true, then this spell will not affect units if:
|
|
|
+ // - target is friendly and spell is negative
|
|
|
+ // - target is enemy, and spell is positive
|
|
|
+ // Othervice, all units in affected area will be hit by a spell, provided they are not immune
|
|
|
+ "smart": false,
|
|
|
+ // LOCATION target only. All affected hexes must be empty with no obstacles or units on them
|
|
|
"clearAffected": false,
|
|
|
},
|
|
|
|
|
|
- //Mandatory
|
|
|
- //spell range description in SRSL
|
|
|
- // range "X" + smart modifier = enchanter casting, expert massive spells
|
|
|
- // range "X" + no smart modifier = armageddon, death ripple, destroy undead
|
|
|
-
|
|
|
+ // spell range description. Only for combat spells
|
|
|
+ // Describes distances from spell cast point that will be affected.
|
|
|
+ // For example, "range" : "0" will only affect hex on which this spell was cast (e.g. Magic Arrow)
|
|
|
+ // "range" : "0,1" will affect hex on which spell was cast, as well as all hexes around it (e.g. Fireball)
|
|
|
+ // "range" : "1" will only affect hexes around target, without affecting target itself (Frost Ring)
|
|
|
+ // "range" : "0,1,2," or "range" : "0-2" will affect all tiles 0,1 and 2 hexes away from the target (Inferno)
|
|
|
+ // Special case: range "X" implies massive spells that affect all units (armageddon, death ripple, destroy undead)
|
|
|
"range": "X",
|
|
|
|
|
|
- //DEPRECATED, Optional, arbitrary name - bonus format map
|
|
|
- //timed effects, overriding by name
|
|
|
+ // DEPRECATED, please use "battleEffects" with timed effect instead
|
|
|
+ // List of bonuses that will affect targets for duration of the spell
|
|
|
"effects":
|
|
|
{
|
|
|
"firstEffect": {[bonus format]},
|
|
@@ -233,162 +244,413 @@ TODO
|
|
|
|
|
|
|
|
|
},
|
|
|
- //DEPRECATED, cumulative effects that stack while active
|
|
|
+
|
|
|
+ // DEPRECATED, please use "battleEffects" with timed effect and "cumulative" set to true instead
|
|
|
+ // List of bonuses that will affect targets for duration of the spell. Casting spell repeatetly will cumulate effect (Disrupting Ray)
|
|
|
"cumulativeEffects":
|
|
|
{
|
|
|
"firstCumulativeEffect": {[bonus format]}
|
|
|
//...
|
|
|
-
|
|
|
},
|
|
|
+
|
|
|
+ /// See Configurable battle effects section below for detailed description
|
|
|
"battleEffects":
|
|
|
{
|
|
|
"mod:firstEffect": {[effect format]},
|
|
|
"mod:secondEffect": {[effect format]}
|
|
|
//...
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-## Configurable battle effects
|
|
|
+## Spell power
|
|
|
|
|
|
-**If spell have at least one special effect it become configurable spell and spell configuration processed different way**
|
|
|
+Most of battle effects are scaled based on spell effect value. This value is same across all effects and calculated as:
|
|
|
|
|
|
-### Configurable spell
|
|
|
+```text
|
|
|
+caster spell power * base spell power + spell mastery power(caster spell school)
|
|
|
+```
|
|
|
|
|
|
-Configurable spells ignore *offensive* flag, *effects* and *cumulativeEffects*. For backward compatibility *offensive* flag define Damage effect, *effects* and *cumulativeEffects* define Timed effect.
|
|
|
+Where:
|
|
|
|
|
|
-### Special effect common format
|
|
|
+- `caster spell school` is assumed spell school level for the spell. For unit this is value of [SPELLCASTER](../bonus/Bonus_Types.md#spellcaster) bonus. For hero this is value of [MAGIC_SCHOOL_SKILL](../bonus/Bonus_Types.md#magic_school_skill) or [SPELL](../bonus/Bonus_Types.md#spell) bonus, whichever is greater
|
|
|
+- `spell mastery power` is `power` parameter defined in config of corresponding mastery level of the spell
|
|
|
+- `base spell power` is `power` parameter, as defined in config of spell itself
|
|
|
+- `caster spell power` is spellpower of the hero, or [CREATURE_SPELL_POWER](../bonus/Bonus_Types.md#creature_spell_power) bonus for units
|
|
|
|
|
|
-TODO
|
|
|
+If unit has [SPECIFIC_SPELL_POWER](../bonus/Bonus_Types.md#specific_spell_power) bonus for corresponding spell, game will use value of the bonus instead
|
|
|
+
|
|
|
+Power of `damage`, `heal`, `summon`, and `demonSummon` effects cast by hero can also be affected by following bonuses:
|
|
|
+
|
|
|
+- [SPECIAL_SPELL_LEV](../bonus/Bonus_Types.md#special_spell_lev) bonus for the spell, scaled down by target level (Solmyr / Deemer)
|
|
|
+
|
|
|
+Following bonuses will only affect `damage`, `heal` and `demonSummon` effects
|
|
|
+
|
|
|
+- [SPELL_DAMAGE](../bonus/Bonus_Types.md#spell_damage) for specific spell school (Sorcery)
|
|
|
+- [SPECIFIC_SPELL_DAMAGE](../bonus/Bonus_Types.md#specific_spell_damage) for the spell (Luna / Ciele)
|
|
|
+
|
|
|
+## Smart target modifier
|
|
|
+
|
|
|
+To restrict spell from casting it on "wrong" side in combat, you can use `smart` target modifier. If this flag is set, and spell has `positive` flag, it can only affect friendly units. Similarly, spells with `negative` flag and `smart` target modifier can only affect enemies. This affects both primary targets and any secondary targets in case of area of effect or massive spells.
|
|
|
+
|
|
|
+## Configurable battle effects
|
|
|
+
|
|
|
+### Common format
|
|
|
|
|
|
```json
|
|
|
|
|
|
-"mod:effectId":{
|
|
|
+"firstSpellEffect":{
|
|
|
+ // identifier of effect type. See type-specific documentation below for possible values
|
|
|
+ "type":"core:effectType",
|
|
|
|
|
|
-"type":"mod:effectType", //identifier of effect type
|
|
|
-"indirect": false, // effect will be deferred (f.e. land mine damage)
|
|
|
-"optional": false // you can cast spell even if this effect in not applicable
|
|
|
+ // effect will be deferred (f.e. land mine damage) TODO: clarify. Only dispell uses this flag!
|
|
|
+ "indirect": false,
|
|
|
+
|
|
|
+ // spell can be cast even if this effect in not applicable, for example due to immunity
|
|
|
+ // Can be used for secondary effects, to allow casting spell if only main effect is applicable
|
|
|
+ "optional": false
|
|
|
|
|
|
-//for unit target effects
|
|
|
-"ignoreImmunity" : false,
|
|
|
-"chainFactor" : 0.5,
|
|
|
-"chainLength" : 4
|
|
|
+ /// following fields are only applicable to effects that are cast on units (and not locations or summon)
|
|
|
+
|
|
|
+ /// Ignore immunity unless unit has SPELL_IMMUNITY bonus for this spell with addInfo set to 1
|
|
|
+ "ignoreImmunity" : false,
|
|
|
|
|
|
-//other fields depending on type
|
|
|
+ /// Specifies number of additional targets to hit in chain, similar to Chain Lightning
|
|
|
+ "chainLength" : 4
|
|
|
+
|
|
|
+ // Only applicable for damage spells and only if chain length is non-zero.
|
|
|
+ // Multiplier for damage for each chained target
|
|
|
+ "chainFactor" : 0.5,
|
|
|
}
|
|
|
```
|
|
|
|
|
|
### Catapult
|
|
|
|
|
|
-TODO
|
|
|
+This spell can only be used when attacking a town with existing, non-destroyed walls. Can be also cast by defender, unless spell uses "smart" targeting
|
|
|
+
|
|
|
+Casting the spell on location with wall will deal 0-2 damage to the walls or towers, depending on spell configuration.
|
|
|
+
|
|
|
+Casting the spell with "massive" target will randomly pick selected number of target using logic similar to H3
|
|
|
|
|
|
```json
|
|
|
|
|
|
-"mod:effectId":{
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:catapult"
|
|
|
+
|
|
|
+ // How many targets will be attacked by the spell
|
|
|
+ "targetsToAttack": 1,
|
|
|
+
|
|
|
+ // If it is a targeted spell, probability to hit keep
|
|
|
+ "chanceToHitKeep" : 5,
|
|
|
|
|
|
-"type": "core:catapult"
|
|
|
- "targetsToAttack": 1, //How many targets will be attacked by this
|
|
|
- "chanceToHitKeep" : 5, //If it is a targeted spell, chances to hit keep
|
|
|
- "chanceToHitGate" : 25, //If it is a targeted spell, chances to hit gate
|
|
|
- "chanceToHitTower" : 10, //If it is a targeted spell, chances to hit tower
|
|
|
- "chanceToHitWall" : 50, //If it is a targeted spell, chances to hit wall
|
|
|
- "chanceToNormalHit" : 60, //Chance to have 1 damage to wall, used for both targeted and massive
|
|
|
- "chanceToCrit" : 30 //Chance to have 2 damage to wall, used for both targeted and massive
|
|
|
+ // If it is a targeted spell, probability to hit gate
|
|
|
+ "chanceToHitGate" : 25,
|
|
|
+
|
|
|
+ // If it is a targeted spell, probability to hit tower
|
|
|
+ "chanceToHitTower" : 10,
|
|
|
+
|
|
|
+ // If it is a targeted spell, probability to hit wall
|
|
|
+ "chanceToHitWall" : 50,
|
|
|
+
|
|
|
+ // probability to deal 1 damage to wall, used for both targeted and massive
|
|
|
+ "chanceToNormalHit" : 60,
|
|
|
+
|
|
|
+ // probability to deal 2 damage to wall, used for both targeted and massive
|
|
|
+ // chance to miss is defined implicitly, as remainer of 100% chance of normal and critical hits
|
|
|
+ "chanceToCrit" : 30
|
|
|
}
|
|
|
```
|
|
|
|
|
|
### Clone
|
|
|
|
|
|
-TODO
|
|
|
+Configurable version of Clone spell. Casting the spell will create clone of targeted unit that belongs to side of spell caster.
|
|
|
|
|
|
-Configurable version of Clone spell.
|
|
|
+```json
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:clone"
|
|
|
+
|
|
|
+ // Maximal tier of unit on which this spell can be cast
|
|
|
+ "maxTier" : 3
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+### Damage
|
|
|
+
|
|
|
+Deals specified damage to all affected targets based on spell effect value:
|
|
|
+
|
|
|
+- if `killByPercentage` is set, spell will deal damage equal to unit total health * [spell effect power](#spell-power) / 100
|
|
|
+- if `killByCount` is set, spell will deal damage equal to single creature health * [spell effect power](#spell-power)
|
|
|
+- if neither flag is set, spell will deal damage equal to [spell effect power](#spell-power)
|
|
|
+
|
|
|
+If spell has chain effect, damage dealt to chained target will be multiplied by specified `chainFactor`
|
|
|
+
|
|
|
+Target with [SPELL_DAMAGE_REDUCTION](../bonus/Bonus_Types.md#spell_damage_reduction) bonus with value greater than 100% for any of spell school of the spell are immune to this effect
|
|
|
|
|
|
```json
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:damage",
|
|
|
+ "killByCount": false,
|
|
|
+ "killByPercentage" : false,
|
|
|
+}
|
|
|
+```
|
|
|
|
|
|
-"mod:effectId":{
|
|
|
+### Dispel
|
|
|
|
|
|
-"type": "core:clone"
|
|
|
+Dispells all bonuses provided by any other spells from this unit. Following spells can not be dispelled
|
|
|
|
|
|
-"maxTier" : 3//unit tier
|
|
|
+- Disrupting ray
|
|
|
+- Acid Breath
|
|
|
+- any effects from adventure spells
|
|
|
+- any effects that comes from this spell, including effects from previous casts of the spell
|
|
|
+
|
|
|
+Only bonuses from spells with specified positiveness(es) will be dispelled. See configuration example.
|
|
|
+
|
|
|
+```json
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:dispel",
|
|
|
+
|
|
|
+ /// if set, spell will dispell other spells with "positive" flag
|
|
|
+ "dispelPositive": false,
|
|
|
+
|
|
|
+ /// if set, spell will dispell other spells with "negative" flag
|
|
|
+ "dispelNegative" : false,
|
|
|
+
|
|
|
+ /// if set, spell will dispell other spells with "indifferent" flag
|
|
|
+ "dispelNeutral" : false,
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-### Damage effect
|
|
|
+### Heal
|
|
|
|
|
|
-TODO
|
|
|
+Effect restores [spell effect power](#spell-power) health points of affected unit. Can only be cast on unit that is not a clone and have lost some health points in the battle.
|
|
|
|
|
|
-If effect is automatic, spell behave like offensive spell (uses power, levelPower etc)
|
|
|
+If parameter `minFullUnits` is non-zero, spell can only be cast if it will at least heal enough health points to fully restore health of specified number of units. For example, a single Archangel can only use Resurrection on units with 100 health points or lower
|
|
|
+
|
|
|
+Spell can be used on dead units, but only if corpse is not blocked by a living unit.
|
|
|
|
|
|
```json
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:heal",
|
|
|
+
|
|
|
+ /// Minimal amount of health points that this spell can restore, based on target creature health
|
|
|
+ "minFullUnits" : 1,
|
|
|
+
|
|
|
+ /// "heal" - only heals the unit, without resurrecting any creatures
|
|
|
+ /// "resurrect" - heals, resurrecting any dead units from stack until running out of power
|
|
|
+ /// "overHeal" - similar to resurrect, however it may also increase unit stack size over its initial size
|
|
|
+ "healLevel" : "heal",
|
|
|
+
|
|
|
+ /// "oneBattle" - any resurrected unit will only stay alive till end of battle
|
|
|
+ /// "permanent" - any resurrected units will stay permanently after the combat
|
|
|
+ "healPower" : "permanent"
|
|
|
+}
|
|
|
+```
|
|
|
|
|
|
-"mod:effectId":{
|
|
|
+### Sacrifice
|
|
|
|
|
|
-"type": "core:damage",
|
|
|
-"killByCount": false, //if true works like Death Stare
|
|
|
-"killByPercentage" : false, //if true works like DESTRUCTION ability
|
|
|
+Sacrifice spell. Allows to destroy first target, while healing the second one. Destroyed unit is completely removed from the game.
|
|
|
|
|
|
-//TODO: options override
|
|
|
+Effect configuration is identical to [Heal effect](#heal).
|
|
|
|
|
|
+```json
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:sacrifice"
|
|
|
+ "minFullUnits" : 1,
|
|
|
+ "healLevel" : "heal",
|
|
|
+ "healPower" : "permanent"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-### Dispel
|
|
|
+### Obstacle
|
|
|
|
|
|
TODO
|
|
|
|
|
|
-### Heal
|
|
|
+```json
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:obstacle"
|
|
|
+
|
|
|
+ "hidden" : false,
|
|
|
+ "passable" : false,
|
|
|
+ "trap" : false,
|
|
|
+ "removeOnTrigger" : false,
|
|
|
+ "hideNative" : false,
|
|
|
+
|
|
|
+ "patchCount" : 1,
|
|
|
+ "turnsRemaining" : 1,
|
|
|
+ "triggerAbility" : "obstacleTriggerAbility",
|
|
|
+
|
|
|
+ "attacker" : {
|
|
|
+ "shape" : [],
|
|
|
+ "range" : [],
|
|
|
+ "appearSound" : {},
|
|
|
+ "appearAnimation" : {},
|
|
|
+ "animation" : {},
|
|
|
+ "offsetY" : 0
|
|
|
+ },
|
|
|
+
|
|
|
+ "defender" : {
|
|
|
+ "shape" : [],
|
|
|
+ "range" : [],
|
|
|
+ "appearSound" : {},
|
|
|
+ "appearAnimation" : {},
|
|
|
+ "animation" : {},
|
|
|
+ "offsetY" : 0
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+### Moat
|
|
|
|
|
|
TODO
|
|
|
|
|
|
-### Obstacle
|
|
|
+```json
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:moat"
|
|
|
+
|
|
|
+ "hidden" : false,
|
|
|
+ "trap" : false,
|
|
|
+ "removeOnTrigger" : false,
|
|
|
+ "dispellable" : false,
|
|
|
|
|
|
-TODO
|
|
|
+ "moatDamage" : 90,
|
|
|
+ "moatHexes" : [],
|
|
|
+
|
|
|
+ "triggerAbility" : "obstacleTriggerAbility",
|
|
|
+
|
|
|
+ "defender" : {
|
|
|
+ "shape" : [],
|
|
|
+ "range" : [],
|
|
|
+ "appearSound" : {},
|
|
|
+ "appearAnimation" : {},
|
|
|
+ "animation" : {},
|
|
|
+ "offsetY" : 0
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|
|
|
|
|
|
### Remove obstacle
|
|
|
|
|
|
-TODO
|
|
|
+Effect removes an obstacle from targeted hex
|
|
|
|
|
|
-### Sacrifice
|
|
|
+```json
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:removeObstacle",
|
|
|
+
|
|
|
+ /// If set to true, spell can remove large ("absolute") obstacles
|
|
|
+ "removeAbsolute" : false,
|
|
|
|
|
|
-TODO
|
|
|
+ /// If set to true, spell can remove small obstacles (H3 behavior)
|
|
|
+ "removeUsual" : true,
|
|
|
+
|
|
|
+ // If set to true, spell can remove any obstacle that was created by spell
|
|
|
+ "removeAllSpells" : true,
|
|
|
+
|
|
|
+ // If set to true, spell can remove obstacles that were created with specific spell
|
|
|
+ "removeSpells" : [ "spellA", "spellB" ],
|
|
|
+}
|
|
|
+```
|
|
|
|
|
|
### Summon
|
|
|
|
|
|
-TODO
|
|
|
-
|
|
|
-### Teleport
|
|
|
+Effect summons additional units to the battlefield.
|
|
|
|
|
|
-TODO
|
|
|
+If `exclusive` flag is set, attempt to summon a different creature by the same side in combat will fail (even if previous summon was non-exclusive)
|
|
|
|
|
|
-### Timed
|
|
|
+Amount of summoned units is equal to [spell effect power](#spell-power). Summoned units will disappear after combat, unless `permanent` flag in effect config is set
|
|
|
|
|
|
-TODO
|
|
|
+If `summonByHealth` option is set, then number of summoned units will be equal to [spell effect power](#spell-power) / unit health. Hero need to be able to summon at least one full unit for spell to work
|
|
|
|
|
|
-If effect is automatic, spell behave like \[de\]buff spell (effect and
|
|
|
-cumulativeEffects ignored)
|
|
|
+if `summonSameUnit` flag is set, and same creature was already summoned before, spell will instead heal unit in "overheal" mode, using same [spell effect power](#spell-power).
|
|
|
|
|
|
```json
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:summon",
|
|
|
+
|
|
|
+ /// Unit to summon
|
|
|
+ "id" : "airElemental",
|
|
|
+
|
|
|
+ "permanent" : false,
|
|
|
+ "exclusive" : false,
|
|
|
+ "summonByHealth" : false,
|
|
|
+ "summonSameUnit" : false,
|
|
|
+}
|
|
|
+```
|
|
|
|
|
|
-"mod:effectId":{
|
|
|
+### Demon Summon
|
|
|
|
|
|
-"type": "core:timed",
|
|
|
-"cumulative": false
|
|
|
-"bonus":
|
|
|
-{
|
|
|
-"firstBonus":{[bonus format]}
|
|
|
-//...
|
|
|
+Implements Pit Lord's ability with the same name. Raises targeted dead unit as unit specified in spell parameters on casters side. New unit will be placed on the same position as corpse, and corpse will be removed from the battlefield
|
|
|
+
|
|
|
+Raised amount of units is limited by (rounded down):
|
|
|
+
|
|
|
+- total HP of summoned unit can not be larger than [spell effect power](#spell-power) of caster
|
|
|
+- total HP of summoned unit can not be larger than total HP of dead unit
|
|
|
+- total stack size of summoned unit can not be greater than stack size of dead unit
|
|
|
+
|
|
|
+```json
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:demonSummon",
|
|
|
+
|
|
|
+ /// Unit to summon
|
|
|
+ "id" : "demon",
|
|
|
+
|
|
|
+ /// If true, unit will remain after combat
|
|
|
+ "permanent" : false
|
|
|
}
|
|
|
+```
|
|
|
+
|
|
|
+### Teleport
|
|
|
+
|
|
|
+Effect instantly moves unit from its current location to targeted tile
|
|
|
+
|
|
|
+```json
|
|
|
+"firstSpellEffect":{
|
|
|
+ "type": "core:teleport",
|
|
|
+
|
|
|
+ /// If true, unit will trigger obstacles on destination location
|
|
|
+ "triggerObstacles" : false,
|
|
|
+
|
|
|
+ /// If true, unit can be teleported across moat during town siege
|
|
|
+ "isMoatPassable" : false,
|
|
|
+
|
|
|
+ /// If true, unit can be teleported across walls during town siege
|
|
|
+ "isWallPassable" : false,
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-## Additional documentation
|
|
|
+### Timed
|
|
|
|
|
|
-### Targets, ranges, modifiers
|
|
|
+Timed effect gives affected units specified bonuses for duration of the spell.
|
|
|
|
|
|
-TODO
|
|
|
+Duration of effect is:
|
|
|
+
|
|
|
+- Hero: Spellpower + value of [SPELL_DURATION](../bonus/Bonus_Types.md#spell_duration) + [SPELL_DURATION](../bonus/Bonus_Types.md#spell_duration) for specific spell
|
|
|
+- Units: value of [CREATURE_ENCHANT_POWER](../bonus/Bonus_Types.md#creature_enchant_power), or 3 if no such bonus
|
|
|
+
|
|
|
+Value of all bonuses can be affected by following bonuses:
|
|
|
+
|
|
|
+- [SPECIAL_PECULIAR_ENCHANT](../bonus/Bonus_Types.md#special_peculiar_enchant): value modified by 1-3 according to level of target unit
|
|
|
+- [SPECIAL_ADD_VALUE_ENCHANT](../bonus/Bonus_Types.md#special_add_value_enchant): value from addInfo is added to val of bonus
|
|
|
+- [SPECIAL_FIXED_VALUE_ENCHANT](../bonus/Bonus_Types.md#special_fixed_value_enchant): value from addInfo replaces val of bonus
|
|
|
+
|
|
|
+```json
|
|
|
+"firstSpellEffect" : {
|
|
|
+ "type": "core:timed",
|
|
|
+
|
|
|
+ // if set to true, recasting same spell will accumulate (and prolong) effects of previous spellcast
|
|
|
+ "cumulative" : false
|
|
|
+
|
|
|
+ // List of bonuses granted by this spell
|
|
|
+ "bonus" : {
|
|
|
+ "firstBonus" : {[bonus format]}
|
|
|
+ //...
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+## Target types
|
|
|
+
|
|
|
+### CREATURE
|
|
|
|
|
|
-- CREATURE target (only battle spells)
|
|
|
- range 0: smart assumed single creature target
|
|
|
- range "X" + smart modifier = enchanter casting, expert massive spells
|
|
|
- range "X" + no smart modifier = armageddon, death ripple, destroy undead
|
|
@@ -396,14 +658,17 @@ TODO
|
|
|
- smart modifier: smth like cloud of confusion in H4 (if I remember correctly :) )
|
|
|
- no smart modifier: like inferno, fireball etc. but target only creature
|
|
|
|
|
|
-- NO_TARGET
|
|
|
+### NO_TARGET
|
|
|
+
|
|
|
- no target selection,(abilities, most adventure spells)
|
|
|
|
|
|
-- LOCATION
|
|
|
+### LOCATION
|
|
|
+
|
|
|
- any tile on map/battlefield (inferno, fireball etc.), DD also here but with special handling
|
|
|
- clearTarget - destination hex must be clear (unused so far)
|
|
|
- clearAfffected - all affected hexes must be clear (forceField, fireWall)
|
|
|
|
|
|
-- OBSTACLE target
|
|
|
+### OBSTACLE
|
|
|
+
|
|
|
- range 0: any single obstacle
|
|
|
- range X: all obstacles
|