浏览代码

Yog will now receive Angelic Alliance in his campaign

Ivan Savenko 1 年之前
父节点
当前提交
709d05205d
共有 2 个文件被更改,包括 9 次插入0 次删除
  1. 1 0
      lib/constants/EntityIdentifiers.h
  2. 8 0
      lib/gameState/CGameStateCampaign.cpp

+ 1 - 0
lib/constants/EntityIdentifiers.h

@@ -648,6 +648,7 @@ public:
 		FIRST_AID_TENT = 6,
 		VIAL_OF_DRAGON_BLOOD = 127,
 		ARMAGEDDONS_BLADE = 128,
+		ANGELIC_ALLIANCE = 129,
 		TITANS_THUNDER = 135,
 		ART_SELECTION = 144,
 		ART_LOCK = 145, // FIXME: We must get rid of this one since it's conflict with artifact from mods. See issue 2455

+ 8 - 0
lib/gameState/CGameStateCampaign.cpp

@@ -485,6 +485,14 @@ void CGameStateCampaign::initHeroes()
 			}
 		}
 	}
+
+	auto campaignState = gameState->scenarioOps->campState;
+	auto * yog = gameState->getUsedHero(HeroTypeID::SOLMYR);
+	if (yog && boost::starts_with(campaignState->getFilename(), "DATA/YOG") && campaignState->currentScenario()->getNum() == 2)
+	{
+		assert(yog->isCampaignYog());
+		gameState->giveHeroArtifact(yog, ArtifactID::ANGELIC_ALLIANCE);
+	}
 }
 
 void CGameStateCampaign::initStartingResources()