소스 검색

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()