mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Support for Titan's Thunder (creating Spellbook) & Titan's Lightning Bolt.
This commit is contained in:
@@ -3015,6 +3015,7 @@ void CBattleInterface::spellCast( const BattleSpellCast * sc )
|
|||||||
break; //for 15 and 16 cases
|
break; //for 15 and 16 cases
|
||||||
}
|
}
|
||||||
case 17: //lightning bolt
|
case 17: //lightning bolt
|
||||||
|
case 57: //Titan's Thunder
|
||||||
case 77: //thunderbolt
|
case 77: //thunderbolt
|
||||||
displayEffect(1, sc->tile);
|
displayEffect(1, sc->tile);
|
||||||
displayEffect(spell.mainEffectAnim, sc->tile);
|
displayEffect(spell.mainEffectAnim, sc->tile);
|
||||||
@@ -3050,6 +3051,7 @@ void CBattleInterface::spellCast( const BattleSpellCast * sc )
|
|||||||
if(sc->castedByHero)
|
if(sc->castedByHero)
|
||||||
{
|
{
|
||||||
boost::algorithm::replace_first(text, "%s", curInt->cb->battleGetFightingHero(sc->side)->name);
|
boost::algorithm::replace_first(text, "%s", curInt->cb->battleGetFightingHero(sc->side)->name);
|
||||||
|
boost::algorithm::replace_first(text, "%s", CGI->spellh->spells[sc->id]->name); //spell name
|
||||||
boost::algorithm::replace_first(text, "%s", curInt->cb->battleGetStackByID(*sc->affectedCres.begin(), false)->getCreature()->namePl ); //target
|
boost::algorithm::replace_first(text, "%s", curInt->cb->battleGetStackByID(*sc->affectedCres.begin(), false)->getCreature()->namePl ); //target
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -3143,7 +3145,7 @@ void CBattleInterface::spellCast( const BattleSpellCast * sc )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!customSpell)
|
if (!customSpell) //TODO: should not get here for direct damage spells
|
||||||
boost::algorithm::replace_first(text, "%s", CGI->spellh->spells[sc->id]->name); //simple spell name
|
boost::algorithm::replace_first(text, "%s", CGI->spellh->spells[sc->id]->name); //simple spell name
|
||||||
if (text.size())
|
if (text.size())
|
||||||
console->addText(text);
|
console->addText(text);
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
54 -1 19 0 0 0 X
|
54 -1 19 0 0 0 X
|
||||||
55 1 28 0 0 0 0
|
55 1 28 0 0 0 0
|
||||||
56 1 17 0 0 0 0
|
56 1 17 0 0 0 0
|
||||||
57 -1 -1 0 0 0 0
|
57 -1 38 0 0 0 0
|
||||||
58 1 7 0 0 0 X
|
58 1 7 0 0 0 X
|
||||||
59 -1 35 0 0 0-1 0-2
|
59 -1 35 0 0 0-1 0-2
|
||||||
60 -1 21 0 0 0 0
|
60 -1 21 0 0 0 0
|
||||||
|
|||||||
@@ -1010,6 +1010,8 @@ void CArtifactInstance::move(ArtifactLocation &src, ArtifactLocation &dst)
|
|||||||
{
|
{
|
||||||
removeFrom(src.hero, src.slot);
|
removeFrom(src.hero, src.slot);
|
||||||
putAt(dst.hero, dst.slot);
|
putAt(dst.hero, dst.slot);
|
||||||
|
if (artType->id == 135 && dst.slot == Arts::RIGHT_HAND && !dst.hero->hasSpellbook()) //Titan's Thunder creates new spellbook on equip
|
||||||
|
dst.hero->giveArtifact(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
CArtifactInstance * CArtifactInstance::createNewArtifactInstance(CArtifact *Art)
|
CArtifactInstance * CArtifactInstance::createNewArtifactInstance(CArtifact *Art)
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ rett * createAny(std::string dllname, std::string methodName)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Currently AI libraries use "lib" prefix only on non-win systems.
|
//Currently AI libraries use "lib" prefix only on non-win systems.
|
||||||
//May be applied to Win systems as well to remove this ifdef
|
//May be applied to Win systems as well to remove this ifdef
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
std::string getAIFileName(std::string input)
|
std::string getAIFileName(std::string input)
|
||||||
|
|||||||
@@ -3450,6 +3450,7 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, THex destinati
|
|||||||
case 24: //death ripple
|
case 24: //death ripple
|
||||||
case 25: //destroy undead
|
case 25: //destroy undead
|
||||||
case 26: //armageddon
|
case 26: //armageddon
|
||||||
|
case 57: //Titan's Lightning bolt
|
||||||
case 77: //Thunderbolt (thunderbirds)
|
case 77: //Thunderbolt (thunderbirds)
|
||||||
{
|
{
|
||||||
StacksInjured si;
|
StacksInjured si;
|
||||||
|
|||||||
Reference in New Issue
Block a user