1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Actually this one contains fixed Pyramid

This commit is contained in:
DjWarmonger
2009-12-29 17:15:03 +00:00
parent 63ba552d87
commit 6bff8aec34
3 changed files with 39 additions and 23 deletions

View File

@@ -4220,24 +4220,11 @@ void CBank::onHeroVisit (const CGHeroInstance * h) const
else else
{ {
InfoWindow iw; InfoWindow iw;
if (ID == 85)
{
iw.components.push_back (Component (Component::MORALE, 0 , -1, 0));
GiveBonus gbonus;
gbonus.hid = h->id;
gbonus.bonus.duration = HeroBonus::ONE_BATTLE;
gbonus.bonus.source = HeroBonus::OBJECT;
gbonus.bonus.id = ID;
gbonus.bdescr << "\n" << VLC->generaltexth->arraytxt[ID];
gbonus.bonus.type = HeroBonus::MORALE;
gbonus.bonus.val = -1;
cb->giveHeroBonus(&gbonus);
}
iw.soundID = soundBase::GRAVEYARD; iw.soundID = soundBase::GRAVEYARD;
iw.player = h->getOwner(); iw.player = h->getOwner();
//if (ID == 16 || ID == 24 || ID == 25 || ID == 84)
iw.text << VLC->generaltexth->advobtxt[33]; iw.text << VLC->generaltexth->advobtxt[33];
if (ID == 16 || ID == 24 || ID == 85) iw.text.addReplacement (VLC->objh->creBanksNames[index]);
iw.text.addReplacement (VLC->objh->creBanksNames[index]);
cb->showInfoDialog(&iw); cb->showInfoDialog(&iw);
} }
} }
@@ -4260,7 +4247,7 @@ void CBank::endBattle (const CGHeroInstance *h, const BattleResult *result) cons
switch (ID) switch (ID)
{ {
case 16: case 25: case 84: case 16: case 25:
textID = 34; textID = 34;
break; break;
case 24: //derelict ship case 24: //derelict ship
@@ -4268,10 +4255,39 @@ void CBank::endBattle (const CGHeroInstance *h, const BattleResult *result) cons
textID = 43; textID = 43;
else else
{ {
iw.components.push_back (Component (Component::MORALE, 0 , -2, 0));
GiveBonus gbonus;
gbonus.hid = h->id;
gbonus.bonus.duration = HeroBonus::ONE_BATTLE;
gbonus.bonus.source = HeroBonus::OBJECT;
gbonus.bonus.id = ID;
gbonus.bdescr << "\n" << VLC->generaltexth->arraytxt[ID];
gbonus.bonus.type = HeroBonus::MORALE;
gbonus.bonus.val = -2;
cb->giveHeroBonus(&gbonus);
textID = 42; textID = 42;
iw.components.push_back (Component (Component::MORALE, 0 , -2, 0)); iw.components.push_back (Component (Component::MORALE, 0 , -2, 0));
} }
break; break;
case 84: //Crypt
if (bc->resources.size() != 0)
textID = 121;
else
{
iw.components.push_back (Component (Component::MORALE, 0 , -1, 0));
GiveBonus gbonus;
gbonus.hid = h->id;
gbonus.bonus.duration = HeroBonus::ONE_BATTLE;
gbonus.bonus.source = HeroBonus::OBJECT;
gbonus.bonus.id = ID;
gbonus.bdescr << "\n" << VLC->generaltexth->arraytxt[ID];
gbonus.bonus.type = HeroBonus::MORALE;
gbonus.bonus.val = -1;
cb->giveHeroBonus(&gbonus);
textID = 120;
iw.components.push_back (Component (Component::MORALE, 0 , -1, 0));
}
break;
case 85: //shipwreck case 85: //shipwreck
if (bc->resources.size() != 0) if (bc->resources.size() != 0)
textID = 124; textID = 124;

View File

@@ -955,7 +955,7 @@ public:
template <typename Handler> void serialize(Handler &h, const int version) template <typename Handler> void serialize(Handler &h, const int version)
{ {
h & static_cast<CGObjectInstance&>(*this); h & static_cast<CBank&>(*this);
h & spell; h & spell;
} }
}; };