1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

* fixed move hero button

* creatures placeholders work properly
* abandoned mine won't show message with mithril
* it's possible to build glyph of fear in fortress
* emissaries won't be used in random creature drawing (they have no correct def)
* fixed problem with moving two-hex creatures one tile back
This commit is contained in:
Michał W. Urbańczyk 2008-09-01 00:25:36 +00:00
parent 37753e6678
commit 01105ddc41
7 changed files with 25 additions and 6 deletions

View File

@ -995,7 +995,9 @@ void CAdvMapInt::fmoveHero()
if (!terrain.currentPath)
return;
CPath sended(*(terrain.currentPath)); //temporary path - engine will operate on it
LOCPLINT->pim->unlock();
LOCPLINT->cb->moveHero( ((const CGHeroInstance*)LOCPLINT->adventureInt->selection)->type->ID,&sended,1,0);
LOCPLINT->pim->lock();
}
void CAdvMapInt::fshowSpellbok()
{

View File

@ -1131,7 +1131,18 @@ void CGameState::init(StartInfo * si, Mapa * map, int Seed)
vti->spells[s->level-1].push_back(s->id);
vti->possibleSpells -= s->id;
}
//init garrisons
for (std::map<si32,std::pair<ui32,si32> >::iterator j=vti->army.slots.begin(); j!=vti->army.slots.end();j++)
{
if(j->second.first > 196 && j->second.first < 211)
{
if(j->second.first%2)
j->second.first = vti->town->basicCreatures[ (j->second.first-197) / 2 ];
else
j->second.first = vti->town->upgradedCreatures[ (j->second.first-197) / 2 ];
}
}
players[vti->getOwner()].towns.push_back(vti);
}

View File

@ -514,6 +514,8 @@ void CMines::onHeroVisit(int objid, int heroID)
{
//TODO: this is code for standard mines, no support for abandoned mine (subId==7)
DEFOS;
if(os->subID==7)
return;
const CGHeroInstance *h = cb->getHero(heroID);
if(h->tempOwner == os->tempOwner)
return; //TODO: leaving garrison

View File

@ -1,4 +1,4 @@
0.61 -> 0.62 (Aug 31 2008 hopefully)
0.61 -> 0.62 (Sep 01 2008)
General:
* restructured to the server-client model
* support for heroes placed in towns
@ -19,6 +19,8 @@ Castles:
* mage guild screen
* support for blacksmith
* if hero doesn't have a spell book, he can buy one in a mage guild
* it's possible to build glyph of fear in fortress
* creatures placeholders work properly
Adventure Interface:
* hopefully fixed problems with wrong town defs (village/fort/capitol)
@ -38,6 +40,7 @@ Battles:
* slightly optimized showing of battle interface
* animation of getting hit / death by shooting is displayed when it should be
* improved pathfinding in battles, removed problems with displaying movement, adventure map interface won't be called during battles.
* minor optimizations
PreGame:
* updates settings when selecting new map after changing sorting criteria

View File

@ -52,7 +52,7 @@ TPTHBKTW.BMP
TPTHBKFR.BMP
10 11 12 13 | 7 8 9 | 5 | 16
14 15 | 0 1 2 | 6
17 | 22 | 18 19
17 | 21 22 | 18 19
30 37 | 31 38 | 32 39 | 33 40
34 41 | 35 42 | 36 43
8

View File

@ -63,7 +63,7 @@ si32 CCreature::maxAmount(const std::vector<si32> &res) const //how many creatur
void CCreatureHandler::loadCreatures()
{
notUsedMonsters += 122,124,126,128,145,146,147,148,149,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191;
notUsedMonsters += 122,124,126,128,145,146,147,148,149,160,161,162,163,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191;
std::string buf = bitmaph->getTextFile("ZCRTRAIT.TXT");
int andame = buf.size();
int i=0; //buf iterator
@ -443,7 +443,8 @@ void CCreatureHandler::loadCreatures()
}
inp2.close();
creatures[123].abilityRefs += "DOUBLE_WIDE";
creatures[122].abilityRefs += "DOUBLE_WIDE"; //water elemental should be treated as double-wide
creatures[123].abilityRefs += "DOUBLE_WIDE"; //ice elemental should be treated as double-wide
}
void CCreatureHandler::loadAnimationInfo()

View File

@ -921,7 +921,7 @@ void CGameHandler::moveStack(int stack, int dest)
else
gs->curB->getAccessibilityMap(accessibility,curStack->ID);
if((stackAtEnd && stackAtEnd->alive) || !accessibility[dest])
if((stackAtEnd && stackAtEnd!=curStack && stackAtEnd->alive) || !accessibility[dest])
return;
//if(dists[dest] > curStack->creature->speed && !(stackAtEnd && dists[dest] == curStack->creature->speed+1)) //we can attack a stack if we can go to adjacent hex