Ejemplo n.º 1
0
        public InstantKill Clone()
        {
            InstantKill instantKill = new InstantKill();

            instantKill.chance      = chance;
            instantKill.HPThreshold = HPThreshold;
            return(instantKill);
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
 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);
     //}
 }
Ejemplo n.º 4
0
        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);
        }