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

* support for orb of vulnerability

* updated changelog
This commit is contained in:
mateuszb 2010-05-21 16:43:07 +00:00
parent 76f61fa09e
commit 6541e89f90
2 changed files with 25 additions and 13 deletions

View File

@ -2,7 +2,15 @@
GENERAL:
* It's possible to start campaign
* Support for build grail victory condition
* New artifacts supported: Angel's Wings and Boots of levitation
* New artifacts supported:
- Angel's Wings
- Boots of levitation
- Orb of Vulnerability
- Ammo cart
- Golden Bow
- Hourglass of Evil Hour
- Bow of Sharpshooter
- Armor of the Damned
ADVENTURE MAP:
* Creatures now guard surrounding tiles

View File

@ -3598,18 +3598,22 @@ static std::vector<ui32> calculateResistedStacks(const CSpell * sp, const CGHero
if (caster->hasBonusOfType(Bonus::NEGATE_ALL_NATURAL_IMMUNITIES) ||
hero2->hasBonusOfType(Bonus::NEGATE_ALL_NATURAL_IMMUNITIES))
{
//Here we need "source different than" selector
// BonusList bl = (*it)->getBonuses(Selector::sourceNotType(Bonus::CREATURE_ABILITY));
//
// BOOST_FOREACH(Bonus bb, bl)
// {
// if(bb.type == Bonus::SPELL_IMMUNITY && bb.subtype == sp->id || //100% sure spell immunity
// bb.type == Bonus::LEVEL_SPELL_IMMUNITY && bb.val >= sp->level) //some creature abilities have level 0
// {
// ret.push_back((*it)->ID);
// continue;
// }
// }
//don't use natural immunities when one of heroes has this bonus
BonusList bl = (*it)->getBonuses(Selector::type(Bonus::SPELL_IMMUNITY)),
b2 = (*it)->getBonuses(Selector::type(Bonus::LEVEL_SPELL_IMMUNITY));
bl.insert(bl.end(), b2.begin(), b2.end());
BOOST_FOREACH(Bonus bb, bl)
{
if( (bb.type == Bonus::SPELL_IMMUNITY && bb.subtype == sp->id || //100% sure spell immunity
bb.type == Bonus::LEVEL_SPELL_IMMUNITY && bb.val >= sp->level) //some creature abilities have level 0
&& bb.source != Bonus::CREATURE_ABILITY)
{
ret.push_back((*it)->ID);
continue;
}
}
}
else
{