VCMI is doing well, but I hope it can be more flexible. Here are my suggestions.
Event subscription
Can be used to configure something advanced.Configurable creature abilities
So that we can create custom "abilities" in mods without VCMI source code support.Actions & Value calculators & Value referrers
As a mechanism to improve flexibility.Example: Based on those features we can configure the FIRE_SHIELD ability like this.
A complicated configuration
"FIRE_SHIELD": {
"events": {
"postHurt": { // Event subscription
"actions": [
{
"action": "hurt",
"animation": [ ... ],
"condition": [ ... ],
"target": { "source": "event", "value": "attacker" },
"amount": {
"source": "multiply", // Value calculator that multiplies the values together
"value": [
0.2,
{ "source": "event", "value": "damageDealt" }, // Value referrer
{
"source": "predefinedCalculation", // Predefined value calculator
"value": {
"type": "damageCoefficient",
"attacker": { "source": "event", "value": "defender" }
"defender": { "source": "event", "value": "attacker" }
}
},
{
"source": "predefinedCalculation",
"value": {
"type": "fireMagicCoefficient",
"target": { "source": "event", "value": "attacker" }
}
}
]
}
}
]
}
}
}