Beispiel #1
0
    public override string ToolTip()
    {
        string numBuffs = "";

        if (this.NumberOfBuffs() > 0)
        {
            numBuffs = "\n" + GetBuffsString() + "\n";
        }
        else
        {
            numBuffs = "";
        }

        string moreStats = "";

        if (this.MoveSpeedBuff > 0 || this.DamageBlocked > 0)
        {
            if (this.MoveSpeedBuff > 0)
            {
                moreStats += "\n" + "+ " + (MoveSpeedBuff * 100).ToString("0") + "% Move Speed";
            }
            if (this.DamageBlocked > 0)
            {
                moreStats += "\n" + "Gives " + (ChanceToBlock * 100).ToString("0") + "% Chance to block " + DamageBlocked + " damage.";
            }
        }

        string socketBuffs = "";

        if (EquippedSockets.Count > 0)
        {
            socketBuffs += "\n \n" + "(" + UsedSockets.ToString() + ") Sockets: \n";
        }
        foreach (SocketItem socket in EquippedSockets)
        {
            socketBuffs += socket.GetBuffsString();
        }
        socketBuffs += "\n";


        return(ArmorAmt + " Armor" + "\n" +
               numBuffs +
               socketBuffs +
               moreStats);
    }
Beispiel #2
0
    public override string ToolTip()
    {
        //string minDPS = ((int)(AttackSpeed * (MaxDamage*DmgVariance))).ToString ();
        //string maxDPS = ((int)(AttackSpeed * MaxDamage)).ToString ();

        string numBuffs = "";

        if (this.NumberOfBuffs() > 0)
        {
            numBuffs = "\n" + GetBuffsString();
        }
        else
        {
            numBuffs = "";
        }


        //Format wording of proc correctly
        string procDesc = "";

        switch (Proc)
        {
        case ProcType.GainLifeOnHit:
            procDesc = "\n" + string.Format("Gain {0} health per physical attack", ProcModifier);
            break;

        case ProcType.GainManaOnHit:
            procDesc = "\n" + string.Format("Gain {0} mana per physical attack", ProcModifier);
            break;

        case ProcType.Knockback:
            procDesc = "\n" + string.Format("Has a {0}% chance to cause knockback", (ProcModifier * 100).ToString("F2"));
            break;

        case ProcType.None:
            break;

        case ProcType.Poison:
            procDesc = "\n" + string.Format("Has a {0}% chance to cause poison", (ProcModifier * 100).ToString("F2"));
            break;

        case ProcType.Slow:
            procDesc = "\n" + string.Format("Has a {0}% chance to slow targets attack speed", (ProcModifier * 100).ToString("F2"));
            break;

        case ProcType.ConvertToLife:
            procDesc = "\n" + string.Format("Converts {0}% of damage dealth to health", (ProcModifier * 100).ToString("F2"));
            break;

        case ProcType.ConvertToMana:
            procDesc = "\n" + string.Format("Converts {0}% of damage dealth to mana.", (ProcModifier * 100).ToString("F2"));
            break;

        case ProcType.Stun:
            procDesc = "\n" + string.Format("Has a {0}% chance to stun your target", (ProcModifier * 100).ToString("F2"));
            break;

        case ProcType.GainEnergyOnHit:
            procDesc = "\n" + string.Format("Gain {0} energy per physical attack", ProcModifier.ToString("0.00"));
            break;

        case ProcType.ConvertToEnergy:
            procDesc = "\n" + string.Format("Converts {0}% of damage dealth to energy", (ProcModifier * 100).ToString("F2"));
            break;
        }

        string moreStats = "";

        if (this.Proc != ProcType.None || this.CritChance != 0 || this.CritDamage > 0.0f)
        {
            if (this.CritChance != 0)
            {
                moreStats += "\n" + "+ " + (CritChance * 100).ToString("0") + "% Critical Hit Chance";
            }
            if (this.CritDamage > 0.0f)
            {
                moreStats += "\n" + "Critical hits deal " + ((2.0 + CritDamage) * 100).ToString("0") + "% damage";
            }
            if (this.Proc != ProcType.None)
            {
                moreStats += procDesc;
            }
        }
        string elementalDmg = "";

        if (this.DmgValue != 0)
        {
            elementalDmg += "+ " + DmgValue + " " + DmgType.ToString() + " damage" + "\n";
        }

        string socketBuffs = "";

        if (EquippedSockets.Count > 0)
        {
            socketBuffs += "\n \n" + "(" + UsedSockets.ToString() + ") Sockets: \n";
        }
        foreach (SocketItem socket in EquippedSockets)
        {
            socketBuffs += socket.GetBuffsString();
        }
        socketBuffs += "\n";

        //Set correct tooltype to corresponding type
        return("Damage: " + (int)(MaxDamage * DmgVariance) + " - " + MaxDamage + "\n" +
               elementalDmg +
               "(DPS: " + MinDPS.ToString() + "-" + MaxDPS.ToString() + ")" + "\n" +
               "Attacks Per Second: " + AttackSpeed.ToString("0.00") +
               numBuffs +
               socketBuffs +
               moreStats);
    }