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

Merge pull request #4504 from Laserlicht/hota_bonus

disintegrate bonus
This commit is contained in:
Ivan Savenko 2024-08-28 14:00:11 +03:00 committed by GitHub
commit 8371232d29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 18 additions and 2 deletions

View File

@ -660,5 +660,7 @@
"core.bonus.WATER_IMMUNITY.name": "Water immunity",
"core.bonus.WATER_IMMUNITY.description": "Immune to all spells from the school of Water magic",
"core.bonus.WIDE_BREATH.name": "Wide breath",
"core.bonus.WIDE_BREATH.description": "Wide breath attack (multiple hexes)"
"core.bonus.WIDE_BREATH.description": "Wide breath attack (multiple hexes)",
"core.bonus.DISINTEGRATE.name": "Disintegrate",
"core.bonus.DISINTEGRATE.description": "No corpse remains after death"
}

View File

@ -591,6 +591,15 @@
{
"icon": "zvs/Lib1.res/MEGABREATH"
}
},
"DISINTEGRATE":
{
"graphics":
{
"icon": "zvs/Lib1.res/DISINTEGRATE"
}
}
}

View File

@ -1018,3 +1018,6 @@ Internal bonus, do not use
Internal bonus, do not use
### DISINTEGRATE
After death of unit no corpse remains

View File

@ -831,7 +831,8 @@ void CUnitState::damage(int64_t & amount)
health.damage(amount);
}
if(health.available() <= 0 && (cloned || summoned))
bool disintegrate = hasBonusOfType(BonusType::DISINTEGRATE);
if(health.available() <= 0 && (cloned || summoned || disintegrate))
ghostPending = true;
}

View File

@ -178,6 +178,7 @@ class JsonNode;
BONUS_NAME(REVENGE) /*additional damage based on how many units in stack died - formula: sqrt((number of creatures at battle start + 1) * creature health) / (total health now + 1 creature health) - 1) * 100% */ \
BONUS_NAME(RESOURCES_CONSTANT_BOOST) /*Bonus that does not account for propagation and gives extra resources per day. val - resource amount, subtype - resource type*/ \
BONUS_NAME(RESOURCES_TOWN_MULTIPLYING_BOOST) /*Bonus that does not account for propagation and gives extra resources per day with amount multiplied by number of owned towns. val - base resource amount to be multiplied times number of owned towns, subtype - resource type*/ \
BONUS_NAME(DISINTEGRATE) /* after death no corpse remains */ \
/* end of list */