1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

support setting spell master level in OPENING_BATTLE_SPELLS

This commit is contained in:
kdmcser
2025-08-11 02:13:36 +08:00
parent 25ba05cdab
commit 594ae27cb5
3 changed files with 4 additions and 1 deletions

View File

@@ -206,7 +206,8 @@ void BattleFlowProcessor::castOpeningSpells(const CBattleInfoCallback & battle)
const CSpell * spell = b->subtype.as<SpellID>().toSpell();
spells::BattleCast parameters(&battle, &caster, spells::Mode::PASSIVE, spell);
parameters.setSpellLevel(3);
int32_t spellLevel = b->additionalInfo != CAddInfo::NONE ? b->additionalInfo[0] : 3;
parameters.setSpellLevel(spellLevel);
parameters.setEffectDuration(b->val);
parameters.massive = true;
parameters.castIfPossible(gameHandler->spellcastEnvironment(), spells::Target());