Skip to content

Commit

Permalink
Fix blueprint name on podium
Browse files Browse the repository at this point in the history
  • Loading branch information
clementgallet committed Jun 20, 2020
1 parent 59b72e5 commit 95a7952
Showing 1 changed file with 48 additions and 7 deletions.
55 changes: 48 additions & 7 deletions SWD2Randomizer/Patcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public void PatchAll()
PatchHook();
PatchTriple();
PatchOasis();
PatchBlueprints();
}

/* Make the ignition axe effective against Priest Glorious */
Expand All @@ -33,7 +34,7 @@ public void PatchPriest()
{
doc.Load(damageTypePatch);
}
catch (Exception e)
catch (Exception)
{
Console.WriteLine("caught exception");
}
Expand All @@ -56,7 +57,7 @@ public void PatchHook()
{
doc.Load(hubPatch);
}
catch (Exception e)
catch (Exception)
{
Console.WriteLine("caught exception");
}
Expand All @@ -82,7 +83,7 @@ public void PatchOasis()
{
doc.Load(hubPatch);
}
catch (Exception e)
catch (Exception)
{
Console.WriteLine("caught exception");
}
Expand All @@ -103,7 +104,7 @@ public void PatchOasis()
{
doc.Load(quests);
}
catch (Exception e)
catch (Exception)
{
Console.WriteLine("caught exception");
}
Expand Down Expand Up @@ -134,7 +135,7 @@ public void PatchTriple()
{
doc.Load(priceList);
}
catch (Exception e)
catch (Exception)
{
Console.WriteLine("caught exception");
}
Expand All @@ -157,7 +158,7 @@ public void PatchIntro()
{
doc.Load(quests);
}
catch (Exception e)
catch (Exception)
{
Console.WriteLine("caught exception");
}
Expand Down Expand Up @@ -185,7 +186,7 @@ public void PatchIntro()
{
doc.Load(introPatch);
}
catch (Exception e)
catch (Exception)
{
Console.WriteLine("caught exception");
}
Expand Down Expand Up @@ -337,6 +338,46 @@ public void PatchIntro()
doc.Save(introPatch);
}

/* Lower the price of triple grenade blueprint */
public void PatchBlueprints()
{
string upgradeList = Path.Combine(baseDir, "Definitions", "upgrades.xml");

XmlDocument doc = new XmlDocument();
try
{
doc.Load(upgradeList);
}
catch (Exception)
{
Console.WriteLine("caught exception");
}

XmlNode blueprint = doc.SelectSingleNode("//Upgrade[@Name='fate.bloodquest']");

XmlNode name = doc.CreateNode(XmlNodeType.Element, "CategoryStringId", null);
name.InnerText = "upgrade_fate_bloodquest";
blueprint.AppendChild(name);

blueprint = doc.SelectSingleNode("//Upgrade[@Name='fate.xpx2']");

name = doc.CreateNode(XmlNodeType.Element, "CategoryStringId", null);
name.InnerText = "upgrade_fate_xpx2";
blueprint.AppendChild(name);

blueprint = doc.SelectSingleNode("//Upgrade[@Name='fate.explosions']");

name = doc.CreateNode(XmlNodeType.Element, "CategoryStringId", null);
name.InnerText = "upgrade_fate_explosions";
blueprint.AppendChild(name);

blueprint = doc.SelectSingleNode("//Upgrade[@Name='pressurebomb.launcher_triple']");

name = doc.CreateNode(XmlNodeType.Element, "CategoryStringId", null);
name.InnerText = "upgrade_pressurebomb_launcher_triple";
blueprint.AppendChild(name);

doc.Save(upgradeList);
}
}
}

0 comments on commit 95a7952

Please sign in to comment.