mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
Add TRANSMUTATION_IMMUNITY bonus
This commit is contained in:
@@ -191,6 +191,7 @@ class JsonNode;
|
||||
BONUS_NAME(STACK_EXPERIENCE_GAIN_PERCENT) /*modifies all stack experience gains*/\
|
||||
BONUS_NAME(FULL_MAP_SCOUTING) /*Skyship*/\
|
||||
BONUS_NAME(FULL_MAP_DARKNESS) /*opposite to Skyship*/\
|
||||
BONUS_NAME(TRANSMUTATION_IMMUNITY) /*blocks TRANSMUTATION bonus*/\
|
||||
/* end of list */
|
||||
|
||||
|
||||
|
@@ -1341,7 +1341,7 @@ void BattleActionProcessor::handleAfterAttackCasting(const CBattleInfoCallback &
|
||||
if(!defender->alive())
|
||||
return;
|
||||
|
||||
if(attacker->hasBonusOfType(BonusType::TRANSMUTATION) && defender->isLiving()) //transmutation mechanics, similar to WoG werewolf ability
|
||||
if(attacker->hasBonusOfType(BonusType::TRANSMUTATION) && defender->isLiving() && !defender->hasBonusOfType(BonusType::TRANSMUTATION_IMMUNITY)) //transmutation mechanics, similar to WoG werewolf ability
|
||||
{
|
||||
int chanceToTrigger = attacker->valOfBonuses(BonusType::TRANSMUTATION);
|
||||
if (!gameHandler->randomizer->rollCombatAbility(ownerArmy, chanceToTrigger))
|
||||
|
Reference in New Issue
Block a user