1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Various fixes and improvements around kill hero and kill monster quests. A few minor unrelated fixes.

This commit is contained in:
Michał W. Urbańczyk
2011-02-11 12:27:38 +00:00
parent c0f2b3f32b
commit ab20e024c0
12 changed files with 149 additions and 100 deletions

View File

@ -2386,6 +2386,12 @@ void CBattleInterface::hexLclicked(int whichOne)
{
const CStack * actSt = activeStack;
const CStack* dest = curInt->cb->battleGetStackByPos(whichOne); //creature at destination tile; -1 if there is no one
if(!actSt)
{
tlog3 << "Hex l-clicked when no active stack!\n";
return;
}
if( ((whichOne%BFIELD_WIDTH)!=0 && (whichOne%BFIELD_WIDTH)!=(BFIELD_WIDTH-1)) //if player is trying to attack enemey unit or move creature stack
|| (actSt->hasBonusOfType(Bonus::CATAPULT) && !spellDestSelectMode || dest ) //enemy's first aid tent can stand there and we want to shoot it
)