TrueTensei Posted April 29, 2014 Share Posted April 29, 2014 Hi I've sucessfully modded my perk tree to give my soldiers psi lance but I was wondering if there was a alter the damage it does? I've tried to find it's damage values but I'm having trouble. Link to comment Share on other sites More sharing options...
Amineri Posted April 29, 2014 Share Posted April 29, 2014 There's a special function XGTacticalGameCore.CalcPsiLanceDamage used just to compute this : function int CalcPsiLanceDamage(XGUnit kAttacker, XGUnit kVictim) { local int iDamage, iWillMods, iFinalWill, iAttackerWill; if((kAttacker != none) && kVictim != none) { if(kVictim.m_bInCombatDrugs) { iWillMods = 20; } iWillMods += (kVictim.GetBattleFatigueWillPenalty() + kVictim.GetFallenComradesWillPenalty()); kVictim.WillTestChance(0, iWillMods, true, true, kAttacker,, iFinalWill); iAttackerWill = kAttacker.GetWill() - 20; iDamage = 7; if(iFinalWill > iAttackerWill) { iDamage -= ((iFinalWill - iAttackerWill) / 10); } else { if(iAttackerWill > iFinalWill) { iDamage += ((iAttackerWill - iFinalWill) / 10); } } if(iDamage > 20) { iDamage = 20; } else { // End:0x1C2 if(iDamage < 2) { iDamage = 2; } } } return iDamage; //return ReturnValue; } Base damage is 7, with +1 for each full 10 points of will the attacker has over the defender, and -1 for each full 10 points of will the defender has over the attacker. Then clamped to be no less than 2 and no more than 20. The attacker gets a -20 Will penalty, apparently, though. Psi Lance is basically the "gun" for Ethereals, and follows all of the normal to-hit rules (cover, tactical sense, smoke, etc). Link to comment Share on other sites More sharing options...
Recommended Posts