1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

* start map in campaign button is properly disabled/enabled (I hope)

* exported json for artifact bonuses; no limiters/propagators yet, so it's not used
* minor changes
This commit is contained in:
mateuszb
2012-09-26 18:10:29 +00:00
parent 4ceb6cd272
commit 8dca88c3c8
6 changed files with 3652 additions and 62 deletions

View File

@@ -606,6 +606,17 @@ void CArtHandler::addBonuses()
auto shooterOnlyLimiter = make_shared<HasAnotherBonusLimiter>(Bonus::SHOOTER);
auto dragonNatureLimiter = make_shared<HasAnotherBonusLimiter>(Bonus::DRAGON_NATURE);
// const JsonNode config(ResourceID("config/artifacts.json"));
// BOOST_FOREACH(const JsonNode &artifact, config.Vector())
// {
// auto ga = artifacts[artifact["id"].Float()].get();
//
// BOOST_FOREACH (auto b, artifact["bonuses"].Vector())
// {
// ga->addNewBonus(ParseBonus (b["bonus"].Vector()));
// }
// }
//Attack bonus artifacts (Weapons)
ART_PRIM_SKILL(7,0,+2); //Centaur Axe
ART_PRIM_SKILL(8,0,+3); //Blackshard of the Dead Knight
@@ -898,6 +909,22 @@ void CArtHandler::addBonuses()
giveArtBonus(151, Bonus::STACKS_SPEED, 1); //Boots of haste
ART_PRIM_SKILL (154, 0, +6); //Hardened Shield
}
// JsonNode cfg;
// BOOST_FOREACH(auto art, artifacts)
// {
// art->id;
// JsonNode jn;
// jn["id"].Float() = art->id;
// BOOST_FOREACH (auto b, art->getBonusList())
// {
// JsonNode bn;
// UnparseBonus(bn, b);
// jn["bonuses"].Vector().push_back(bn);
// }
// cfg.Vector().push_back(jn);
// }
// JsonWriter(std::ofstream("config/artifacts.json"), cfg);
}
void CArtHandler::clear()