示例#1
0
        public string GetDespStats()
        {
            //return "";

            if (stats[currentActiveStat].useCustomDesp)
            {
                return(stats[currentActiveStat].desp);
            }

            string text = "";

            if (type == _TowerType.Turret || type == _TowerType.AOE || type == _TowerType.Mine)
            {
                float currentDmgMin = GetDamageMin();
                float currentDmgMax = GetDamageMax();
                if (currentDmgMax > 0)
                {
                    if (currentDmgMin == currentDmgMax)
                    {
                        text += "Damage:		 "+ currentDmgMax.ToString("f0");
                    }
                    else
                    {
                        text += "Damage:		 "+ currentDmgMin.ToString("f0") + "-" + currentDmgMax.ToString("f0");
                    }
                }

                float currentAOE = GetAOERadius();
                if (currentAOE > 0)
                {
                    text += " (AOE)";
                }
                //if(currentAOE>0) text+="\nAOE Radius: "+currentAOE;

                if (type != _TowerType.Mine)
                {
                    float currentCD = GetCooldown();
                    if (currentCD > 0)
                    {
                        text += "\nCooldown:	 "+ currentCD.ToString("f1") + "s";
                    }
                }

                //~ float critChance=GetCritChance();
                //~ if(critChance>0) text+="\nCritical:		 "+(critChance*100).ToString("f0")+"%";



                if (text != "")
                {
                    text += "\n";
                }

                if (GetCritChance() > 0)
                {
                    text += "\n" + (GetCritChance() * 100).ToString("f0") + "% Chance to score critical hit";
                }

                Stun stun = GetStun();
                if (stun.IsValid())
                {
                    text += "\n" + (stun.chance * 100).ToString("f0") + "% Chance to stuns target";
                }

                Slow slow = GetSlow();
                if (slow.IsValid())
                {
                    text += "\nSlows target for " + slow.duration.ToString("f1") + " seconds";
                }

                Dot   dot    = GetDot();
                float dotDmg = dot.GetTotalDamage();
                if (dotDmg > 0)
                {
                    text += "\nDamage target by " + dotDmg.ToString("f0") + " over " + dot.duration.ToString("f0") + "s";
                }

                if (DamageShieldOnly())
                {
                    text += "\nDamage target's shield only";
                }
                if (GetShieldBreak() > 0)
                {
                    text += "\n" + (GetShieldBreak() * 100).ToString("f0") + "% Chance to break shield";
                }
                if (GetShieldPierce() > 0)
                {
                    text += "\n" + (GetShieldPierce() * 100).ToString("f0") + "% Chance to pierce shield";
                }

                InstantKill instKill = GetInstantKill();
                if (instKill.IsValid())
                {
                    text += "\n" + (instKill.chance * 100).ToString("f0") + "% Chance to kill target instantly";
                }
            }
            else if (type == _TowerType.Support)
            {
                Buff buff = GetBuff();

                if (buff.damageBuff > 0)
                {
                    text += "Damage Buff: " + ((buff.damageBuff) * 100).ToString("f0") + "%";
                }
                if (buff.cooldownBuff > 0)
                {
                    text += "\nCooldown Buff: " + ((buff.cooldownBuff) * 100).ToString("f0") + "%";
                }
                if (buff.rangeBuff > 0)
                {
                    text += "\nRange Buff: " + ((buff.rangeBuff) * 100).ToString("f0") + "%";
                }
                if (buff.criticalBuff > 0)
                {
                    text += "\nRange Buff: " + ((buff.criticalBuff) * 100).ToString("f0") + "%";
                }
                if (buff.hitBuff > 0)
                {
                    text += "\nHit Buff: " + ((buff.hitBuff) * 100).ToString("f0") + "%";
                }
                if (buff.dodgeBuff > 0)
                {
                    text += "\nDodge Buff: " + ((buff.dodgeBuff) * 100).ToString("f0") + "%";
                }

                if (text != "")
                {
                    text += "\n";
                }

                if (buff.regenHP > 0)
                {
                    float regenValue    = buff.regenHP;
                    float regenDuration = 1;
                    if (buff.regenHP < 1)
                    {
                        regenValue    = 1;
                        regenDuration = 1 / buff.regenHP;
                    }
                    text += "\nRegen " + regenValue.ToString("f0") + "HP every " + regenDuration.ToString("f0") + "s";
                }
            }
            else if (type == _TowerType.Resource)
            {
                text += "Regenerate resource overtime";
            }

            return(text);
        }
示例#2
0
文件: Unit.cs 项目: tscheipel/BEER
        public string GetDespStats()
        {
            if (!IsTower() || stats[currentActiveStat].useCustomDesp)
            {
                return(stats[currentActiveStat].desp);
            }

            UnitTower tower = unitT;

            string text = "";

            if (tower.type == _TowerType.Turret || tower.type == _TowerType.AOE)
            {
                float currentDmgMin = GetDamageMin();
                float currentDmgMax = GetDamageMax();
                if (currentDmgMax > 0)
                {
                    if (currentDmgMin == currentDmgMax)
                    {
                        text += "Damage:		 "+ currentDmgMax.ToString("f0");
                    }
                    else
                    {
                        text += "Damage:		 "+ currentDmgMin.ToString("f0") + "-" + currentDmgMax.ToString("f0");
                    }
                }

                float currentAOE = GetAOERadius();
                if (currentAOE > 0)
                {
                    text += " (AOE)";
                }
                //if(currentAOE>0) text+="\nAOE Radius: "+currentAOE;

                float critChance = GetCritChance();
                if (critChance > 0)
                {
                    text += "\nCritical:		 "+ (critChance * 100).ToString("f0") + "%";
                }

                if (text != "")
                {
                    text += "\n";
                }

                Stun stun = GetStun();
                if (stun.IsValid())
                {
                    text += "\nChance to stuns target";
                }

                Slow slow = GetSlow();
                if (slow.IsValid())
                {
                    text += "\nSlows target";
                }

                Dot   dot    = GetDot();
                float dotDmg = dot.GetTotalDamage();
                if (dotDmg > 0)
                {
                    text += "\nDamage " + dotDmg.ToString("f0") + " over " + dot.duration.ToString("f0") + "sec";
                }
            }
            else if (tower.type == _TowerType.Support)
            {
                Buff buff = GetBuff();

                if (buff.damageBuff > 0)
                {
                    text += "Damage Buff: " + ((buff.damageBuff) * 100).ToString("f0") + "%";
                }
                if (buff.cooldownBuff > 0)
                {
                    text += "\nCooldown Buff: " + ((buff.cooldownBuff) * 100).ToString("f0") + "%";
                }
                if (buff.rangeBuff > 0)
                {
                    text += "\nRange Buff: " + ((buff.rangeBuff) * 100).ToString("f0") + "%";
                }
                if (buff.criticalBuff > 0)
                {
                    text += "\nRange Buff: " + ((buff.criticalBuff) * 100).ToString("f0") + "%";
                }

                if (text != "")
                {
                    text += "\n";
                }

                if (buff.regenHP > 0)
                {
                    float regenValue    = buff.regenHP;
                    float regenDuration = 1;
                    if (buff.regenHP < 1)
                    {
                        regenValue    = 1;
                        regenDuration = 1 / buff.regenHP;
                    }
                    text += "\nRegen " + regenValue.ToString("f0") + "HP every " + regenDuration.ToString("f0") + "s";
                }
            }
            else if (tower.type == _TowerType.Electric)
            {
                if (GetMaxElectricity() > 0)
                {
                    text += "Max electricity stored: " + GetMaxElectricity().ToString();
                }
                if (GetElectricityRegenerationRate() > 0)
                {
                    text += "\nElectricity generated: " + GetElectricityRegenerationRate().ToString() + " per sec";
                }
                if (GetElectricityReceiveRate() > 0)
                {
                    text += "\nElectricity Transfer Rate: " + GetElectricityReceiveRate().ToString();
                }
                if (GetCurrentElectricity() > 0)
                {
                    text += "\nElectricity available: " + GetCurrentElectricity().ToString();
                }
            }

            return(text);
        }
示例#3
0
        public string GetDespStats()
        {
            if (!IsTower() || stats[currentActiveStat].useCustomDesp)
            {
                return(stats[currentActiveStat].desp);
            }

            UnitTower tower = unitT;

            string text = "";

            if (tower.type == _TowerType.Turret || tower.type == _TowerType.AOE)
            {
                float currentDmgMin = GetDamageMin();
                float currentDmgMax = GetDamageMax();
                if (currentDmgMax > 0)
                {
                    if (currentDmgMin == currentDmgMax)
                    {
                        text += "데미지:		 "+ currentDmgMax.ToString("f0");
                    }
                    else
                    {
                        text += "데미지:		 "+ currentDmgMin.ToString("f0") + "-" + currentDmgMax.ToString("f0");
                    }
                }

                float currentAOE = GetAOERadius();
                if (currentAOE > 0)
                {
                    text += " (범위공격)";
                }
                //if(currentAOE>0) text+="\nAOE Radius: "+currentAOE;

                float critChance = GetCritChance();
                if (critChance > 0)
                {
                    text += "\n크리티컬:		 "+ (critChance * 100).ToString("f0") + "%";
                }

                if (text != "")
                {
                    text += "\n";
                }

                Stun stun = GetStun();
                if (stun.IsValid())
                {
                    text += "\n기절 확률";
                }

                Slow slow = GetSlow();
                if (slow.IsValid())
                {
                    text += "\n대상 둔화";
                }

                Dot   dot    = GetDot();
                float dotDmg = dot.GetTotalDamage();
                //if(dotDmg>0) text+="\n발사 "+dotDmg.ToString("f0")+" 안에 "+dot.duration.ToString("f0")+"초";
            }
            else if (tower.type == _TowerType.Support)
            {
                Buff buff = GetBuff();

                if (buff.damageBuff > 0)
                {
                    text += "데미지 버프: " + ((buff.damageBuff) * 100).ToString("f0") + "%";
                }
                if (buff.cooldownBuff > 0)
                {
                    text += "\n쿨타임 버프: " + ((buff.cooldownBuff) * 100).ToString("f0") + "%";
                }
                if (buff.rangeBuff > 0)
                {
                    text += "\n범위 버프: " + ((buff.rangeBuff) * 100).ToString("f0") + "%";
                }
                if (buff.criticalBuff > 0)
                {
                    text += "\n범위 버프: " + ((buff.criticalBuff) * 100).ToString("f0") + "%";
                }

                if (text != "")
                {
                    text += "\n";
                }

                if (buff.regenHP > 0)
                {
                    float regenValue    = buff.regenHP;
                    float regenDuration = 1;
                    if (buff.regenHP < 1)
                    {
                        regenValue    = 1;
                        regenDuration = 1 / buff.regenHP;
                    }
                    text += "\nRegen " + regenValue.ToString("f0") + "HP every " + regenDuration.ToString("f0") + "s";
                }
            }

            return(text);
        }
示例#4
0
        public string GetDespStats()
        {
            if (!IsTower() || stats[currentActiveStat].useCustomDesp)
            {
                return(stats[currentActiveStat].desp);
            }

            UnitTower tower = unitT;

            string text = "";

            if (tower.type == _TowerType.Turret || tower.type == _TowerType.AOE || tower.type == _TowerType.Mine)
            {
                float currentDmgMin = GetDamageMin();
                float currentDmgMax = GetDamageMax();
                if (currentDmgMax > 0)
                {
                    if (currentDmgMin == currentDmgMax)
                    {
                        text += "Damage:		 "+ currentDmgMax.ToString("f0");
                    }
                    else
                    {
                        text += "Damage:		 "+ currentDmgMin.ToString("f0") + "-" + currentDmgMax.ToString("f0");
                    }
                }

                float currentAOE = GetAOERadius();
                if (currentAOE > 0)
                {
                    text += " (AOE)";
                }

                if (tower.type != _TowerType.Mine)
                {
                    float currentCD = GetCooldown();
                    if (currentCD > 0)
                    {
                        text += "\nCooldown:	 "+ currentCD.ToString("f1") + "s";
                    }
                }

                float critChance = GetCritChance();
                if (critChance > 0)
                {
                    text += "\nCritical:		 "+ (critChance * 100).ToString("f0") + "%";
                }

                if (text != "")
                {
                    text += "\n";
                }

                Stun stun = GetStun();
                if (stun.IsValid())
                {
                    text += "\nChance to stuns target";
                }

                Slow slow = GetSlow();
                if (slow.IsValid())
                {
                    text += "\nSlows target";
                }

                Dot   dot    = GetDot();
                float dotDmg = dot.GetTotalDamage();
                if (dotDmg > 0)
                {
                    text += "\nDeal " + dotDmg.ToString("f0") + " over " + dot.duration.ToString("f0") + "s";
                }
            }
            else if (tower.type == _TowerType.Support)
            {
                Buff buff = GetBuff();

                if (buff.damageBuff > 0)
                {
                    text += "Damage Buff: " + ((buff.damageBuff) * 100).ToString("f0") + "%";
                }
                if (buff.cooldownBuff > 0)
                {
                    text += "\nCooldown Buff: " + ((buff.cooldownBuff) * 100).ToString("f0") + "%";
                }
                if (buff.rangeBuff > 0)
                {
                    text += "\nRange Buff: " + ((buff.rangeBuff) * 100).ToString("f0") + "%";
                }
                if (buff.criticalBuff > 0)
                {
                    text += "\nRange Buff: " + ((buff.criticalBuff) * 100).ToString("f0") + "%";
                }
                if (text != "")
                {
                    text += "\n";
                }

                if (buff.regenHP > 0)
                {
                    float regenValue    = buff.regenHP;
                    float regenDuration = 1;
                    if (buff.regenHP < 1)
                    {
                        regenValue    = 1;
                        regenDuration = 1 / buff.regenHP;
                    }
                    text += "\nRegen " + regenValue.ToString("f0") + "HP every " + regenDuration.ToString("f0") + "s";
                }
            }
            else if (tower.type == _TowerType.Resource)
            {
                text += "Regenerate resource overtime";
            }

            return(text);
        }