# Spell Format ## Main format ``` javascript { "spellName": { // Mandatory. Spell type // Allowed values: "adventure", "combat", "ability" "type": "adventure", // Mandatory. Spell target type // "NO_TARGET" - instant cast no aiming (e.g. Armageddon) // "CREATURE" - target is unit (e.g. Resurrection) // "OBSTACLE" - target is obstacle (e.g. Remove Obstacle) // "LOCATION" - target is location (e.g. Fire Wall) "targetType":"NO_TARGET", // Localizable name of this spell "name": "Localizable name", // Mandatory. List of spell schools this spell belongs to "school": {"air":true, "earth":true, "fire":true, "water":true}, // Mandatory. Spell level, value in range 1-5, or 0 for abilities "level": 1, // Mandatory. Base power of the spell "power": 10, // Mandatory. 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, // Chance for this spell to appear in Mage Guild of a specific faction // Symmetric property of "guildSpells" property in towns "gainChance": { "factionName" : 3 }, "animation":{}, // List of spells that will be countered by this 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) // 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. "flags" : { "positive": true, }, // If true, then creature capable of casting this spell can cast this spell on itself // If false, then creature can only cast this spell on other units "canCastOnSelf" : false, // If true, then creature capable of casting this spell can cast this spell only on itself "canCastOnlyOnSelf" : false, // If true the creature will not skip the turn after casting a spell "canCastWithoutSkip": false, // If true, spell won't be available on a map without water "onlyOnWaterMap" : true, //TODO: DEPRECATED | optional| no default | flags structure of bonus names,any one of these bonus grants immunity. Negatable by the Orb. "immunity": {"BONUS_NAME":true, ...}, //TODO: DEPRECATED | optional| no default | flags structure of bonus names //any one of these bonus grants immunity, cant be negated "absoluteImmunity": {"BONUS_NAME": true, ...}, //TODO: DEPRECATED | optional| no default | flags structure of bonus names, presence of all bonuses required to be affected by. Negatable by the Orb. "limit": {"BONUS_NAME": true, ...}, //TODO: DEPRECATED | optional| no default | flags structure of bonus names, presence of all bonuses required to be affected by. Cant be negated "absoluteLimit": {"BONUS_NAME": true, ...}, //TODO: optional | default no limit no immunity // "targetCondition" { //at least one required to be affected "anyOf" : { //generic format "mod:metaClassName.typeName":"absolute",//"normal", null or empty ignored - use for overrides }, //all required to be affected (like [absolute]limit) "allOf" : { //bonus type format "bonus.BONUS_TYPE":"absolute"//"normal" Short bonus type format "modId:bonus.bonusTypeName":"absolute"//"normal" Future bonus format for configurable bonuses }, //at least one grants immunity (like [absolute]immunity) "noneOf": { //some more examples "core:creature.imp":"absolute", //[to be in initial version] this creature explicitly absolutely immune "core:bonus.MIND_IMMUITY":"normal", // [to be in initial version] new format of existing mind spell immunity "core:artifact.armorOfWonder":"absolute", //[possible future extension] this artifact on target itself (!) explicitly grant absolute immune "core:luck":["absolute", 3], // [possible future extension] lack value of at least 3 grant absolute immunity from this horrible spell "core:custom":[