mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
- Drain Life now has % effect depending on bonus value
- Stack can use more than 2 attacks. Additional attacks can now be seperated as "ONLY_MELEE_FIGHT and "ONLY_DISTANCE_FIGHT".
This commit is contained in:
@@ -263,8 +263,6 @@ void CCreatureHandler::loadCreatures()
|
||||
ncre.addBonus(0, Bonus::SHOOTER);
|
||||
if(boost::algorithm::find_first(ncre.abilityRefs, "SIEGE_WEAPON"))
|
||||
ncre.addBonus(0, Bonus::SIEGE_WEAPON);
|
||||
if(boost::algorithm::find_first(ncre.abilityRefs, "const_two_attacks"))
|
||||
ncre.addBonus(1, Bonus::ADDITIONAL_ATTACK);
|
||||
if(boost::algorithm::find_first(ncre.abilityRefs, "const_free_attack"))
|
||||
ncre.addBonus(0, Bonus::BLOCKS_RETALIATION);
|
||||
if(boost::algorithm::find_first(ncre.abilityRefs, "IS_UNDEAD"))
|
||||
@@ -324,7 +322,10 @@ void CCreatureHandler::loadCreatures()
|
||||
}
|
||||
BOOST_FOREACH(const JsonNode &ability, node.second["abilities"].Vector())
|
||||
{
|
||||
AddAbility(c, ability.Vector());
|
||||
if (ability.getType() == JsonNode::DATA_VECTOR)
|
||||
AddAbility(c, ability.Vector());
|
||||
else
|
||||
c->addNewBonus(JsonUtils::parseBonus(ability));
|
||||
}
|
||||
|
||||
loadCreatureJson(c, node.second);
|
||||
|
||||
Reference in New Issue
Block a user