1
0
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:
DjWarmonger
2013-02-08 09:22:10 +00:00
parent 043c7c52a3
commit 140786a04b
8 changed files with 63 additions and 49 deletions

View File

@@ -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);