mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-27 21:49:10 +02:00
* fixed 576
* new cheat code: vcmiforgeofnoldorking - hero gets all artifacts except spell book, spell scrolls and war machines
This commit is contained in:
parent
f41c85212f
commit
a95bb9d916
@ -2867,6 +2867,11 @@ void CBattleInterface::castThisSpell(int spellID)
|
|||||||
spellSelMode = 5;
|
spellSelMode = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(spell.range[ castingHero->getSpellSchoolLevel(&spell) ].size() > 1) //spell has many-hex range
|
||||||
|
{
|
||||||
|
spellSelMode = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if(spellSelMode == -1) //user does not have to select location
|
if(spellSelMode == -1) //user does not have to select location
|
||||||
{
|
{
|
||||||
spellToCast->destinationTile = -1;
|
spellToCast->destinationTile = -1;
|
||||||
|
@ -3059,6 +3059,15 @@ std::set<CStack*> BattleInfo::getAttackedCreatures( const CSpell * s, int skillL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (s->range[skillLevel].size() > 1) //custom many-hex range
|
||||||
|
{
|
||||||
|
for(std::set<ui16>::iterator it = attackedHexes.begin(); it != attackedHexes.end(); ++it)
|
||||||
|
{
|
||||||
|
CStack * st = getStackT(*it, onlyAlive);
|
||||||
|
if(st)
|
||||||
|
attackedCres.insert(st);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(VLC->spellh->spells[s->id].attributes.find("CREATURE_TARGET_1") != std::string::npos
|
else if(VLC->spellh->spells[s->id].attributes.find("CREATURE_TARGET_1") != std::string::npos
|
||||||
|| VLC->spellh->spells[s->id].attributes.find("CREATURE_TARGET_2") != std::string::npos) //spell to be cast on a specific creature but massive on expert
|
|| VLC->spellh->spells[s->id].attributes.find("CREATURE_TARGET_2") != std::string::npos) //spell to be cast on a specific creature but massive on expert
|
||||||
{
|
{
|
||||||
|
@ -3928,6 +3928,21 @@ void CGameHandler::playerMessage( ui8 player, const std::string &message )
|
|||||||
gs->getPlayer(player)->enteredLosingCheatCode = 1;
|
gs->getPlayer(player)->enteredLosingCheatCode = 1;
|
||||||
checkLossVictory(player);
|
checkLossVictory(player);
|
||||||
}
|
}
|
||||||
|
else if (message == "vcmiforgeofnoldorking") //hero gets all artifacts except war machines, spell scrolls and spell book
|
||||||
|
{
|
||||||
|
CGHeroInstance *hero = gs->getHero(gs->getPlayer(player)->currentSelection);
|
||||||
|
if(!hero) return;
|
||||||
|
SetHeroArtifacts sha;
|
||||||
|
sha.hid = hero->id;
|
||||||
|
sha.artifacts = hero->artifacts;
|
||||||
|
sha.artifWorn = hero->artifWorn;
|
||||||
|
sha.artifacts.push_back(2); //grail
|
||||||
|
for (int g=7; g<=140; ++g)
|
||||||
|
{
|
||||||
|
sha.artifacts.push_back(g);
|
||||||
|
}
|
||||||
|
sendAndApply(&sha);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
cheated = false;
|
cheated = false;
|
||||||
if(cheated)
|
if(cheated)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user