mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Minor fixes
This commit is contained in:
parent
f8b8ab0965
commit
099109b7d2
@ -663,10 +663,8 @@ void CGameState::initDifficulty()
|
||||
logGlobal->debug("\tLoading difficulty settings");
|
||||
const JsonNode config(JsonPath::builtin("config/difficulty.json"));
|
||||
|
||||
const JsonVector &vector = config["battleBonus"].Vector();
|
||||
const JsonNode &level = vector[scenarioOps->difficulty];
|
||||
const JsonNode & difficultyAI(level["ai"][GameConstants::DIFFICULTY_NAMES[scenarioOps->difficulty]]);
|
||||
const JsonNode & difficultyHuman(level["human"][GameConstants::DIFFICULTY_NAMES[scenarioOps->difficulty]]);
|
||||
const JsonNode & difficultyAI(config["ai"][GameConstants::DIFFICULTY_NAMES[scenarioOps->difficulty]]);
|
||||
const JsonNode & difficultyHuman(config["human"][GameConstants::DIFFICULTY_NAMES[scenarioOps->difficulty]]);
|
||||
|
||||
auto setDifficulty = [](PlayerState & state, const JsonNode & json)
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ void BattleProcessor::startBattlePrimary(const CArmedInstance *army1, const CArm
|
||||
|
||||
//add battle bonuses based from player state only when attacks neutral creatures
|
||||
const auto * attackerInfo = gameHandler->getPlayerState(army1->getOwner(), false);
|
||||
if(attackerInfo && army2->getOwner() == PlayerColor::NEUTRAL)
|
||||
if(attackerInfo && !army2->getOwner().isValidPlayer())
|
||||
{
|
||||
for(auto bonus : attackerInfo->battleBonuses)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user