1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

* [feature] giving starting hero

* [feature] VCMI will try to use files from /Data folder instead of those from h3bitmap.lod
* [feature] picked artifacts are added to hero's backpack
This commit is contained in:
Michał W. Urbańczyk
2008-02-07 18:45:22 +00:00
parent 96734fafa1
commit a89b4e2c59
12 changed files with 195 additions and 107 deletions

13
CMT.cpp
View File

@ -120,7 +120,7 @@ void initGameState(CGameInfo * cgi)
//*vhi=*(cgi->heroh->heroInstances[i]);
CGHeroInstance * vhi = (cgi->heroh->heroInstances[i]);
vhi->subID = vhi->type->ID;
if (!vhi->level)
if (vhi->level<1)
{
vhi->exp=40+rand()%50;
vhi->level = 1;
@ -760,6 +760,17 @@ int _tmain(int argc, _TCHAR* argv[])
initTable[ss] = mapstr[ss];
}
std::cout<<"done."<<std::endl;
for(int pru=0;pru<cgi->scenarioOps.playerInfos.size();pru++)
{
if(cgi->scenarioOps.playerInfos[pru].castle<0)
cgi->scenarioOps.playerInfos[pru].castle = rand()%F_NUMBER;
if(cgi->scenarioOps.playerInfos[pru].hero<0)
cgi->scenarioOps.playerInfos[pru].hero= cgi->scenarioOps.playerInfos[pru].castle*HEROES_PER_TYPE*2+(rand()%(HEROES_PER_TYPE*2));//cgi->scenarioOps.playerInfos[pru].hero = cgi->
}
#define CHOOSE
#ifdef CHOOSE
CAmbarCendamo * ac = new CAmbarCendamo(initTable); //4gryf