Skip to content

Instantly share code, notes, and snippets.

Created August 28, 2016 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/028f8c016463c22b1b31e0c25bd7c4b3 to your computer and use it in GitHub Desktop.
Save anonymous/028f8c016463c22b1b31e0c25bd7c4b3 to your computer and use it in GitHub Desktop.
Lord Varuun becomes more and more powerful each time he fights against an enemy hero.
firstLordVaruunConfrontationDone = 0;
secondLordVaruunConfrontationDone = 0;
mapVariables = {"shrineVisited", "shrineVisited2", "shrineVisited3",
"descriptionShown", "oldWeek", "homeReachedShown", "swampEntered", "badlandsEntered", "druidCircleLeftVisited", "druidCircleRightVisited","alchemistLabVisited",
"witchVisited", "windmillVisited", "hermitVisited", "woodHouseVisited", "woodHouse2Visited", "eyeVisited", "eye2Visited",
"towerVisited", "castleVisited", "graveyardVisited", "wellVisited", "campfireVisited", "campfire2Visited", "campfire3Visited",
"colosseumVisited",
"battleColosseumDone", "campfireComeback", "campfire2Comeback", "battleAlchemistDone", "firstWitchVisitDone", "firstLordVaruunConfrontationDone", "secondLordVaruunConfrontationDone"};
function OnBattleStart()
if BattleHasHero(0) and BattleHasHero(1) and GetHeroName(BattleGetHero(1)) == "Mystery Hero" then
MessageBox("Now we finally meet!");
end
if BattleHasHero(0) and BattleHasHero(1) and (GetHeroName(BattleGetHero(1)) == "Lord Varuun" or GetHeroName(BattleGetHero(0)) == "Lord Varuun") then
if firstLordVaruunConfrontationDone == 0 then
MessageBox("\"You are so foolish to confront me, ignorant that you are. Don't you know that the more I fight, the more I learn the skills of my opponents.\" And he laughs at you with a satanic laughter which almost chokes him, what he greatly appreciates.");
firstLordVaruunConfrontationDone = 1;
else
if secondLordVaruunConfrontationDone == 0 then
MessageBox("\"You don't seem to understand the power of my ability. Prepare yourself to die and continue to join my ranks!\"");
secondLordVaruunConfrontationDone = 1;
end
end
lord = GetHero(GetPlayer(1), 0);
if GetHeroName(BattleGetHero(0)) == "Lord Varuun" then
phero = BattleGetHero(1);
end
if GetHeroName(BattleGetHero(1)) == "Lord Varuun" then
phero = BattleGetHero(0);
end
-- Lord Varuun becomes more and more powerful each time he fights against an enemy hero.
-- If the player send a weak hero, Lord Varuun remains powerful.
-- And it can counteract, the player cheap tactic to send heroes, one after another, with the goal to reduce the undead army with powerful damage spells.
SetPrimarySkill(lord, PRIMARY_SKILL_ATTACK, (GetPrimarySkill(phero, PRIMARY_SKILL_ATTACK) + GetPrimarySkill(lord, PRIMARY_SKILL_ATTACK)));
SetPrimarySkill(lord, PRIMARY_SKILL_DEFENSE, (GetPrimarySkill(phero, PRIMARY_SKILL_DEFENSE) + GetPrimarySkill(lord, PRIMARY_SKILL_DEFENSE)));
SetPrimarySkill(lord, PRIMARY_SKILL_SPELLPOWER, (GetPrimarySkill(phero, PRIMARY_SKILL_SPELLPOWER) + GetPrimarySkill(lord, PRIMARY_SKILL_SPELLPOWER)));
SetPrimarySkill(lord, PRIMARY_SKILL_KNOWLEDGE, (GetPrimarySkill(phero, PRIMARY_SKILL_KNOWLEDGE) + GetPrimarySkill(lord, PRIMARY_SKILL_KNOWLEDGE)));
lordSkillArchery = GetSecondarySkill(lord, SECONDARY_SKILL_ARCHERY) + GetSecondarySkill(phero, SECONDARY_SKILL_ARCHERY);
if lordSkillArchery > 3 then
lordSkillArchery = 3;
end
lordSkillWisdom = GetSecondarySkill(lord, SECONDARY_SKILL_WISDOM) + GetSecondarySkill(phero, SECONDARY_SKILL_WISDOM);
if lordSkillWisdom > 3 then
lordSkillWisdom = 3;
end
lordSkillLeadership = GetSecondarySkill(lord, SECONDARY_SKILL_LEADERSHIP) + GetSecondarySkill(phero, SECONDARY_SKILL_LEADERSHIP);
if lordSkillLeadership > 3 then
lordSkillLeadership = 3;
end
lordSkillLuck = GetSecondarySkill(lord, SECONDARY_SKILL_LUCK) + GetSecondarySkill(phero, SECONDARY_SKILL_LUCK);
if lordSkillLuck > 3 then
lordSkillLuck = 3;
end
SetSecondarySkill(lord, SECONDARY_SKILL_ARCHERY, lordSkillArchery);
SetSecondarySkill(lord, SECONDARY_SKILL_LEADERSHIP, lordSkillLeadership);
SetSecondarySkill(lord, SECONDARY_SKILL_WISDOM, lordSkillWisdom);
SetSecondarySkill(lord, SECONDARY_SKILL_LUCK, lordSkillLuck);
SetSpellpoints(lord, (GetSpellpoints(phero) + GetSpellpoints(lord)));
end
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment