1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Unified war machine mechanics.

* it is possible to define new war machines
* added warMachine field to artifact configuration
This commit is contained in:
AlexVinS
2017-05-26 19:51:45 +03:00
parent 1f9c154ec2
commit a31c28ec33
16 changed files with 221 additions and 152 deletions

View File

@@ -754,7 +754,8 @@ void CCastleBuildings::enterBlacksmith(ArtifactID artifactID)
}
int price = CGI->arth->artifacts[artifactID]->price;
bool possible = LOCPLINT->cb->getResourceAmount(Res::GOLD) >= price && !hero->hasArt(artifactID);
GH.pushInt(new CBlacksmithDialog(possible, CArtHandler::machineIDToCreature(artifactID), artifactID, hero->id));
CreatureID cre = artifactID.toArtifact()->warMachine;
GH.pushInt(new CBlacksmithDialog(possible, cre, artifactID, hero->id));
}
void CCastleBuildings::enterBuilding(BuildingID building)