public InstantKill Clone() { InstantKill instantKill = new InstantKill(); instantKill.chance = chance; instantKill.HPThreshold = HPThreshold; return(instantKill); }
public static InstantKill GetTowerInstantKillMultiplier(int prefabID) { if (instance == null) { return(new InstantKill(0, 0)); } InstantKill killG = instance.globalTowerModifier.stats.instantKill; InstantKill killT = GetTowerModifier(prefabID).stats.instantKill; return(new InstantKill(killG.chance + killT.chance, killG.HPThreshold + killT.HPThreshold)); }
public UnitStat() { stun = new Stun(); crit = new Critical(); slow = new Slow(); dot = new Dot(); instantKill = new InstantKill(); buff = new Buff(); //if(shootObjects == null) //{ // shootObjects = new List<ShootObject>(); // shootObjects.Add(null); //} }
public static InstantKill ModifyInstantKillWithPerkBonus(InstantKill instKill, int prefabID, int type = 0) { InstantKill ikMod = new InstantKill(); if (type == 0) { ikMod = GetTowerInstantKillMultiplier(prefabID); } else if (type == 1) { ikMod = GetFPSWeaponInstantKillMultiplier(prefabID); } instKill.chance *= (1 + ikMod.chance); instKill.HPThreshold *= (1 + ikMod.HPThreshold); return(instKill); }