I wanted to make “spell” that will give army +1 morale (in 0.97b)
{
"battleHymnChampions":
{
"type": "combat",
"name": "Champions March",
"school":
{
"air": false,
"earth": false,
"fire": false,
"water": false
},
"level": 1,
"power": 10,
"defaultGainChance": 3,
"gainChance":
{
"castle": 7
},
"immunity":{"MIND_IMMUNITY":true},
"absoluteImmunity":{"NON_LIVING":true,"UNDEAD":true},
"flags" : {"positive": true,"offensive":false,"damage":false},
"animation":{
"affect":"Battle Hymns/Champions/Coin_with_sword.def"]
},
//graphics - OPTIONAL; object;
"graphics":
{
"iconBook": "Battle Hymns/Champions/back0.bmp",
"iconScroll": "Battle Hymns/Champions/back1.bmp",
"iconScenarioBonus": "Battle Hymns/Champions/back2.bmp",
"iconEffect": "Battle Hymns/Champions/back3.bmp"
},
"sounds":
{
//OPTIONAL; resourse path, casting sound
"cast":"Battle Hymns/Champions/Win"
},
"targetType": "CREATURE",
"levels":
{
"none":
{
"description": "Champion March increases army morale by +1.",
"cost": 2,
"power": 10,
"aiValue": 5,
"range": "X",
//"targetModifier":{"smart":true},
"effects":
{
"attacks":
{
"type": "MORALE",
"val": 1,
// "duration": "N_TURNS",
"propagator":"HERO"
}
}
},
"basic":
{
"description": "Champion March increases army morale by +1.",
"cost": 2,
"power": 10,
"aiValue": 5,
"range": "X",
// "targetModifier":{"smart":true},
"effects":
{
"attacks":
{
"type": "MORALE",
"val": 1,
// "duration": "N_TURNS"
"propagator":"HERO"
}
}
},
"advanced":
{
"description": "Champion March increases army morale by +1.",
"cost": 2,
"power": 10,
"aiValue": 5,
"range": "X",
// "targetModifier":{"smart":true},
"effects":
{
"attacks":
{
"type": "MORALE",
"val":2,
// "duration": "N_TURNS"
"propagator":"HERO"
}
}
},
"expert":
{
"description": "Champion March increases army morale by +1.",
"cost": 2,
"power": 10,
"aiValue": 5,
"range": "X",
// "targetModifier":{"smart":true},
"effects":
{
"attacks":
{
"type": "MORALE",
"val":3,
// "duration": "N_TURNS"
"propagator":"HERO"
}
}
},
}
}
}
This code didn’t work at all until I added “propagator”:“HERO”.
That’s strange, because creatures have reaction on bonus “Morale”.
But the way, we have section “school”
Is there no “mind” magic?
And this is not very good for future modding (where modding of secondary skills will be added).
I suggest change “air”,“earth”,“fire”,“water” magic schools IDs to secondary skill IDs.
Like
"school":
{
"airMagic": false,
"earthMagic": false,
"fireMagic": false,
"waterMagic": false
},
For example, I want to make spell, that will require “artillery” skill. Then I will write
“artillery”:true, and levels of spell will depend on level of Artillery skill
PPS There is no duration “ONE_TURN”, duration is calculated from spell power. I wanted to make battle hymns spells work only 1 turn…