Jump to content

Changing the Damage of Psi Lance


TrueTensei

Recommended Posts

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...