Havens and Lasers
Posted: Fri Jan 27, 2017 2:40 pm
I was poking around at a few things and... well, I'll just leave this here--
(If I'm reading this right: chance of Haven volunteers being armed with lasers and mag weapons hinges primarily on volunteer level and requires the base tech (of course). If you have coilguns, the chance of lasers is 100%. Mag weapons are essentially guaranteed on any high-level volunteers once you hit Adv. Coilguns.)
Code: Select all
if (Loadout == '')
{
LoadoutStr = "RebelSoldier";
if (class'UIUtilities_Strategy'.static.GetXComHQ().IsTechResearched('MagnetizedWeapons'))
{
LaserChance += (20 * (Outpost.GetRebelLevel(RebelRef) + 1)); // 20/40/60
}
if (class'UIUtilities_Strategy'.static.GetXComHQ().IsTechResearched('GaussWeapons'))
{
LaserChance += (20 * (Outpost.GetRebelLevel(RebelRef) + 1)); // 40/80/100
}
if (class'UIUtilities_Strategy'.static.GetXComHQ().IsTechResearched('Coilguns'))
{
LaserChance = 100;
MagChance += (20 * (Outpost.GetRebelLevel(RebelRef) + 1)); //20/40/60
}
if (class'UIUtilities_Strategy'.static.GetXComHQ().IsTechResearched('AdvancedCoilguns'))
{
MagChance += (20 * (Outpost.GetRebelLevel(RebelRef) + 1)); //40/80/100
}
if (class'UIUtilities_Strategy'.static.GetXComHQ().IsTechResearched('PlasmaRifle'))
{
MagChance += (20 * (Outpost.GetRebelLevel(RebelRef) + 1)); //60/100/100
}
if ((class'Engine'.static.GetEngine().SyncRand(100,"Utilities_LW::"$GetFuncName())) < MagChance)
{
LoadoutStr $= "3";
}
else
{
if ((class'Engine'.static.GetEngine().SyncRand(100,"Utilities_LW::"$GetFuncName())) < LaserChance)
{
LoadoutStr $= "2";
}
}
iRand = (class'Engine'.static.GetEngine().SyncRand(100,"Utilities_LW::"$GetFuncName()));
if (iRand < 20)
{
LoadoutStr $= "SMG";
}
else
{
if (iRand < 40 && Outpost.GetRebelLevel(RebelRef) < 2)
{
LoadoutStr $= "Shotgun";
}
}
//`LWTRACE ("Rebel Loadout" @ LoadoutStr);
Loadout = name(LoadOutStr);
}