mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
1. All Ceature Banks now have correct configs.
2. Pyramid is fully supported. 3. Minor Pandora fix.
This commit is contained in:
@ -45,10 +45,10 @@ Dragon Utopia 1 30% 8 Green Dragons 0% 5 Red Dragons 2 Gold Dragons 1 Black Drag
|
|||||||
2 30% 8 Green Dragons 0% 6 Red Dragons 3 Gold Dragons 2 Black Dragons 2209 0 0 0 0 0 0 30000 0 None 0 1 1 2 57000 26 125%
|
2 30% 8 Green Dragons 0% 6 Red Dragons 3 Gold Dragons 2 Black Dragons 2209 0 0 0 0 0 0 30000 0 None 0 1 1 2 57000 26 125%
|
||||||
3 30% 8 Green Dragons 0% 6 Red Dragons 4 Gold Dragons 3 Black Dragons 2556 0 0 0 0 0 0 40000 0 None 0 0 1 3 75000 29 145%
|
3 30% 8 Green Dragons 0% 6 Red Dragons 4 Gold Dragons 3 Black Dragons 2556 0 0 0 0 0 0 40000 0 None 0 0 1 3 75000 29 145%
|
||||||
4 10% 8 Green Dragons 0% 7 Red Dragons 6 Gold Dragons 5 Black Dragons 3343 0 0 0 0 0 0 50000 0 None 0 0 0 4 90000 27 189%
|
4 10% 8 Green Dragons 0% 7 Red Dragons 6 Gold Dragons 5 Black Dragons 3343 0 0 0 0 0 0 50000 0 None 0 0 0 4 90000 27 189%
|
||||||
Hunting Lodge 1 30% 3 Dendroid 0% 4 Wood Elf 3 Dendroid 4 Wood Elf 100 15 0 0 0 0 0 500 0 None 0 0 0 0 2000 20 100%
|
Hunting Lodge 1 30% 3 Dendroid Guard Guard Guard 0% 4 Wood Elf 3 Dendroid Guard 4 Wood Elf 100 15 0 0 0 0 0 500 0 None 0 0 0 0 2000 20 100%
|
||||||
2 30% 4 Dendroid 0% 6 Wood Elf 4 Dendroid 6 Wood Elf 150 20 0 0 0 0 0 500 0 None 0 0 0 0 3000 20 100%
|
2 30% 4 Dendroid Guard 0% 6 Wood Elf 4 Dendroid Guard 6 Wood Elf 150 20 0 0 0 0 0 500 0 None 0 0 0 0 3000 20 100%
|
||||||
3 30% 5 Dendroid 0% 8 Wood Elf 5 Dendroid 8 Wood Elf 200 25 0 0 0 0 0 500 0 None 0 0 0 0 4000 20 150%
|
3 30% 5 Dendroid Guard 0% 8 Wood Elf 5 Dendroid Guard 8 Wood Elf 200 25 0 0 0 0 0 500 0 None 0 0 0 0 4000 20 150%
|
||||||
4 10% 6 Dendroid Soldier 100% 10 Grand Elf 6 Dendroid Soldier 10 Grand Elf 300 40 0 0 0 0 0 1000 0 None 0 0 0 0 6000 20 200%
|
4 10% 6 Dendroid Guard 100% 10 Wood Elf 6 Dendroid Guard 10 Wood Elf 300 40 0 0 0 0 0 1000 0 None 0 0 0 0 6000 20 200%
|
||||||
Snow-covered Grotto 1 30% 5 Iron Golem 0% 20 Master Gremlin 5 Iron Golem 20 Master Gremlin 100 0 0 15 0 0 0 500 0 None 0 0 0 0 2000 20 100%
|
Snow-covered Grotto 1 30% 5 Iron Golem 0% 20 Master Gremlin 5 Iron Golem 20 Master Gremlin 100 0 0 15 0 0 0 500 0 None 0 0 0 0 2000 20 100%
|
||||||
2 30% 6 Iron Golem 0% 30 Master Gremlin 6 Iron Golem 30 Master Gremlin 150 0 0 20 0 0 0 500 0 None 0 0 0 0 3000 20 100%
|
2 30% 6 Iron Golem 0% 30 Master Gremlin 6 Iron Golem 30 Master Gremlin 150 0 0 20 0 0 0 500 0 None 0 0 0 0 3000 20 100%
|
||||||
3 30% 7 Iron Golem 0% 40 Master Gremlin 7 Iron Golem 40 Master Gremlin 200 0 0 30 0 0 0 500 0 None 0 0 0 0 4000 20 150%
|
3 30% 7 Iron Golem 0% 40 Master Gremlin 7 Iron Golem 40 Master Gremlin 200 0 0 30 0 0 0 500 0 None 0 0 0 0 4000 20 150%
|
||||||
|
@ -3429,6 +3429,8 @@ void CGPandoraBox::giveContents( const CGHeroInstance *h, bool afterBattle ) con
|
|||||||
}
|
}
|
||||||
|
|
||||||
//check if creatures can be moved to hero army
|
//check if creatures can be moved to hero army
|
||||||
|
if (creatures.slots.size())
|
||||||
|
{
|
||||||
CCreatureSet heroArmy = h->army;
|
CCreatureSet heroArmy = h->army;
|
||||||
CCreatureSet ourArmy = creatures;
|
CCreatureSet ourArmy = creatures;
|
||||||
while(ourArmy.slots.size() > 0)
|
while(ourArmy.slots.size() > 0)
|
||||||
@ -3455,7 +3457,7 @@ void CGPandoraBox::giveContents( const CGHeroInstance *h, bool afterBattle ) con
|
|||||||
cb->sendAndApply(&sg);
|
cb->sendAndApply(&sg);
|
||||||
cb->showGarrisonDialog(id,h->id,true,boost::bind(&IGameCallback::removeObject,cb,id));
|
cb->showGarrisonDialog(id,h->id,true,boost::bind(&IGameCallback::removeObject,cb,id));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(!afterBattle && message.size())
|
if(!afterBattle && message.size())
|
||||||
{
|
{
|
||||||
iw.text << message;
|
iw.text << message;
|
||||||
@ -4060,17 +4062,14 @@ void CBank::newTurn() const
|
|||||||
{
|
{
|
||||||
if (bc == NULL)
|
if (bc == NULL)
|
||||||
{
|
{
|
||||||
if (daycounter >= 28 || cb->getDate(0) == 1)
|
if (cb->getDate(0) == 1)
|
||||||
|
cb->setObjProperty (id, 14, ran()); //initialize on first day
|
||||||
|
else if (daycounter >= 28 && (subID < 13 || subID > 16)) //no reset for Emissaries
|
||||||
{
|
{
|
||||||
if (subID < 13 || subID > 16) //no reset for Emissaries
|
|
||||||
{
|
|
||||||
cb->setObjProperty (id, 11, 0); //daycounter 0
|
|
||||||
cb->setObjProperty (id, 14, ran()); //reset
|
cb->setObjProperty (id, 14, ran()); //reset
|
||||||
|
cb->setObjProperty (id, 11, 0); //daycounter 0
|
||||||
if (ID == 24 && cb->getDate(0) > 1)
|
if (ID == 24 && cb->getDate(0) > 1)
|
||||||
{
|
cb->setObjProperty (id, 16, 0); //derelict ships are usable only once
|
||||||
cb->setObjProperty (id, 16, 0);; //derelict ships are usable only once
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cb->setObjProperty (id, 11, 1); //daycounter++
|
cb->setObjProperty (id, 11, 1); //daycounter++
|
||||||
@ -4269,6 +4268,15 @@ void CGPyramid::initObj()
|
|||||||
cb->getAllowedSpells (available, 5);
|
cb->getAllowedSpells (available, 5);
|
||||||
spell = (available[rand()%available.size()]);
|
spell = (available[rand()%available.size()]);
|
||||||
}
|
}
|
||||||
|
const std::string & CGPyramid::getHoverText() const
|
||||||
|
{
|
||||||
|
hoverName = VLC->generaltexth->names[ID];
|
||||||
|
if (bc == NULL)
|
||||||
|
hoverName += " " + VLC->generaltexth->allTexts[352];
|
||||||
|
else
|
||||||
|
hoverName += " " + VLC->generaltexth->allTexts[353];
|
||||||
|
return hoverName;
|
||||||
|
}
|
||||||
void CGPyramid::onHeroVisit (const CGHeroInstance * h) const
|
void CGPyramid::onHeroVisit (const CGHeroInstance * h) const
|
||||||
{
|
{
|
||||||
if (bc)
|
if (bc)
|
||||||
@ -4282,10 +4290,12 @@ void CGPyramid::onHeroVisit (const CGHeroInstance * h) const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
InfoWindow iw;
|
InfoWindow iw;
|
||||||
|
iw.player = h->getOwner();
|
||||||
iw.text << VLC->generaltexth->advobtxt[107];
|
iw.text << VLC->generaltexth->advobtxt[107];
|
||||||
iw.components.push_back (Component (Component::LUCK, 0 , -2, 0));
|
iw.components.push_back (Component (Component::LUCK, 0 , -2, 0));
|
||||||
GiveBonus gb;
|
GiveBonus gb;
|
||||||
gb.bonus = HeroBonus(HeroBonus::ONE_BATTLE,HeroBonus::LUCK,HeroBonus::OBJECT,-2,id,VLC->generaltexth->arraytxt[ID]);
|
gb.bonus = HeroBonus(HeroBonus::ONE_BATTLE,HeroBonus::LUCK,HeroBonus::OBJECT,-2,id,VLC->generaltexth->arraytxt[70]);
|
||||||
|
gb.hid = h->id;
|
||||||
cb->giveHeroBonus(&gb);
|
cb->giveHeroBonus(&gb);
|
||||||
cb->showInfoDialog(&iw);
|
cb->showInfoDialog(&iw);
|
||||||
}
|
}
|
||||||
@ -4296,12 +4306,13 @@ void CGPyramid::endBattle (const CGHeroInstance *h, const BattleResult *result)
|
|||||||
if (result->winner == 0)
|
if (result->winner == 0)
|
||||||
{
|
{
|
||||||
InfoWindow iw;
|
InfoWindow iw;
|
||||||
|
iw.player = h->getOwner();
|
||||||
iw.text.addTxt (MetaString::ADVOB_TXT, 106);
|
iw.text.addTxt (MetaString::ADVOB_TXT, 106);
|
||||||
iw.text.addTxt (MetaString::SPELL_NAME, spell);
|
iw.text.addTxt (MetaString::SPELL_NAME, spell);
|
||||||
if (!h->getArt(17)) //no spellbook
|
if (!h->getArt(17))
|
||||||
iw.text.addTxt (MetaString::ADVOB_TXT, 109);
|
iw.text.addTxt (MetaString::ADVOB_TXT, 109); //no spellbook
|
||||||
else if (h->getSecSkillLevel(7) < 3) //no expert Wisdom
|
else if (h->getSecSkillLevel(7) < 3)
|
||||||
iw.text.addTxt (MetaString::ADVOB_TXT, 108);
|
iw.text.addTxt (MetaString::ADVOB_TXT, 108); //no expert Wisdom
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::set<ui32> spells;
|
std::set<ui32> spells;
|
||||||
@ -4310,6 +4321,7 @@ void CGPyramid::endBattle (const CGHeroInstance *h, const BattleResult *result)
|
|||||||
iw.components.push_back(Component (Component::SPELL, spell, 0, 0));
|
iw.components.push_back(Component (Component::SPELL, spell, 0, 0));
|
||||||
}
|
}
|
||||||
cb->showInfoDialog(&iw);
|
cb->showInfoDialog(&iw);
|
||||||
|
cb->setObjProperty (id, 15, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void CGKeys::setPropertyDer (ui8 what, ui32 val) //101-108 - enable key for player 1-8
|
void CGKeys::setPropertyDer (ui8 what, ui32 val) //101-108 - enable key for player 1-8
|
||||||
|
@ -902,9 +902,9 @@ class DLL_EXPORT CBank : public CArmedInstance
|
|||||||
void setPropertyDer (ui8 what, ui32 val);
|
void setPropertyDer (ui8 what, ui32 val);
|
||||||
void reset(ui16 var1, ui16 var2);
|
void reset(ui16 var1, ui16 var2);
|
||||||
void newTurn() const;
|
void newTurn() const;
|
||||||
void onHeroVisit (const CGHeroInstance * h) const;
|
virtual void onHeroVisit (const CGHeroInstance * h) const;
|
||||||
void fightGuards (const CGHeroInstance *h, ui32 accept) const;
|
virtual void fightGuards (const CGHeroInstance *h, ui32 accept) const;
|
||||||
void endBattle (const CGHeroInstance *h, const BattleResult *result) const;
|
virtual void endBattle (const CGHeroInstance *h, const BattleResult *result) const;
|
||||||
|
|
||||||
template <typename Handler> void serialize(Handler &h, const int version)
|
template <typename Handler> void serialize(Handler &h, const int version)
|
||||||
{
|
{
|
||||||
@ -919,9 +919,9 @@ public:
|
|||||||
ui16 spell;
|
ui16 spell;
|
||||||
|
|
||||||
void initObj();
|
void initObj();
|
||||||
|
const std::string & getHoverText() const;
|
||||||
void newTurn() const {}; //empty, no reset
|
void newTurn() const {}; //empty, no reset
|
||||||
void onHeroVisit (const CGHeroInstance * h) const;
|
void onHeroVisit (const CGHeroInstance * h) const;
|
||||||
void fightGuards (const CGHeroInstance *h, ui32 accept) const {};
|
|
||||||
void endBattle (const CGHeroInstance *h, const BattleResult *result) const;
|
void endBattle (const CGHeroInstance *h, const BattleResult *result) const;
|
||||||
|
|
||||||
template <typename Handler> void serialize(Handler &h, const int version)
|
template <typename Handler> void serialize(Handler &h, const int version)
|
||||||
|
Reference in New Issue
Block a user