Exemple #1
4
 //Called by Equipment.cs, for when the player is using their fist
 public Item(int ID, string name, string desc, ItemType itemType, int dmg, float crtChnce, AttackSpeed attspd, Range range, Knockback knockback, WeaponType weaponType)
 {
     this.itemID = ID;
     this.itemName = name;
     this.itemDesc = desc;
     this.itemType = itemType;
     this.damage = dmg;
     this.criticalChance = crtChnce;
     this.attackSpeed = attspd;
     this.range = range;
     this.knockback = knockback;
     this.weaponType = weaponType;
     this.damageMitigation = 0;
     this.defense = 0;
     this.sigil = null;
 }
Exemple #2
0
            public static string Execute(params string[] args)
            {
                float AttackSpeed;

                DaggerfallWorkshop.DaggerfallUnity daggerfallUnity = DaggerfallWorkshop.DaggerfallUnity.Instance;

                if (daggerfallUnity == null)
                {
                    return(error);
                }

                if (args == null || args.Length < 1)
                {
                    return("true or false");
                }
                else if (!float.TryParse(args[0], out AttackSpeed))
                {
                    return(error);
                }
                else
                {
                    try
                    {
                        changeAttackSpeed = AttackSpeed;
                        return(string.Format("trigger set to:" + AttackSpeed.ToString()));
                    }
                    catch
                    {
                        return("Unspecified error; failed to set lerp");
                    }
                }
            }
Exemple #3
0
            private AttackSpeed FromStringToAttackSpeed(string str)
            {
                AttackSpeed speed = AttackSpeed.Slow;

                switch (str)
                {
                case "":
                case "慢速":
                    speed = AttackSpeed.Slow;
                    break;

                case "中速":
                    speed = AttackSpeed.Medium;
                    break;

                case "快速":
                    speed = AttackSpeed.Fast;
                    break;

                case "极快":
                    speed = AttackSpeed.VeryFast;
                    break;
                }

                return(speed);
            }
    void Update()
    {
        if (DamageCounter > 0)
        {
            Damage.SetActive(true);
        }
        else
        {
            Damage.SetActive(false);
        }

        if (AttackCounter > 0)
        {
            AttackSpeed.SetActive(true);
        }
        else
        {
            AttackSpeed.SetActive(false);
        }

        if (MovementCounter > 0)
        {
            MovementSpeed.SetActive(true);
        }
        else
        {
            MovementSpeed.SetActive(false);
        }
    }
Exemple #5
0
 /// <summary>
 /// Notifies other players, that player changed attack/move speed.
 /// </summary>
 private void Character_OnAttackOrMoveChanged(int senderId, AttackSpeed attack, MoveSpeed move)
 {
     foreach (var player in GetAllPlayers(true))
     {
         Map.PacketFactory.SendAttackAndMovementSpeed(player.GameSession.Client, senderId, attack, move);
     }
 }
Exemple #6
0
 void Start()
 {
     _attackSpeed = GameObject.Find("AttackSpeed(Clone)").GetComponent <AttackSpeed>();
     if (frameNum != 0)
     {
         this.enabled = false;
     }
 }
Exemple #7
0
        // Add calculated values to the values dictionary.
        // These values are then available for display via the CharacterDisplayCalculationLabels
        // member defined in CalculationsRetribution.cs
        // While possible, there's little reason to add values to the dictionary that are not being
        // used by the CharacterDisplayCalculationLabels.
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            // Status text
            dictValues["Status"] = string.Format("{0} dps", DPSPoints.ToString("N0"));

            // Basic stats
            dictValues["Health"]        = BasicStats.Health.ToString("N0");
            dictValues["Mana"]          = BasicStats.Mana.ToString("N0");
            dictValues["Strength"]      = BasicStats.Strength.ToString("N0");
            dictValues["Agility"]       = string.Format("{0:0}", BasicStats.Agility);
            dictValues["Attack Power"]  = BasicStats.AttackPower.ToString("N0");
            dictValues["Crit Chance"]   = string.Format("{0:P}*{1:0} crit rating", BasicStats.PhysicalCrit, BasicStats.CritRating);
            dictValues["Miss Chance"]   = string.Format("{0:P}*{1:P} hit ({2:0} rating)\n", ToMiss, BasicStats.PhysicalHit, BasicStats.HitRating);
            dictValues["Dodge Chance"]  = string.Format("{0:P}*{1:P} expertise ({2:0} rating)", ToBeDodged, BasicStats.Expertise * .0025f, BasicStats.ExpertiseRating);
            dictValues["Melee Haste"]   = string.Format("{0:P}*{1:0} haste rating", BasicStats.PhysicalHaste, BasicStats.HasteRating);
            dictValues["Weapon Damage"] = WeaponDamage.ToString("N2");
            dictValues["Attack Speed"]  = AttackSpeed.ToString("N2");

            // DPS Breakdown
            dictValues["Total DPS"]         = OverallPoints.ToString("N0");
            dictValues["White"]             = string.Format("{0}*{1}", WhiteDPS.ToString("N0"), WhiteSkill.ToString());
            dictValues["Seal"]              = string.Format("{0}*{1}", SealDPS.ToString("N0"), SealSkill.ToString());
            dictValues["Crusader Strike"]   = string.Format("{0}*{1}", CrusaderStrikeDPS.ToString("N0"), CrusaderStrikeSkill.ToString());
            dictValues["Judgement"]         = string.Format("{0}*{1}", JudgementDPS.ToString("N0"), JudgementSkill.ToString());
            dictValues["Consecration"]      = string.Format("{0}*{1}", ConsecrationDPS.ToString("N0"), ConsecrationSkill.ToString());
            dictValues["Exorcism"]          = string.Format("{0}*{1}", ExorcismDPS.ToString("N0"), ExorcismSkill.ToString());
            dictValues["Divine Storm"]      = string.Format("{0}*{1}", DivineStormDPS.ToString("N0"), DivineStormSkill.ToString());
            dictValues["Hammer of Wrath"]   = string.Format("{0}*{1}", HammerOfWrathDPS.ToString("N0"), HammerOfWrathSkill.ToString());
            dictValues["Hand of Reckoning"] = string.Format("{0}*{1}", HandOfReckoningDPS.ToString("N0"), HandOfReckoningSkill.ToString());
            dictValues["Other"]             = OtherDPS.ToString("N0");

            // Rotation Info:
            dictValues["Chosen Rotation"] = Rotation == null ?
                                            "n/a" :
                                            SimulatorParameters.ShortRotationString(Rotation); // TODO: Remove dependancy on SimulatorParameters.
            dictValues["Average SoV Stack"]  = AverageSoVStack.ToString("N2");
            dictValues["SoV Overtake"]       = string.Format("{0} sec", SoVOvertake.ToString("N2"));
            dictValues["Crusader Strike CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.CrusaderStrike).ToString("N2");
            dictValues["Judgement CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.Judgement).ToString("N2");
            dictValues["Consecration CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.Consecration).ToString("N2");
            dictValues["Exorcism CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.Exorcism).ToString("N2");
            dictValues["Divine Storm CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.DivineStorm).ToString("N2");
            dictValues["Hammer of Wrath CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.HammerOfWrath).ToString("N2");

            return(dictValues);
        }
Exemple #8
0
    static public void SetAttackData(PokedexItem item, int attackId, int attackSpeedId, int attackDisId)
    {
        item.attack = new float[1] {
            float.Parse(ODSetting.attackTable[attackId]["attacks"])
        }[0];

        item.attackInterval = AttackSpeed.GetAttackInterval(float.Parse(ODSetting.attackSpeedTable[attackSpeedId]["baseAttackInterval"]), ODSetting.settingDic["attackSpeedTimeModifiedValue"], ODSetting.settingDic["baseAttackSpeed"]);

        item.minAttackDis = float.Parse(ODSetting.attDisTable[attackDisId]["min"]);
        item.maxAttackDis = float.Parse(ODSetting.attDisTable[attackDisId]["max"]);
    }
Exemple #9
0
        /// <summary>
        /// Returns stun time for the attacker.
        /// </summary>
        /// <param name="count"></param>
        /// <param name="speed"></param>
        /// <param name="knockback"></param>
        /// <returns></returns>
        public static short GetAttackerStun(int count, AttackSpeed speed, bool knockback)
        {
            //public enum CombatStunAttacker { VeryFast = 450, Fast = 520, Normal = 600, Slow = 800, VerySlow = 1000 }
            //public enum CombatKnockbackStunAttacker { VeryFast = 2500, Fast = 2500, Normal = 2500, Slow = 2500, VerySlow = 2500 }

            if (knockback)
            {
                return(2500);
            }

            switch (count)
            {
            case 1:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(2500);
                }
                break;

            case 2:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(1000);

                case AttackSpeed.Slow: return(800);
                }
                break;

            case 3:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(1000);

                case AttackSpeed.Slow: return(800);

                case AttackSpeed.Normal: return(600);

                case AttackSpeed.Fast: return(520);
                }
                break;

            case 5:
                switch (speed)
                {
                case AttackSpeed.VeryFast: return(450);
                }
                break;
            }

            Log.Unimplemented("GetAttackerStun: Combination {0} {1} Hit", speed, count);

            return(600);
        }
Exemple #10
0
        /// <summary>
        /// Returns stun time for the target.
        /// </summary>
        /// <param name="count"></param>
        /// <param name="speed"></param>
        /// <param name="knockback"></param>
        /// <returns></returns>
        public static short GetTargetStun(int count, AttackSpeed speed, bool knockback)
        {
            //public enum CombatStunTarget { VeryFast = 1200, Fast = 1700, Normal = 2000, Slow = 2800, VerySlow = 3000 }
            //public enum CombatKnockbackStunTarget { VeryFast = 3000, Fast = 3000, Normal = 3000, Slow = 3000, VerySlow = 3000 }

            if (knockback)
            {
                return(3000);
            }

            switch (count)
            {
            case 1:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(3000);
                }
                break;

            case 2:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(3000);

                case AttackSpeed.Slow: return(2800);
                }
                break;

            case 3:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(2200);

                case AttackSpeed.Slow: return(2100);

                case AttackSpeed.Normal: return(2000);

                case AttackSpeed.Fast: return(1700);
                }
                break;

            case 5:
                switch (speed)
                {
                case AttackSpeed.VeryFast: return(1200);
                }
                break;
            }

            Log.Unimplemented("GetTargetStun: Combination {0} {1} Hit", speed, count);

            return(2000);
        }
Exemple #11
0
 //Item initialization for Sigil, Consumable and KeyItem
 public void addItemInfo(int ID, string name, string desc, ItemType itemType)
 {
     this.itemID           = ID;
     this.itemName         = name;
     this.itemDesc         = desc;
     this.itemType         = itemType;
     this.damage           = 0;
     this.criticalChance   = 0;
     this.attackSpeed      = 0;
     this.range            = 0;
     this.knockback        = 0;
     this.weaponType       = WeaponType.none;
     this.damageMitigation = 0;
     this.defense          = 0;
 }
 public void RefreshMinLevelBindings()
 {
     Attack.RefreshPropertyBinding(nameof(Attack.MinValue));
     CriticalDamage.RefreshPropertyBinding(nameof(CriticalDamage.MinValue));
     CriticalChance.RefreshPropertyBinding(nameof(CriticalChance.MinValue));
     AttackSpeed.RefreshPropertyBinding(nameof(AttackSpeed.MinValue));
     Health.RefreshPropertyBinding(nameof(Health.MinValue));
     Shields.RefreshPropertyBinding(nameof(Shields.MinValue));
     DefensiveEssence.RefreshPropertyBinding(nameof(DefensiveEssence.MinValue));
     DamageReduction.RefreshPropertyBinding(nameof(DamageReduction.MinValue));
     Mining.RefreshPropertyBinding(nameof(Mining.MinValue));
     Kills.RefreshPropertyBinding(nameof(Kills.MinValue));
     Veterancy.RefreshPropertyBinding(nameof(Veterancy.MinValue));
     Acceleration.RefreshPropertyBinding(nameof(Acceleration.MinValue));
 }
Exemple #13
0
 //Item initialization for Weapons
 public void addItemInfo(int ID, string name, string desc, ItemType itemType, int dmg, float crtChnce, AttackSpeed attspd, Range range, Knockback knockback, WeaponType weaponType)
 {
     this.itemID           = ID;
     this.itemName         = name;
     this.itemDesc         = desc;
     this.itemType         = itemType;
     this.damage           = dmg;
     this.criticalChance   = crtChnce;
     this.attackSpeed      = attspd;
     this.range            = range;
     this.knockback        = knockback;
     this.weaponType       = weaponType;
     this.damageMitigation = 0;
     this.defense          = 0;
     this.sigil            = null;
 }
    public void SetupValues()
    {
        // Attack Speed
        AS = new AttackSpeed(baseStats.AS);

        // Attack Damage
        AD = new Stat(baseStats.AD);

        // Health
        Health = new Health(baseStats.MaxHealth);

        // Mana
        Mana     = new Mana(baseStats.MaxMana, baseStats.StartingMana.Value);
        ManaGain = new Stat(baseStats.ManaGain);

        // Name
        characterName = baseStats.CharacterName;
    }
Exemple #15
0
    protected override void Update()
    {
        if (target == null)
        {
            return;
        }
        AttackSpeed.StartCooldown();

        if (CanAttack)
        {
            UseBasicAttack(target);
        }

        Vector3    dir          = target.position - transform.position;
        Quaternion lookRotation = Quaternion.LookRotation(dir);
        Vector3    rotation     = lookRotation.eulerAngles;

        transform.rotation = Quaternion.Euler(0f, rotation.y, 0f);
    }
        public void Calculations()
        {
            PseudoItemInfo item = new PseudoItemInfo("TestItem")
            {
                Stats = { AttackSpeedMultiplier = 2.0 }
            };
            PseudoChampionInfo champion = new PseudoChampionInfo("TestChampion")
            {
                Stats = { AttackSpeedBase = 1.5 }
            };
            List <IStatsInfo> stats = new List <IStatsInfo>()
            {
                item.Stats, champion.Stats
            };
            AttackSpeed attack_speed = new AttackSpeed(stats);
            double      expected     = TestAttackSpeed.BASE * (1.0 + TestAttackSpeed.MULTIPLIER); // add 1.0 for base multiplier
            double      result       = attack_speed.GetAttackSpeed(Level.Level18);

            Assert.IsTrue(Math.Abs(result - expected) < TestAttackSpeed.TOLERANCE, "Failed to Verify Attack Speed (Expected: {0}; Result: {1})", expected, result);
        }
Exemple #17
0
        // Update is called once per frame
        void Update()
        {
            EntityManager em = World.DefaultGameObjectInjectionWorld.EntityManager;

            // get the game and player settings in order to update the ui
            GameSettings gameSettings   = em.CreateEntityQuery(typeof(GameSettings)).GetSingleton <GameSettings>();
            AttackSpeed  playerSettings = em.CreateEntityQuery(typeof(Player), typeof(AttackSpeed)).GetSingleton <AttackSpeed>();
            Score        score          = em.CreateEntityQuery(typeof(Score)).GetSingleton <Score>();

            m_reloadBar.fillAmount = math.lerp(0, 1, 1 - (float)playerSettings.counter / (float)playerSettings.speed);
            m_score.text           = score.value.ToString();


            int buildingCount = em.CreateEntityQuery(
                typeof(Building),
                typeof(HealthInt),
                typeof(Radius))
                                .CalculateEntityCount();


            // game over create show UI
            m_gameoverPanel.SetActive(buildingCount == 0);
        }
        private void AddAttackSpeedStat(AttackSpeed attackSpeed)
        {
            string swingSpeedText = null;

            switch (attackSpeed)
            {
            case AttackSpeed.VerySlow:
                swingSpeedText = "Very slow swing speed";
                break;

            case AttackSpeed.Slow:
                swingSpeedText = "Slow swing speed";
                break;

            case AttackSpeed.Normal:
                swingSpeedText = "Normal swing speed";
                break;

            case AttackSpeed.Fast:
                swingSpeedText = "Fast swing speed";
                break;

            case AttackSpeed.VeryFast:
                swingSpeedText = "Very fast swing speed";
                break;

            default:
                break;
            }

            if (sb.Length > 0)
            {
                sb.AppendLine();
            }

            sb.Append(swingSpeedText);
        }
Exemple #19
0
    protected virtual void InitializUnitStats(BaseStats baseStats)
    {
        Health = new Health(baseStats.BaseHealth);

        AttackDamage         = new AttackDamage(baseStats.BaseAttackDamage);
        AbilityPower         = new AbilityPower();
        Armor                = new Resistance(baseStats.BaseArmor);
        MagicResistance      = new Resistance(baseStats.BaseMagicResistance);
        AttackSpeed          = new AttackSpeed(baseStats.BaseAttackSpeed);
        CooldownReduction    = new CooldownReduction();
        CriticalStrikeChance = new CriticalStrikeChance();
        MovementSpeed        = new MovementSpeed(baseStats.BaseMovementSpeed);

        HealthRegeneration      = new ResourceRegeneration();
        Lethality               = new Lethality();
        ArmorPenetrationPercent = new ResistancePenetrationPercent();
        MagicPenetrationFlat    = new ResistancePenetrationFlat();
        MagicPenetrationPercent = new ResistancePenetrationPercent();
        LifeSteal               = new PercentBonusOnlyStat();
        SpellVamp               = new PercentBonusOnlyStat();
        AttackRange             = new AttackRange(baseStats.BaseAttackRange);
        Tenacity = new Tenacity();

        CriticalStrikeDamage           = new CriticalStrikeDamage();
        CriticalStrikeDamageReduction  = new PercentBonusOnlyStat();
        PhysicalDamageModifier         = new DamageModifier();
        MagicDamageModifier            = new DamageModifier();
        PhysicalDamageReceivedModifier = new DamageModifier();
        MagicDamageReceivedModifier    = new DamageModifier();
        HealAndShieldPower             = new PercentBonusOnlyStat();
        SlowResistance = new SlowResistance();

        GrievousWounds = new GrievousWounds();

        ExtraAdjustments();
    }
Exemple #20
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);
    }
Exemple #21
0
 public override int GetHashCode()
 {
     return(-26413112 + AttackSpeed.GetHashCode());
 }
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            float critRating = BasicStats.CritRating;

            if (ActiveBuffs.Contains(Buff.GetBuffByName("Improved Judgement of the Crusade")))
            {
                critRating -= 3444f / 52f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Leader of the Pack")))
            {
                critRating -= 22.08f * 5;
            }

            float hitRating = BasicStats.HitRating;

            if (ActiveBuffs.Contains(Buff.GetBuffByName("Improved Faerie Fire")))
            {
                hitRating -= 47.3077f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Heroic Presence")))
            {
                hitRating -= 15.769f;
            }

            float armorPenetration = BasicStats.ArmorPenetration;

            if (ActiveBuffs.Contains(Buff.GetBuffByName("Faerie Fire")))
            {
                armorPenetration -= 610f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Sunder Armor (x5)")))
            {
                armorPenetration -= 2600f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Curse of Recklessness")))
            {
                armorPenetration -= 800f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Expose Armor (5cp)")))
            {
                armorPenetration -= 2050f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Improved Expose Armor (5cp)")))
            {
                armorPenetration -= 1025f;
            }

            float attackPower = BasicStats.AttackPower;

            if (ActiveBuffs.Contains(Buff.GetBuffByName("Improved Hunter's Mark")))
            {
                attackPower -= 110f * (1f + BasicStats.BonusAttackPowerMultiplier);
            }

            float effectiveArmor = 10557.5f / ((1f / EnemyMitigation) - 1f);

            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            dictValues.Add("Health", BasicStats.Health.ToString("N0"));
            dictValues.Add("Strength", BasicStats.Strength.ToString("N0"));
            dictValues.Add("Agility", string.Format("{0:0}*Provides {1:P} crit chance", BasicStats.Agility, (BasicStats.Agility / 2500f)));
            dictValues.Add("Attack Power", attackPower.ToString("N0"));
            dictValues.Add("Crit Rating", string.Format("{0:0}*Provides {1:P} crit chance", critRating, (critRating / 2208)));
            dictValues.Add("Hit Rating", string.Format("{0:0}*Negates {1:P} miss chance", hitRating, (hitRating / 1576)));
            dictValues.Add("Expertise", string.Format("{0:0}*Negates {1:P} dodge chance", BasicStats.Expertise, (BasicStats.Expertise / 400)));
            dictValues.Add("Haste Rating", string.Format("{0:0}*Increases attack speed by {1:P}", BasicStats.HasteRating, (BasicStats.HasteRating / 1576)));
            dictValues.Add("Armor Penetration", armorPenetration.ToString("N0"));

            dictValues.Add("Weapon Damage", WeaponDamage.ToString("N2"));
            dictValues.Add("Attack Speed", AttackSpeed.ToString("N2"));
            dictValues.Add("Crit Chance", string.Format("{0:P}", CritChance));
            dictValues.Add("Avoided Attacks", string.Format("{0:P}*{1:P} Dodged, {2:P} Missed", AvoidedAttacks, DodgedAttacks, MissedAttacks));
            dictValues.Add("Enemy Mitigation", string.Format("{0:P}*{1:0} effective enemy armor", EnemyMitigation, effectiveArmor));

            dictValues.Add("White", WhiteDPS.ToString("N2"));
            dictValues.Add("Seal", SealDPS.ToString("N2"));
            dictValues.Add("Windfury", WindfuryDPS.ToString("N2"));
            dictValues.Add("Crusader Strike", CrusaderDPS.ToString("N2"));
            dictValues.Add("Judgement", JudgementDPS.ToString("N2"));
            dictValues.Add("Consecration", ConsecrationDPS.ToString("N2"));
            dictValues.Add("Exorcism", ExorcismDPS.ToString("N2"));
            dictValues.Add("Total DPS", DPSPoints.ToString("N2"));

            return(dictValues);
        }
Exemple #23
0
 protected void ExtraAdjustments()
 {
     AttackSpeed.SetBasicAttack(GetComponent <BasicAttack>());
     MovementSpeed.SubscribeToSlowResistanceChangedEvent(SlowResistance);
 }
        private void InstantiateCharacters(int entityCount)
        {
            if (entityCount <= 0)
            {
                return;
            }

            var entityArray = new NativeArray <Entity>(entityCount, Allocator.TempJob);

            EntityManager.CreateEntity(m_Archetype, entityArray);

            var terrain = Terrain.activeTerrain;

            for (var entityIndex = 0; entityIndex < entityArray.Length; entityIndex++)
            {
                var type                  = (ViewType)m_Random.NextInt(Enum.GetValues(typeof(ViewType)).Length);
                var entity                = entityArray[entityIndex];
                var movementSpeed         = new MovementSpeed();
                var rotationSpeed         = new RotationSpeed();
                var rotationSpeedModifier = new RotationSpeedModifier();
                var walkSpeedModifier     = new WalkSpeedModifier();
                var chargeSpeedModifier   = new ChargeSpeedModifier();
                var engageSqrRadius       = new EngageSqrRadius();
                var attackDistance        = new AttackDistance {
                    Min = 1.5f, Max = 2
                };
                var attackAnimationDuration = new AttackAnimationDuration();
                var attackDamage            = new AttackDamage();
                var attackSpeed             = new AttackSpeed();
                var maxHealth          = new MaxHealth();
                var health             = new Health();
                var healthRegeneration = new HealthRegeneration();
                var viewInfo           = new ViewInfo();

                PostUpdateCommands.SetComponent(entity, new Translation {
                    Value = terrain.GetRandomPosition()
                });

                switch (type)
                {
                case ViewType.Knight:
                    PostUpdateCommands.AddComponent(entity, new Knight());
                    PostUpdateCommands.AddComponent(entity, new Faction {
                        Value = FactionType.Alliance
                    });
                    movementSpeed.Value           = m_Random.NextFloat(1, 3);
                    rotationSpeed.Value           = m_Random.NextFloat(1, 3);
                    rotationSpeedModifier.Value   = m_Random.NextFloat(1.25f, 2);
                    walkSpeedModifier.Value       = m_Random.NextFloat(0.9f, 1.25f);
                    chargeSpeedModifier.Value     = m_Random.NextFloat(2, 3);
                    engageSqrRadius.Value         = m_Random.NextFloat(400, 2500);
                    attackAnimationDuration.Value = 1;
                    attackDamage.Value            = m_Random.NextInt(10, 30);
                    attackSpeed.Value             = m_Random.NextFloat(1, 3);
                    maxHealth.Value          = m_Random.NextInt(100, 200);
                    health.Value             = maxHealth.Value;
                    healthRegeneration.Value = m_Random.NextFloat(1, 3);
                    viewInfo.Type            = ViewType.Knight;
                    break;

                case ViewType.OrcWolfRider:
                    PostUpdateCommands.AddComponent(entity, new OrcWolfRider());
                    PostUpdateCommands.AddComponent(entity, new Faction {
                        Value = FactionType.Horde
                    });
                    movementSpeed.Value           = m_Random.NextFloat(1, 3);
                    rotationSpeed.Value           = m_Random.NextFloat(1, 3);
                    rotationSpeedModifier.Value   = m_Random.NextFloat(1.25f, 2);
                    walkSpeedModifier.Value       = m_Random.NextFloat(0.9f, 1.25f);
                    chargeSpeedModifier.Value     = m_Random.NextFloat(2, 3);
                    engageSqrRadius.Value         = m_Random.NextFloat(400, 2500);
                    attackAnimationDuration.Value = 1.333f;
                    attackDamage.Value            = m_Random.NextInt(10, 30);
                    attackSpeed.Value             = m_Random.NextFloat(1, 3);
                    maxHealth.Value          = m_Random.NextInt(100, 200);
                    health.Value             = maxHealth.Value;
                    healthRegeneration.Value = m_Random.NextFloat(1, 3);
                    viewInfo.Type            = ViewType.OrcWolfRider;
                    break;

                case ViewType.Skeleton:
                    PostUpdateCommands.AddComponent(entity, new Skeleton());
                    PostUpdateCommands.AddComponent(entity, new Faction {
                        Value = FactionType.Legion
                    });
                    movementSpeed.Value           = m_Random.NextFloat(1, 3);
                    rotationSpeed.Value           = m_Random.NextFloat(1, 3);
                    rotationSpeedModifier.Value   = m_Random.NextFloat(1.25f, 2);
                    walkSpeedModifier.Value       = m_Random.NextFloat(0.9f, 1.25f);
                    chargeSpeedModifier.Value     = m_Random.NextFloat(2, 3);
                    engageSqrRadius.Value         = m_Random.NextFloat(400, 2500);
                    attackAnimationDuration.Value = 2.4f;
                    attackDamage.Value            = m_Random.NextInt(10, 30);
                    attackSpeed.Value             = m_Random.NextFloat(1, 3);
                    maxHealth.Value          = m_Random.NextInt(100, 200);
                    health.Value             = maxHealth.Value;
                    healthRegeneration.Value = m_Random.NextFloat(1, 3);
                    viewInfo.Type            = ViewType.Skeleton;
                    break;
                }

                PostUpdateCommands.SetComponent(entity, movementSpeed);
                PostUpdateCommands.SetComponent(entity, rotationSpeed);
                PostUpdateCommands.SetComponent(entity, rotationSpeedModifier);
                PostUpdateCommands.SetComponent(entity, walkSpeedModifier);
                PostUpdateCommands.SetComponent(entity, chargeSpeedModifier);
                PostUpdateCommands.SetComponent(entity, engageSqrRadius);
                PostUpdateCommands.SetComponent(entity, attackDistance);
                PostUpdateCommands.SetComponent(entity, attackAnimationDuration);
                PostUpdateCommands.SetComponent(entity, attackDamage);
                PostUpdateCommands.SetComponent(entity, attackSpeed);
                PostUpdateCommands.SetComponent(entity, maxHealth);
                PostUpdateCommands.SetComponent(entity, health);
                PostUpdateCommands.SetComponent(entity, healthRegeneration);
                PostUpdateCommands.SetComponent(entity, viewInfo);
#if UNITY_EDITOR
                EntityManager.SetName(entity, $"{viewInfo.Type} AI {entity}");
#endif
            }

            entityArray.Dispose();
        }
Exemple #25
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            int   levelDifference = TargetLevel - CharacterLevel;
            float baseMiss        = StatConversion.WHITE_MISS_CHANCE_CAP[levelDifference] - BasicStats.PhysicalHit;
            float baseDodge       = StatConversion.WHITE_DODGE_CHANCE_CAP[levelDifference] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float baseParry       = StatConversion.WHITE_PARRY_CHANCE_CAP[levelDifference] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float capMiss         = (float)Math.Ceiling(baseMiss * StatConversion.RATING_PER_PHYSICALHIT);
            float capDodge        = (float)Math.Ceiling(baseDodge * 400f * StatConversion.RATING_PER_EXPERTISE);
            float capParry        = (float)Math.Ceiling(baseParry * 400f * StatConversion.RATING_PER_EXPERTISE);

            string tipMiss = string.Empty;

            if (BasicStats.HitRating > capMiss)
            {
                tipMiss = string.Format("*Over the cap by {0} Hit Rating", BasicStats.HitRating - capMiss);
            }
            else if (BasicStats.HitRating < capMiss)
            {
                tipMiss = string.Format("*Under the cap by {0} Hit Rating", capMiss - BasicStats.HitRating);
            }
            else
            {
                tipMiss = "*Exactly at the cap";
            }

            string tipDodgeParry = string.Empty;

            if (BasicStats.ExpertiseRating > capDodge)
            {
                tipDodgeParry = string.Format("*Over the dodge cap by {0} Expertise Rating\r\n", BasicStats.ExpertiseRating - capDodge);
            }
            else if (BasicStats.ExpertiseRating < capDodge)
            {
                tipDodgeParry = string.Format("*Under the dodge cap by {0} Expertise Rating\r\n", capDodge - BasicStats.ExpertiseRating);
            }
            else
            {
                tipDodgeParry = "*Exactly at the dodge cap";
            }

            if (BasicStats.ExpertiseRating > capParry)
            {
                tipDodgeParry += string.Format("Over the parry cap by {0} Expertise Rating", BasicStats.ExpertiseRating - capParry);
            }
            else if (BasicStats.ExpertiseRating < capParry)
            {
                tipDodgeParry += string.Format("Under the parry cap by {0} Expertise Rating", capParry - BasicStats.ExpertiseRating);
            }
            else
            {
                tipDodgeParry += "Exactly at the parry cap";
            }



            int   armorCap = (int)Math.Ceiling(6502.5f * TargetLevel - 474502.5f);
            float levelDifferenceAvoidance = 0.002f * levelDifference;
            float targetCritReduction      = StatConversion.NPC_LEVEL_CRIT_MOD[levelDifference];

            /*int defToCap = 0, resToCap = 0;
             * if (CritReduction < targetCritReduction)
             * {
             *  //while (((float)Math.Floor((BasicStats.DefenseRating + defToCap) / (123f / 52f)) * 0.04f)
             *  //+ BasicStats.Resilience / (2050f / 52f) + BasicStats.CritChanceReduction < targetCritReduction)
             *  //    defToCap++;
             *  //while (((float)Math.Floor(BasicStats.DefenseRating / (123f / 52f)) * 0.04f)
             *  //+ (BasicStats.Resilience + resToCap) / (2050f / 52f) + BasicStats.CritChanceReduction < targetCritReduction)
             *  //    resToCap++;
             *  while (((float)Math.Floor(StatConversion.GetDefenseFromRating(BasicStats.DefenseRating + defToCap)) * 0.0004f)
             + StatConversion.GetCritReductionFromResilience(BasicStats.Resilience)
             + BasicStats.CritChanceReduction < targetCritReduction)
             +      defToCap++;
             +  while (((float)Math.Floor(StatConversion.GetDefenseFromRating(BasicStats.DefenseRating)) * 0.0004f)
             + StatConversion.GetCritReductionFromResilience(BasicStats.Resilience + resToCap)
             + BasicStats.CritChanceReduction < targetCritReduction)
             +      resToCap++;
             + }
             + else if (CritReduction > targetCritReduction)
             + {
             +  //while (((float)Math.Floor((BasicStats.DefenseRating + defToCap) / (123f / 52f)) * 0.04f)
             +  //+ BasicStats.Resilience / (2050f / 52f) + BasicStats.CritChanceReduction > targetCritReduction)
             +  //    defToCap--;
             +  //while (((float)Math.Floor(BasicStats.DefenseRating / (123f / 52f)) * 0.04f)
             +  //+ (BasicStats.Resilience + resToCap) / (2050f / 52f) + BasicStats.CritChanceReduction > targetCritReduction)
             +  //    resToCap--;
             +
             +  while (((float)Math.Floor(StatConversion.GetDefenseFromRating(BasicStats.DefenseRating + defToCap)) * 0.0004f)
             + StatConversion.GetCritReductionFromResilience(BasicStats.Resilience) + BasicStats.CritChanceReduction > targetCritReduction)
             +      defToCap--;
             +  while (((float)Math.Floor(StatConversion.GetDefenseFromRating(BasicStats.DefenseRating)) * 0.0004f)
             + StatConversion.GetCritReductionFromResilience(BasicStats.Resilience + resToCap) + BasicStats.CritChanceReduction > targetCritReduction)
             +      resToCap--;
             +  defToCap++;
             +  resToCap++;
             + }*/

            // Changed to not just give a resist rating, but a breakdown of the resulting resist values in the tooltip
            string tipResist = string.Empty;

            tipResist = StatConversion.GetResistanceTableString(TargetLevel, CharacterLevel, BasicStats.NatureResistance, 0);
            dictValues.Add("Nature Resist", BasicStats.NatureResistance.ToString() + "*" + tipResist);
            tipResist = StatConversion.GetResistanceTableString(TargetLevel, CharacterLevel, BasicStats.ArcaneResistance, 0);
            dictValues.Add("Arcane Resist", BasicStats.ArcaneResistance.ToString() + "*" + tipResist);
            tipResist = StatConversion.GetResistanceTableString(TargetLevel, CharacterLevel, BasicStats.FrostResistance, 0);
            dictValues.Add("Frost Resist", BasicStats.FrostResistance.ToString() + "*" + tipResist);
            tipResist = StatConversion.GetResistanceTableString(TargetLevel, CharacterLevel, BasicStats.FireResistance, 0);
            dictValues.Add("Fire Resist", BasicStats.FireResistance.ToString() + "*" + tipResist);
            tipResist = StatConversion.GetResistanceTableString(TargetLevel, CharacterLevel, BasicStats.ShadowResistance, 0);
            dictValues.Add("Shadow Resist", BasicStats.ShadowResistance.ToString() + "*" + tipResist);

            dictValues.Add("Health", BasicStats.Health.ToString());
            dictValues.Add("Agility", BasicStats.Agility.ToString());
            dictValues.Add("Armor", BasicStats.Armor.ToString());
            dictValues.Add("Stamina", BasicStats.Stamina.ToString());
            dictValues.Add("Dodge Rating", BasicStats.DodgeRating.ToString());
            dictValues.Add("Mastery", string.Format("{0}*{1} Mastery Rating",
                                                    StatConversion.GetMasteryFromRating(BasicStats.MasteryRating) + 8f,
                                                    BasicStats.MasteryRating.ToString()));
            dictValues.Add("Resilience", BasicStats.Resilience.ToString());
            dictValues.Add("Dodge", Dodge.ToString("0.000%"));
            dictValues.Add("Miss", Miss.ToString("0.000%"));
            if (BasicStats.Armor == armorCap)
            {
                dictValues.Add("Armor Damage Reduction", DamageReductionFromArmor.ToString("0.000%")
                               + string.Format("*Exactly at the armor cap against level {0} mobs.", TargetLevel));
            }
            else if (BasicStats.Armor > armorCap)
            {
                dictValues.Add("Armor Damage Reduction", DamageReductionFromArmor.ToString("0.000%")
                               + string.Format("*Over the armor cap by {0} armor.", BasicStats.Armor - armorCap));
            }
            else
            {
                dictValues.Add("Armor Damage Reduction", DamageReductionFromArmor.ToString("0.000%")
                               + string.Format("*Short of the armor cap by {0} armor.", armorCap - BasicStats.Armor));
            }
            dictValues.Add("Total Damage Reduction", TotalConstantDamageReduction.ToString("0.000%"));
            dictValues.Add("Avoidance PreDR", AvoidancePreDR.ToString("0.000%"));
            dictValues.Add("Avoidance PostDR", AvoidancePostDR.ToString("0.000%"));
            dictValues.Add("Total Mitigation", TotalMitigation.ToString("0.000%"));
            dictValues.Add("Damage Taken", DamageTaken.ToString("0.000%"));
            dictValues.Add("Savage Defense", string.Format(
                               "{0} ~ {1}*{0} chance to absorb incoming hit\r\n{1} absorbed per hit\r\n{2} of incoming damage absorbed",
                               SavageDefenseChance.ToString("0.000%"), SavageDefenseValue, SavageDefensePercent.ToString("0.000%")));
            dictValues.Add("Chance to be Crit", ((0.05f + levelDifferenceAvoidance) - CritReduction).ToString("0.000%"));
            dictValues.Add("Overall Points", OverallPoints.ToString());
            dictValues.Add("Mitigation Points", MitigationPoints.ToString());
            dictValues.Add("Survival Points", string.Format("{0}*{1} Before Soft Cap", SurvivabilityPoints.ToString(), SurvivalPointsRaw.ToString()));
            dictValues.Add("Threat Points", ThreatPoints.ToString());

            dictValues["Nature Survival"] = NatureSurvivalPoints.ToString();
            dictValues["Frost Survival"]  = FrostSurvivalPoints.ToString();
            dictValues["Fire Survival"]   = FireSurvivalPoints.ToString();
            dictValues["Shadow Survival"] = ShadowSurvivalPoints.ToString();
            dictValues["Arcane Survival"] = ArcaneSurvivalPoints.ToString();


            dictValues["Strength"]             = BasicStats.Strength.ToString();
            dictValues["Attack Power"]         = string.Format("{0}*{1} with Vengeance", (BasicStats.AttackPower - AverageVengeanceAP), BasicStats.AttackPower);
            dictValues["Average Vengeance AP"] = AverageVengeanceAP.ToString("N1");
            dictValues["Crit Rating"]          = BasicStats.CritRating.ToString();
            dictValues["Hit Rating"]           = BasicStats.HitRating.ToString() + tipMiss;
            dictValues["Expertise Rating"]     = BasicStats.ExpertiseRating.ToString() + tipDodgeParry;
            dictValues["Haste Rating"]         = string.Format("{0}*{1}sec Attack Speed", BasicStats.HasteRating, AttackSpeed.ToString("0.000"));
            //dictValues["Armor Penetration Rating"] = BasicStats.ArmorPenetrationRating.ToString();

            dictValues["Avoided Attacks"] = String.Format("{0}*{1} Missed\r\n{2} Dodged\r\n{3} Parried",
                                                          AvoidedAttacks.ToString("0.000%"), MissedAttacks.ToString("0.000%"),
                                                          DodgedAttacks.ToString("0.000%"), ParriedAttacks.ToString("0.000%"));

            dictValues["Highest DPS Rotation"] = HighestDPSRotation.Name;
            dictValues["Highest TPS Rotation"] = HighestTPSRotation.Name;
            dictValues["Swipe Rotation"]       = "";
            dictValues["Custom Rotation"]      = "";
            //string rotationFormat = "{0} DPS, {1} TPS*{2}";
            //dictValues["Highest DPS Rotation"] = String.Format(rotationFormat, Math.Round(HighestDPSRotation.DPS), Math.Round(HighestDPSRotation.TPS), GetRotationTooltip(HighestDPSRotation.Name));
            //dictValues["Highest TPS Rotation"] = String.Format(rotationFormat, Math.Round(HighestTPSRotation.DPS), Math.Round(HighestTPSRotation.TPS), GetRotationTooltip(HighestTPSRotation.Name));
            //dictValues["Swipe Rotation"] = String.Format(rotationFormat, Math.Round(SwipeRotation.DPS), Math.Round(SwipeRotation.TPS), GetRotationTooltip(SwipeRotation.Name));
            //dictValues["Custom Rotation"] = String.Format(rotationFormat, Math.Round(CustomRotation.DPS), Math.Round(CustomRotation.TPS), GetRotationTooltip(CustomRotation.Name));

            dictValues["Melee"]       = Abilities.MeleeStats.ToString();
            dictValues["Maul"]        = Abilities.MaulStats.ToString();
            dictValues["Mangle"]      = Abilities.MangleStats.ToString();
            dictValues["Lacerate"]    = Abilities.LacerateStats.ToString();
            dictValues["Pulverize"]   = Abilities.PulverizeStats.ToString();
            dictValues["Swipe"]       = Abilities.SwipeStats.ToString();
            dictValues["Thrash"]      = Abilities.ThrashStats.ToString();
            dictValues["Faerie Fire"] = Abilities.FaerieFireStats.ToString();
            dictValues["Thorns"]      = Abilities.ThornsStats.ToString();
            //string attackFormat = "{0} Dmg, {1} Threat*Per Hit: {0} Damage, {1} Threat\r\nPer Average Swing: {2} Damage, {3} Threat";
            //string attackFormatWithRage = attackFormat + "\r\nThreat Per Rage: {4}\r\nDamage Per Rage: {5}";
            //dictValues["Melee"] = String.Format(attackFormat, MeleeDamageRaw, MeleeThreatRaw, MeleeDamageAverage, MeleeThreatAverage);
            //dictValues["Maul"] = String.Format(attackFormatWithRage, MaulDamageRaw, MaulThreatRaw, MaulDamageAverage, MaulThreatAverage, MaulTPR, MaulDPR);
            //dictValues["Mangle"] = String.Format(attackFormatWithRage, MangleDamageRaw, MangleThreatRaw, MangleDamageAverage, MangleThreatAverage, MangleTPR, MangleDPR);
            //dictValues["Swipe"] = String.Format(attackFormatWithRage, SwipeDamageRaw, SwipeThreatRaw, SwipeDamageAverage, SwipeThreatAverage, SwipeTPR, SwipeDPR);
            //dictValues["Faerie Fire"] = String.Format(attackFormat, FaerieFireDamageRaw, FaerieFireThreatRaw, FaerieFireDamageAverage, FaerieFireThreatAverage);
            //dictValues["Lacerate"] = String.Format(attackFormatWithRage, LacerateDamageRaw, LacerateThreatRaw, LacerateDamageAverage, LacerateThreatAverage, LacerateTPR, LacerateDPR);
            //dictValues["Lacerate DoT Tick"] = String.Format(attackFormat, LacerateDotDamageRaw, LacerateDotThreatRaw, LacerateDotDamageAverage, LacerateDotThreatAverage).Replace("Swing", "Tick");

            return(dictValues);
        }
Exemple #26
0
        /// <summary>
        /// Returns stun time for the attacker.
        /// </summary>
        /// <param name="count"></param>
        /// <param name="speed"></param>
        /// <param name="knockback"></param>
        /// <returns></returns>
        public static short GetAttackerStun(int count, AttackSpeed speed, bool knockback)
        {
            if (knockback)
                return 2500;

            // Speeds commented with "?" weren't logged, but taken from the weapon data.
            // Stun *seems* to always be the same, needs confirmation. Except for 1-hit,
            // which is always knock-back.

            switch (count)
            {
                case 1:
                    switch (speed)
                    {
                        case AttackSpeed.VerySlow: return 2500;
                    }
                    break;

                case 2:
                    switch (speed)
                    {
                        case AttackSpeed.VerySlow: return 1000;
                        case AttackSpeed.Slow: return 800;
                        case AttackSpeed.Normal: return 600; // ?
                        case AttackSpeed.Fast: return 520; // ?
                        case AttackSpeed.VeryFast: return 450; // ?
                    }
                    break;

                case 3:
                    switch (speed)
                    {
                        case AttackSpeed.VerySlow: return 1000;
                        case AttackSpeed.Slow: return 800;
                        case AttackSpeed.Normal: return 600;
                        case AttackSpeed.Fast: return 520;
                        case AttackSpeed.VeryFast: return 450; // ?
                    }
                    break;

                case 4:
                    switch (speed)
                    {
                        case AttackSpeed.VerySlow: return 1000; // ?
                        case AttackSpeed.Slow: return 800; // ?
                        case AttackSpeed.Normal: return 600; // ?
                        case AttackSpeed.Fast: return 520; // ?
                        case AttackSpeed.VeryFast: return 450; // ?
                    }
                    break;

                case 5:
                    switch (speed)
                    {
                        case AttackSpeed.VerySlow: return 1000; // ?
                        case AttackSpeed.Slow: return 800; // ?
                        case AttackSpeed.Normal: return 600; // ?
                        case AttackSpeed.Fast: return 520; // ?
                        case AttackSpeed.VeryFast: return 450;
                    }
                    break;
            }

            Log.Unimplemented("GetAttackerStun: Combination {0} {1} Hit", speed, count);

            return 600;
        }
Exemple #27
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            try
            {
                dictValues.Add("Overall Points", OverallPoints.ToString());
                dictValues.Add("DPS Points", DPSPoints.ToString());
                dictValues.Add("Survivability Points", SurvivabilityPoints.ToString());

                float baseMiss  = StatConversion.WHITE_MISS_CHANCE_CAP[TargetLevel - 85] - BasicStats.PhysicalHit;
                float baseDodge = StatConversion.WHITE_DODGE_CHANCE_CAP[TargetLevel - 85] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
                float capMiss   = (float)Math.Ceiling(baseMiss * StatConversion.RATING_PER_PHYSICALHIT);
                float capDodge  = (float)Math.Ceiling(baseDodge * 400f * StatConversion.RATING_PER_EXPERTISE);

                string tipMiss = string.Empty;
                if (BasicStats.HitRating > capMiss)
                {
                    tipMiss = string.Format("*Hit Rating %: {0}%\nOver the cap by {1} Hit Rating", StatConversion.GetPhysicalHitFromRating(BasicStats.HitRating) * 100, BasicStats.HitRating - capMiss);
                }
                else if (BasicStats.HitRating < capMiss)
                {
                    tipMiss = string.Format("*Hit Rating %: {0}%\nUnder the cap by {1} Hit Rating", StatConversion.GetPhysicalHitFromRating(BasicStats.HitRating) * 100, capMiss - BasicStats.HitRating);
                }
                else
                {
                    tipMiss = string.Format("*Hit Rating %: {0}%\nExactly at the cap", StatConversion.GetPhysicalHitFromRating(BasicStats.HitRating) * 100);
                }

                string tipDodge = string.Empty;
                if (BasicStats.ExpertiseRating > capDodge)
                {
                    tipDodge = string.Format("*Expertise Rating %: {0}%\nOver the cap by {1} Expertise Rating", StatConversion.GetExpertiseFromRating(BasicStats.ExpertiseRating) * 0.25f, BasicStats.ExpertiseRating - capDodge);
                }
                else if (BasicStats.ExpertiseRating < capDodge)
                {
                    tipDodge = string.Format("*Expertise Rating %: {0}%\nUnder the cap by {1} Expertise Rating", StatConversion.GetExpertiseFromRating(BasicStats.ExpertiseRating) * 0.25f, capDodge - BasicStats.ExpertiseRating);
                }
                else
                {
                    tipDodge = string.Format("*Expertise Rating %: {0}%\nExactly at the cap", StatConversion.GetExpertiseFromRating(BasicStats.ExpertiseRating) * 0.25f);
                }

                string tipHaste = string.Format("*Haste Rating %: {0}%", StatConversion.GetPhysicalHasteFromRating(BasicStats.HasteRating, CharacterClass.Druid) * 100f);

                string tipMastery = string.Format("*Increases the damage done by your bleed abilities by {0}%", ((StatConversion.GetMasteryFromRating(BasicStats.MasteryRating, CharacterClass.Druid) + 8f) * 0.031f) * 100f);

                dictValues.Add("Health", BasicStats.Health.ToString());
                dictValues.Add("Attack Power", BasicStats.AttackPower.ToString());
                dictValues.Add("Agility", BasicStats.Agility.ToString());
                dictValues.Add("Strength", BasicStats.Strength.ToString());
                dictValues.Add("Crit Rating", BasicStats.CritRating.ToString());
                dictValues.Add("Hit Rating", BasicStats.HitRating.ToString() + tipMiss);
                dictValues.Add("Expertise Rating", BasicStats.ExpertiseRating.ToString() + tipDodge);
                dictValues.Add("Mastery Rating", BasicStats.MasteryRating.ToString() + tipMastery);
                dictValues.Add("Haste Rating", BasicStats.HasteRating.ToString() + tipHaste);

                dictValues.Add("Avoided Attacks", string.Format("{0}%*{1}% Dodged, {2}% Missed", AvoidedAttacks, DodgedAttacks, MissedAttacks));
                dictValues.Add("Crit Chance", CritChance.ToString() + "%");
                dictValues.Add("Attack Speed", AttackSpeed.ToString() + "s");
                dictValues.Add("Armor Mitigation", ArmorMitigation.ToString() + "%");

                dictValues.Add("Optimal Rotation", HighestDPSRotation.ToString());
                //dictValues.Add("Optimal Rotation DPS", HighestDPSRotation.DPS.ToString());
                //dictValues.Add("Custom Rotation DPS", CustomRotation.DPS.ToString());


                float chanceNonAvoided = 1f - (AvoidedAttacks / 100f);
                dictValues.Add("Melee", Abilities.MeleeStats.ToString());
                dictValues.Add("Mangle", Abilities.MangleStats.ToString());
                dictValues.Add("Shred", Abilities.ShredStats.ToString());
                dictValues.Add("Ravage", Abilities.RavageStats.ToString());
                dictValues.Add("Rake", Abilities.RakeStats.ToString());
                dictValues.Add("Rip", Abilities.RipStats.ToString());
                dictValues.Add("Bite", Abilities.BiteStats.ToString());


                //string[] abilityStats = MeleeStats.GetStatsTexts(HighestDPSRotation.MeleeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Melee Usage", abilityStats[0]);
                //dictValues.Add("Melee Stats", abilityStats[1]);
                //abilityStats = MangleStats.GetStatsTexts(HighestDPSRotation.MangleCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Mangle Usage", abilityStats[0]);
                //dictValues.Add("Mangle Stats", abilityStats[1]);
                //abilityStats = ShredStats.GetStatsTexts(HighestDPSRotation.ShredCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Shred Usage", abilityStats[0]);
                //dictValues.Add("Shred Stats", abilityStats[1]);
                //abilityStats = RakeStats.GetStatsTexts(HighestDPSRotation.RakeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Rake Usage", abilityStats[0]);
                //dictValues.Add("Rake Stats", abilityStats[1]);
                //abilityStats = RipStats.GetStatsTexts(HighestDPSRotation.RipCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Rip Usage", abilityStats[0]);
                //dictValues.Add("Rip Stats", abilityStats[1]);
                //abilityStats = RoarStats.GetStatsTexts(HighestDPSRotation.RoarCount, HighestDPSRotation.RoarCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Roar Usage", abilityStats[0]);
                //dictValues.Add("Roar Stats", abilityStats[1]);
                //abilityStats = BiteStats.GetStatsTexts(HighestDPSRotation.BiteCount, HighestDPSRotation.BiteCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Bite Usage", abilityStats[0]);
                //dictValues.Add("Bite Stats", abilityStats[1]);

                //string attackFormat = "{0}%*Damage Per Hit: {1}, Damage Per Swing: {2}\r\n{0}% of Total Damage, {3} Damage Done";
                //dictValues.Add("Melee Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.MeleeDamageTotal / HighestDPSRotation.DamageTotal, MeleeDamagePerHit, MeleeDamagePerSwing, HighestDPSRotation.MeleeDamageTotal));
                //dictValues.Add("Mangle Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.MangleDamageTotal / HighestDPSRotation.DamageTotal, MangleDamagePerHit, MangleDamagePerSwing, HighestDPSRotation.MangleDamageTotal));
                //dictValues.Add("Shred Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.ShredDamageTotal / HighestDPSRotation.DamageTotal, ShredDamagePerHit, ShredDamagePerSwing, HighestDPSRotation.ShredDamageTotal));
                //dictValues.Add("Rake Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.RakeDamageTotal / HighestDPSRotation.DamageTotal, RakeDamagePerHit, RakeDamagePerSwing, HighestDPSRotation.RakeDamageTotal));
                //dictValues.Add("Rip Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.RipDamageTotal / HighestDPSRotation.DamageTotal, RipDamagePerHit, RipDamagePerSwing, HighestDPSRotation.RipDamageTotal));
                //dictValues.Add("Bite Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.BiteDamageTotal / HighestDPSRotation.DamageTotal, BiteDamagePerHit, BiteDamagePerSwing, HighestDPSRotation.BiteDamageTotal));

                //string rotationDescription = string.Empty;
                //try
                //{
                //    rotationDescription = string.Format("{0}*Keep {1}cp Savage Roar up.\r\n{2}{3}{4}{5}Use {6} for combo points.",
                //        HighestDPSRotation.Name.Replace(" + ", "+"), HighestDPSRotation.RoarCP,
                //        HighestDPSRotation.Name.Contains("Rake") ? "Keep Rake up.\r\n" : "",
                //        HighestDPSRotation.Name.Contains("Rip") ? "Keep 5cp Rip up.\r\n" : "",
                //        HighestDPSRotation.Name.Contains("Mangle") ? "Keep Mangle up.\r\n" : "",
                //        HighestDPSRotation.Name.Contains("Bite") ? string.Format("Use {0}cp Ferocious Bites to spend extra combo points.\r\n", HighestDPSRotation.BiteCP) : "",
                //        HighestDPSRotation.Name.Contains("Shred") ? "Shred" : "Mangle");
                //}
                //catch (Exception ex)
                //{
                //    ex.ToString();
                //}
            }
            catch (Exception ex)
            {
                new Base.ErrorBox()
                {
                    Title        = "Error Getting Cat Dictionary Values",
                    Function     = "GetCharacterDisplayCalculationValues()",
                    TheException = ex,
                }.Show();
            }
            return(dictValues);
        }
Exemple #28
0
 //Item initialization for Sigil, Consumable and KeyItem
 public void addItemInfo(int ID, string name, string desc, ItemType itemType)
 {
     this.itemID = ID;
     this.itemName = name;
     this.itemDesc = desc;
     this.itemType = itemType;
     this.damage = 0;
     this.criticalChance = 0;
     this.attackSpeed = 0;
     this.range = 0;
     this.knockback = 0;
     this.weaponType = WeaponType.none;
     this.damageMitigation = 0;
     this.defense = 0;
 }
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            dictValues.Add("Overall Points", OverallPoints.ToString());
            dictValues.Add("DPS Points", DPSPoints.ToString());
            dictValues.Add("Survivability Points", SurvivabilityPoints.ToString());

            float baseMiss  = StatConversion.WHITE_MISS_CHANCE_CAP[TargetLevel - 80] - BasicStats.PhysicalHit;
            float baseDodge = StatConversion.WHITE_DODGE_CHANCE_CAP[TargetLevel - 80] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float baseParry = 0f;            // StatConversion.WHITE_PARRY_CHANCE_CAP[TargetLevel - 80] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float capMiss   = (float)Math.Ceiling(baseMiss * 100f * 32.78998947f);
            float capDodge  = (float)Math.Ceiling(baseDodge * 100f * 32.78998947f);
            float capParry  = (float)Math.Ceiling(baseParry * 100f * 32.78998947f);            // TODO: Check this value

            string tipMiss = string.Empty;

            if (BasicStats.HitRating > capMiss)
            {
                tipMiss = string.Format("*Over the cap by {0} Hit Rating", BasicStats.HitRating - capMiss);
            }
            else if (BasicStats.HitRating < capMiss)
            {
                tipMiss = string.Format("*Under the cap by {0} Hit Rating", capMiss - BasicStats.HitRating);
            }
            else
            {
                tipMiss = "*Exactly at the cap";
            }

            string tipDodge = string.Empty;

            if (BasicStats.ExpertiseRating > capDodge)
            {
                tipDodge = string.Format("*Over the cap by {0} Expertise Rating", BasicStats.ExpertiseRating - capDodge);
            }
            else if (BasicStats.ExpertiseRating < capDodge)
            {
                tipDodge = string.Format("*Under the cap by {0} Expertise Rating", capDodge - BasicStats.ExpertiseRating);
            }
            else
            {
                tipDodge = "*Exactly at the cap";
            }


            dictValues.Add("Health", BasicStats.Health.ToString());
            dictValues.Add("Attack Power", BasicStats.AttackPower.ToString());
            dictValues.Add("Agility", BasicStats.Agility.ToString());
            dictValues.Add("Strength", BasicStats.Strength.ToString());
            dictValues.Add("Crit Rating", BasicStats.CritRating.ToString());
            dictValues.Add("Hit Rating", BasicStats.HitRating.ToString() + tipMiss);
            dictValues.Add("Expertise Rating", BasicStats.ExpertiseRating.ToString() + tipDodge);
            dictValues.Add("Haste Rating", BasicStats.HasteRating.ToString());
            dictValues.Add("Armor Penetration Rating", BasicStats.ArmorPenetrationRating.ToString());
            dictValues.Add("Weapon Damage", "+" + BasicStats.WeaponDamage.ToString());

            dictValues.Add("Avoided Attacks", string.Format("{0}%*{1}% Dodged, {2}% Missed", AvoidedAttacks, DodgedAttacks, MissedAttacks));
            dictValues.Add("Crit Chance", CritChance.ToString() + "%");
            dictValues.Add("Attack Speed", AttackSpeed.ToString() + "s");
            dictValues.Add("Armor Mitigation", ArmorMitigation.ToString() + "%");

            dictValues.Add("Optimal Rotation", HighestDPSRotation.ToString());
            dictValues.Add("Optimal Rotation DPS", HighestDPSRotation.DPS.ToString());
            dictValues.Add("Custom Rotation DPS", CustomRotation.DPS.ToString());


            float chanceNonAvoided = 1f - (AvoidedAttacks / 100f);

            dictValues.Add("Melee", MeleeStats.GetStatsTexts(HighestDPSRotation.MeleeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Mangle", MangleStats.GetStatsTexts(HighestDPSRotation.MangleCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Shred", ShredStats.GetStatsTexts(HighestDPSRotation.ShredCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Rake", RakeStats.GetStatsTexts(HighestDPSRotation.RakeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Rip", RipStats.GetStatsTexts(HighestDPSRotation.RipCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Roar", RoarStats.GetStatsTexts(HighestDPSRotation.RoarCount, HighestDPSRotation.RoarCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Bite", BiteStats.GetStatsTexts(HighestDPSRotation.BiteCount, HighestDPSRotation.BiteCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));


            //string[] abilityStats = MeleeStats.GetStatsTexts(HighestDPSRotation.MeleeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Melee Usage", abilityStats[0]);
            //dictValues.Add("Melee Stats", abilityStats[1]);
            //abilityStats = MangleStats.GetStatsTexts(HighestDPSRotation.MangleCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Mangle Usage", abilityStats[0]);
            //dictValues.Add("Mangle Stats", abilityStats[1]);
            //abilityStats = ShredStats.GetStatsTexts(HighestDPSRotation.ShredCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Shred Usage", abilityStats[0]);
            //dictValues.Add("Shred Stats", abilityStats[1]);
            //abilityStats = RakeStats.GetStatsTexts(HighestDPSRotation.RakeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Rake Usage", abilityStats[0]);
            //dictValues.Add("Rake Stats", abilityStats[1]);
            //abilityStats = RipStats.GetStatsTexts(HighestDPSRotation.RipCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Rip Usage", abilityStats[0]);
            //dictValues.Add("Rip Stats", abilityStats[1]);
            //abilityStats = RoarStats.GetStatsTexts(HighestDPSRotation.RoarCount, HighestDPSRotation.RoarCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Roar Usage", abilityStats[0]);
            //dictValues.Add("Roar Stats", abilityStats[1]);
            //abilityStats = BiteStats.GetStatsTexts(HighestDPSRotation.BiteCount, HighestDPSRotation.BiteCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Bite Usage", abilityStats[0]);
            //dictValues.Add("Bite Stats", abilityStats[1]);

            //string attackFormat = "{0}%*Damage Per Hit: {1}, Damage Per Swing: {2}\r\n{0}% of Total Damage, {3} Damage Done";
            //dictValues.Add("Melee Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.MeleeDamageTotal / HighestDPSRotation.DamageTotal, MeleeDamagePerHit, MeleeDamagePerSwing, HighestDPSRotation.MeleeDamageTotal));
            //dictValues.Add("Mangle Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.MangleDamageTotal / HighestDPSRotation.DamageTotal, MangleDamagePerHit, MangleDamagePerSwing, HighestDPSRotation.MangleDamageTotal));
            //dictValues.Add("Shred Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.ShredDamageTotal / HighestDPSRotation.DamageTotal, ShredDamagePerHit, ShredDamagePerSwing, HighestDPSRotation.ShredDamageTotal));
            //dictValues.Add("Rake Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.RakeDamageTotal / HighestDPSRotation.DamageTotal, RakeDamagePerHit, RakeDamagePerSwing, HighestDPSRotation.RakeDamageTotal));
            //dictValues.Add("Rip Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.RipDamageTotal / HighestDPSRotation.DamageTotal, RipDamagePerHit, RipDamagePerSwing, HighestDPSRotation.RipDamageTotal));
            //dictValues.Add("Bite Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.BiteDamageTotal / HighestDPSRotation.DamageTotal, BiteDamagePerHit, BiteDamagePerSwing, HighestDPSRotation.BiteDamageTotal));

            //string rotationDescription = string.Empty;
            //try
            //{
            //    rotationDescription = string.Format("{0}*Keep {1}cp Savage Roar up.\r\n{2}{3}{4}{5}Use {6} for combo points.",
            //        HighestDPSRotation.Name.Replace(" + ", "+"), HighestDPSRotation.RoarCP,
            //        HighestDPSRotation.Name.Contains("Rake") ? "Keep Rake up.\r\n" : "",
            //        HighestDPSRotation.Name.Contains("Rip") ? "Keep 5cp Rip up.\r\n" : "",
            //        HighestDPSRotation.Name.Contains("Mangle") ? "Keep Mangle up.\r\n" : "",
            //        HighestDPSRotation.Name.Contains("Bite") ? string.Format("Use {0}cp Ferocious Bites to spend extra combo points.\r\n", HighestDPSRotation.BiteCP) : "",
            //        HighestDPSRotation.Name.Contains("Shred") ? "Shred" : "Mangle");
            //}
            //catch (Exception ex)
            //{
            //    ex.ToString();
            //}


            return(dictValues);
        }
Exemple #30
0
        /// <summary>
        /// Returns stun time for the attacker.
        /// </summary>
        /// <param name="count"></param>
        /// <param name="speed"></param>
        /// <param name="knockback"></param>
        /// <returns></returns>
        public static short GetAttackerStun(int count, AttackSpeed speed, bool knockback)
        {
            if (knockback)
            {
                return(2500);
            }

            // Speeds commented with "?" weren't logged, but taken from the weapon data.
            // Stun *seems* to always be the same, needs confirmation. Except for 1-hit,
            // which is always knock-back.

            switch (count)
            {
            case 1:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(2500);
                }
                break;

            case 2:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(1000);

                case AttackSpeed.Slow: return(800);

                case AttackSpeed.Normal: return(600);                              // ?

                case AttackSpeed.Fast: return(520);                                // ?

                case AttackSpeed.VeryFast: return(450);                            // ?
                }
                break;

            case 3:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(1000);

                case AttackSpeed.Slow: return(800);

                case AttackSpeed.Normal: return(600);

                case AttackSpeed.Fast: return(520);

                case AttackSpeed.VeryFast: return(450);                                // ?
                }
                break;

            case 4:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(1000);                           // ?

                case AttackSpeed.Slow: return(800);                                // ?

                case AttackSpeed.Normal: return(600);                              // ?

                case AttackSpeed.Fast: return(520);                                // ?

                case AttackSpeed.VeryFast: return(450);                            // ?
                }
                break;

            case 5:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(1000);                           // ?

                case AttackSpeed.Slow: return(800);                                // ?

                case AttackSpeed.Normal: return(600);                              // ?

                case AttackSpeed.Fast: return(520);                                // ?

                case AttackSpeed.VeryFast: return(450);
                }
                break;
            }

            Log.Unimplemented("GetAttackerStun: Combination {0} {1} Hit", speed, count);

            return(600);
        }
Exemple #31
0
 public override int GetHashCode()
 {
     return(2108858624 + AttackSpeed.GetHashCode());
 }
Exemple #32
0
        /// <summary>
        /// Returns stun time for the target.
        /// </summary>
        /// <param name="count"></param>
        /// <param name="speed"></param>
        /// <param name="knockback"></param>
        /// <returns></returns>
        public static short GetTargetStun(int count, AttackSpeed speed, bool knockback)
        {
            if (knockback)
                return 3000;

            // Speeds commented with "?" weren't logged, but taken from the weapon data.

            switch (count)
            {
                case 1:
                    switch (speed)
                    {
                        case AttackSpeed.VerySlow: return 3000;
                    }
                    break;

                case 2:
                    switch (speed)
                    {
                        case AttackSpeed.VerySlow: return 3000;
                        case AttackSpeed.Slow: return 2800;
                        case AttackSpeed.Normal: return 2600; // ?
                        case AttackSpeed.Fast: return 2400; // ?
                        case AttackSpeed.VeryFast: return 2200; // ?
                    }
                    break;

                case 3:
                    switch (speed)
                    {
                        case AttackSpeed.VerySlow: return 2200;
                        case AttackSpeed.Slow: return 2100;
                        case AttackSpeed.Normal: return 2000;
                        case AttackSpeed.Fast: return 1700;
                        case AttackSpeed.VeryFast: return 1500; // ?
                    }
                    break;

                case 4:
                    switch (speed)
                    {
                        case AttackSpeed.VerySlow: return 1900; // ?
                        case AttackSpeed.Slow: return 1800; // ?
                        case AttackSpeed.Normal: return 1700; // ?
                        case AttackSpeed.Fast: return 1500; // ?
                        case AttackSpeed.VeryFast: return 1300; // ?
                    }
                    break;

                case 5:
                    switch (speed)
                    {
                        case AttackSpeed.VerySlow: return 1700; // ?
                        case AttackSpeed.Slow: return 1600; // ?
                        case AttackSpeed.Normal: return 1500; // ?
                        case AttackSpeed.Fast: return 1400; // ?
                        case AttackSpeed.VeryFast: return 1200;
                    }
                    break;
            }

            Log.Unimplemented("GetTargetStun: Combination {0} {1} Hit", speed, count);

            return 2000;
        }
Exemple #33
0
        /// <summary>
        /// Returns stun time for the target.
        /// </summary>
        /// <param name="count"></param>
        /// <param name="speed"></param>
        /// <param name="knockback"></param>
        /// <returns></returns>
        public static short GetTargetStun(int count, AttackSpeed speed, bool knockback)
        {
            if (knockback)
            {
                return(3000);
            }

            // Speeds commented with "?" weren't logged, but taken from the weapon data.

            switch (count)
            {
            case 1:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(3000);
                }
                break;

            case 2:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(3000);

                case AttackSpeed.Slow: return(2800);

                case AttackSpeed.Normal: return(2600);                              // ?

                case AttackSpeed.Fast: return(2400);                                // ?

                case AttackSpeed.VeryFast: return(2200);                            // ?
                }
                break;

            case 3:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(2200);

                case AttackSpeed.Slow: return(2100);

                case AttackSpeed.Normal: return(2000);

                case AttackSpeed.Fast: return(1700);

                case AttackSpeed.VeryFast: return(1500);                                // ?
                }
                break;

            case 4:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(1900);                            // ?

                case AttackSpeed.Slow: return(1800);                                // ?

                case AttackSpeed.Normal: return(1700);                              // ?

                case AttackSpeed.Fast: return(1500);                                // ?

                case AttackSpeed.VeryFast: return(1300);                            // ?
                }
                break;

            case 5:
                switch (speed)
                {
                case AttackSpeed.VerySlow: return(1700);                            // ?

                case AttackSpeed.Slow: return(1600);                                // ?

                case AttackSpeed.Normal: return(1500);                              // ?

                case AttackSpeed.Fast: return(1400);                                // ?

                case AttackSpeed.VeryFast: return(1200);
                }
                break;
            }

            Log.Unimplemented("GetTargetStun: Combination {0} {1} Hit", speed, count);

            return(2000);
        }
Exemple #34
0
 public AttackSpeedCommand(AttackSpeed attackSpeed)
 {
     m_AttackSpeedValue = attackSpeed.value;
 }