mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
@@ -110,7 +110,8 @@
|
|||||||
},
|
},
|
||||||
"immuneToFire" :
|
"immuneToFire" :
|
||||||
{
|
{
|
||||||
"type" : "FIRE_IMMUNITY"
|
"type" : "FIRE_IMMUNITY",
|
||||||
|
"subtype" : 0
|
||||||
},
|
},
|
||||||
"frostRingVulnerablity" :
|
"frostRingVulnerablity" :
|
||||||
{
|
{
|
||||||
@@ -446,6 +447,11 @@
|
|||||||
{
|
{
|
||||||
"type" : "NON_LIVING"
|
"type" : "NON_LIVING"
|
||||||
},
|
},
|
||||||
|
"immuneToFire" :
|
||||||
|
{
|
||||||
|
"type" : "FIRE_IMMUNITY",
|
||||||
|
"subtype" : 0
|
||||||
|
},
|
||||||
"spellPower" :
|
"spellPower" :
|
||||||
{
|
{
|
||||||
"type" : "CREATURE_ENCHANT_POWER",
|
"type" : "CREATURE_ENCHANT_POWER",
|
||||||
|
@@ -289,12 +289,9 @@ bool CSpell::isImmuneBy(const IBonusBearer* obj) const
|
|||||||
|
|
||||||
auto battleTestElementalImmunity = [&,this](Bonus::BonusType element) -> bool
|
auto battleTestElementalImmunity = [&,this](Bonus::BonusType element) -> bool
|
||||||
{
|
{
|
||||||
if (isPositive())
|
if (obj->hasBonusOfType(element, 0)) //always resist if immune to all spells altogether
|
||||||
{
|
|
||||||
if (obj->hasBonusOfType(element, 0)) //must be immune to all spells
|
|
||||||
return true;
|
return true;
|
||||||
}
|
else if (!isPositive()) //negative or indifferent
|
||||||
else //negative or indifferent
|
|
||||||
{
|
{
|
||||||
if ((isDamageSpell() && obj->hasBonusOfType(element, 2)) || obj->hasBonusOfType(element, 1))
|
if ((isDamageSpell() && obj->hasBonusOfType(element, 2)) || obj->hasBonusOfType(element, 1))
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user