1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Stack artifacts part 2, not working yet.

This commit is contained in:
DjWarmonger
2012-02-04 16:34:29 +00:00
parent b8a5d0d430
commit 2bddf29cbf
12 changed files with 71 additions and 50 deletions

View File

@@ -134,7 +134,20 @@ bool GarrisonHeroSwap::applyGh( CGameHandler *gh )
bool ExchangeArtifacts::applyGh( CGameHandler *gh )
{
ERROR_IF_NOT_OWNS(hid1);//second hero can be ally
return gh->moveArtifact(hid1,hid2,slot1,slot2);
if (hid1)
{ //TODO: polymorph
if (hid2)
return gh->moveArtifact(hid1,hid2,slot1,slot2);
else
return gh->moveArtifact(hid1,s2,slot1,slot2);
}
else
{
if (hid2)
return gh->moveArtifact(s1,hid2,slot1,slot2);
else
return gh->moveArtifact(s1,s2,slot1,slot2);
}
}
bool AssembleArtifacts::applyGh( CGameHandler *gh )