Inheritance: Status_Foundation
Exemplo n.º 1
0
 public SecondaryAttributes(
     Health health,
     CriticalStrike criticalStrike,
     Hit hit,
     Dodge dodge,
     Parry parry,
     Defense defense,
     BlockDamage blockDamage,
     MeleeAttackPower meleeAttackPower,
     RangedAttackPower rangedAttackPower,
     ArmorAmount armor,
     WeaponSkills weaponSkills)
 {
     Health            = health;
     CriticalStrike    = criticalStrike;
     Hit               = hit;
     Dodge             = dodge;
     Parry             = parry;
     Defense           = defense;
     BlockDamage       = blockDamage;
     MeleeAttackPower  = meleeAttackPower;
     RangedAttackPower = rangedAttackPower;
     Armor             = armor;
     WeaponSkills      = weaponSkills;
 }
        /// <summary>
        /// Calculate secondary attributes from primary attributes.
        /// i.e. How much critical strike chance does the characters agility provide?
        /// </summary>
        public override SecondaryAttributes CalculateSecondaryAttributes(PrimaryAttributes primaryAttributes)
        {
            // (Source: https://rankedboost.com/world-of-warcraft/classic-stats/)
            // 2 Melee Attack Power per 1 point of Strength.
            var meleeAttackPower = new MeleeAttackPower(primaryAttributes.Strength.Value * 2);
            // Block 1 Damage for every 20 points of Strength.
            var blockDamage = new BlockDamage(primaryAttributes.Strength.Value / 20);
            // 2 Armor for every 1 point of Agility.
            var armor = new ArmorAmount(primaryAttributes.Agility.Value / 2);
            // 1% Critical Strike Chance for every 20 points of Agility.
            var criticalStrike = new CriticalStrike(primaryAttributes.Agility.Value / 20);
            // 1 Ranged Attack Power per 1 point of Agility.
            var rangedAttackPower = new RangedAttackPower(primaryAttributes.Agility.Value);
            // 1% Dodge per 20 point of Agility.
            var dodge = new Dodge(primaryAttributes.Agility.Value / 20);
            // 5% base chance to Parry. (Source: https://worldofwarcraft.fandom.com/et/wiki/Parry)
            var parry = new Parry(5);
            // 10 Health for every 1 point of Stamina.
            var health = new Health((int)primaryAttributes.Stamina.Value / 10);

            var attributes = new SecondaryAttributes(
                health,
                criticalStrike,
                Hit.Zero,
                dodge,
                parry,
                Defense.Zero,
                blockDamage,
                meleeAttackPower,
                rangedAttackPower,
                armor,
                new WeaponSkills());

            return(attributes);
        }
Exemplo n.º 3
0
    public void onObstacle(Player player)
    {
        Debug.Log("Walk on Obstacle");

        //// 播放机关开启音效
        if (GameManagerGlobalData.isFirstMeetObstacle)
        {
            // 第一次进行格挡
            PlayerAudioCtrl.getInstance().play(PlayerAudioData.SWITCH_OBSTACLE_CLIP, () => {
                PlayerAudioCtrl.getInstance().play(PlayerAudioData.HAVE_TO_PARRY_CLIP, () => {
                    player.setState(PlayerState.Parry);
                    ArrowDir _arrowDir = Parry.getInstance().startParry();
                    ObstacleAudioCtrl.getInstance().playAudio(_arrowDir);
                });
            });
        }
        else if (GameManagerGlobalData.isSecondMeetObstacle)
        {
            // 第二次进行格挡
            PlayerAudioCtrl.getInstance().play(PlayerAudioData.SWITCH_OBSTACLE_CLIP, () => {
                player.setState(PlayerState.Parry);
                ArrowDir _arrowDir = Parry.getInstance().startParry();
                ObstacleAudioCtrl.getInstance().playAudio(_arrowDir);
            });
        }
        else
        {
            PlayerAudioCtrl.getInstance().play(PlayerAudioData.SWITCH_OBSTACLE_CLIP, () => {
                player.setState(PlayerState.Parry);
                ArrowDir _arrowDir = Parry.getInstance().startParry();
                ObstacleAudioCtrl.getInstance().playAudio(_arrowDir);
            });
        }
        player.setState(PlayerState.Idle);
    }
Exemplo n.º 4
0
 private void Update()
 {
     Parry.getInstance().timer();
     if (_moveCtrl)
     {
         _moveCtrl.timer();
     }
 }
Exemplo n.º 5
0
 public CombatActor(string name)
 {
     Name = name;
     DamageCausedStats      = new DamageCausedStats();
     ParryCounts            = new Parry();
     TargetPreferenceCounts = new TargetPreference();
     EvadedCounts           = new Evasion();
 }
Exemplo n.º 6
0
 public static Parry getInstance()
 {
     if (_instance == null)
     {
         _instance = new Parry();
         Debug.Log("Parry component init to declaration itself.");
     }
     return(_instance);
 }
Exemplo n.º 7
0
    public void DoParry()
    {
        Parry p = actions ["Parry"] as Parry;

        if (p.ActionReady())
        {
            p.DoAction();
            StealthOff();
        }
    }
Exemplo n.º 8
0
    public void CreateActions(bool playerAction)
    {
        actions = new Dictionary <string, Action>();
        Dash d = new Dash(1.5f, 0.3f, this, playerAction);

        actions.Add("Dash", d);
        Attack a = new Attack(0.6f, 0.4f, this, playerAction);

        actions.Add("Attack", a);
        Parry p = new Parry(1.0f, 1.0f, this, playerAction);

        actions.Add("Parry", p);
    }
Exemplo n.º 9
0
    public void Init()
    {
        Parry.getInstance().init(this);
        PlayerAction.getInstance().init();
        _moveCtrl = this.GetComponent <MoveCtrl>();

        // 在 GameManager 的 init 阶段初始化 utils
        _pos = utils.getInstance().getPlayerPosition();
        _moveCtrl.setPosition(_pos);
        _moveCtrl.setOwner(this);
        switchGestureToMove();
        setState(PlayerState.Idle);
    }
Exemplo n.º 10
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();
            int   armorCap        = (int)Math.Ceiling((1402.5f * TargetLevel) - 66502.5f);
            float levelDifference = 0.2f * (TargetLevel - 70);

            dictValues.Add("Health", BasicStats.Health.ToString());
            dictValues.Add("Armor", BasicStats.Armor.ToString());
            dictValues.Add("Stamina", BasicStats.Stamina.ToString());
            dictValues.Add("Agility", BasicStats.Agility.ToString());
            dictValues.Add("Defense", Defense.ToString());
            dictValues.Add("Miss", Miss.ToString() + "%");
            dictValues.Add("Dodge", Dodge.ToString() + "%");
            dictValues.Add("Parry", Parry.ToString() + "%");
            dictValues.Add("Block", Block.ToString() + "%");
            dictValues.Add("Block Value", BlockValue.ToString() + "%");
            dictValues.Add("Avoidance", Avoidance.ToString() + "%");
            dictValues.Add("Mitigation", Mitigation.ToString());
            dictValues.Add("Spell Damage", _basicStats.SpellDamageRating.ToString());
            dictValues.Add("Total Mitigation", TotalMitigation.ToString() + "%");
            if (CritAvoidance == (5f + levelDifference))
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritAvoidance).ToString()
                               + "%*Exactly enough defense rating/resilience to be uncrittable by bosses.");
            }
            else if (CritAvoidance < (5f + levelDifference))
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritAvoidance).ToString()
                               + string.Format("%*CRITTABLE! Short by {0} defense rating or {1} resilience to be uncrittable by bosses.",
                                               Math.Ceiling(((5f + levelDifference) - CritAvoidance) * 60f), Math.Ceiling(((5f + levelDifference) - CritAvoidance) * 39.423f)));
            }
            else
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritAvoidance).ToString()
                               + string.Format("%*Uncrittable by bosses. {0} defense rating or {1} resilience over the crit cap.",
                                               Math.Floor(((5f + levelDifference) - CritAvoidance) * -60f), Math.Floor(((5f + levelDifference) - CritAvoidance) * -39.423f)));
            }
            dictValues.Add("Overall Points", OverallPoints.ToString());
            dictValues.Add("Mitigation Points", MitigationPoints.ToString());
            dictValues.Add("Survival Points", SurvivalPoints.ToString());
            dictValues.Add("Overall", Math.Round(OverallTPS) + " tps");
            dictValues.Add("Holy Shield", Math.Round(HolyShieldTPS) + " tps");
            dictValues.Add("Seal of Right", Math.Round(SoRTPS) + " tps");
            dictValues.Add("Judgement of Right", Math.Round(JoRTPS) + " tps");
            dictValues.Add("Consecrate", Math.Round(ConsecrateTPS) + " tps");
            dictValues.Add("Misc", Math.Round(MiscTPS) + " tps");

            return(dictValues);
        }
Exemplo n.º 11
0
        public override bool Equals(object other)
        {
            if (other == null || other.GetType() != GetType())
            {
                return(false);
            }

            var otherWeapon = (Weapon)other;

            return(Type.Equals(otherWeapon.Type) &&
                   Name.Equals(otherWeapon.Name) &&
                   Parry.Equals(otherWeapon.Parry) &&
                   Powers.OrderBy(p => p).SequenceEqual(otherWeapon.Powers.OrderBy(p => p)) &&
                   Locations.OrderBy(l => l).SequenceEqual(otherWeapon.Locations.OrderBy(l => l)));
        }
Exemplo n.º 12
0
        /**
         * TODO
         * Equipment
         * Powers
         * Hindrances
         *
         * Later:
         * Injuries
         **/

        public override string ToString()
        {
            StringBuilder retval = new StringBuilder("");

            retval.AppendLine("Name:" + Name);
            retval.AppendLine("Charisma:" + Charisma.ToString());
            retval.AppendLine("Pace:" + Pace.ToString());
            retval.AppendLine("Parry:" + Parry.ToString());
            retval.AppendLine("Toughness:" + Toughness.ToString());
            retval.AppendLine("Agility:" + Agility.ToString());
            retval.AppendLine("Smarts:" + Smarts.ToString());
            retval.AppendLine("Strength:" + Strength.ToString());
            retval.AppendLine("Spirit:" + Spirit.ToString());
            retval.AppendLine("Vigor:" + Vigor.ToString());
            return(retval.ToString());
        }
Exemplo n.º 13
0
    public override void setupClass()
    {
        //Set up offensive Abilities
        offensiveAbilityPool = new Ability[1];

        offensiveAbilityPool[0] = new DashStrike();

        //Set up defensive Abilities
        defensiveAbilityPool = new Ability[2];

        defensiveAbilityPool[0] = new DodgeRoll();
        defensiveAbilityPool[1] = new Parry();

        //Set up basic and heavy attacks
        basicAttack = new BasicAttack();
        heavyAttack = new HeavyAttack();
    }
Exemplo n.º 14
0
 public Mob(
     string name,
     Health health,
     Level level,
     Defense defense,
     Dodge dodge,
     Parry parry,
     ArmorAmount armor)
 {
     Name    = name;
     Health  = health;
     Level   = level;
     Defense = defense;
     Dodge   = dodge;
     Parry   = parry;
     Armor   = armor;
 }
Exemplo n.º 15
0
 public Duelist()
 {
     heroTexture = Engine.Engine.GetTexture("Hero/Duelist");
     Hero.loadSprite();
     heroRole            = Classes.Duelist;
     baseHealth          = 275;
     healthPerLevel      = 35;
     requiredBranchLevel = 30;
     resetLevel();
     resetHealth();
     Enemies.Enemy.UpdateTargets(this);
     Enemies.BossEnemy.UpdateBossTargets(this);
     abilities[0] = new Mug();
     abilities[1] = new Invisibility();
     abilities[2] = new Parry();
     abilities[3] = new Eviscerate();
     Engine.Engine.Log(health.ToString());
 }
Exemplo n.º 16
0
        public override void CalculateAttributeBonuses()
        {
            int levelBonus = 0;

            if (CurrentLevel > 90)
            {
                levelBonus = 1;
            }
            else if (CurrentLevel > 140)
            {
                levelBonus = 2;
            }
            ;

            int ptmBonus    = GetPtmBonus();
            int tacBonus    = GetTacticsSkillBonus();     //will be 0 if not shown
            int tacImmBonus = GetTacticsSkillBonus(true); //will be 0 if not shown

            base.CalculateAttributeBonuses();

            foreach (Attribute attribute in Attributes)
            {
                attribute.LevelBonus = levelBonus;
            }

            //these get tactics bonus so do separately
            Attack.SetAttributeBonus(Attributes, tacBonus);
            Parry.SetAttributeBonus(Attributes, tacBonus);
            Warcry.SetAttributeBonus(Attributes, tacBonus);
            Immunity.SetAttributeBonus(Attributes, tacImmBonus);

            foreach (Skill skill in Skills)
            {
                skill.LevelBonus = levelBonus;

                if (skill.Type != Skill.Types.Hitpoints &&
                    skill.Type != Skill.Types.Endurance &&
                    skill.Type != Skill.Types.Mana &&
                    skill.Type != Skill.Types.Profession)
                {
                    skill.PtmBonus = ptmBonus;
                }
            }
        }
Exemplo n.º 17
0
 public Assassin()
 {
     heroTexture = Engine.Engine.GetTexture("Hero/Assassin");
     Hero.loadSprite();
     heroRole            = Classes.Assassin;
     baseHealth          = 450;
     healthPerLevel      = 35;
     requiredBranchLevel = int.MaxValue;
     resetLevel();
     resetHealth();
     abilities[0] = new Mug();
     abilities[1] = new Invisibility();
     abilities[2] = new Parry();
     abilities[3] = new Eviscerate();
     abilities[4] = new Assassinate();
     abilities[5] = new Poison();
     Enemies.Enemy.UpdateTargets(this);
     Enemies.BossEnemy.UpdateBossTargets(this);
 }
        public WhiteAttackTable(
            Miss missChance,
            Dodge dodgeChance,
            Parry parryChance,
            GlancingBlow glancingBlowChance,
            CrushingBlow crushingBlowChance,
            Block blockChance,
            CriticalStrike criticalStrikeChance)
        {
            var chances = new List <Rating>
            {
                missChance,
                dodgeChance,
                parryChance,
                glancingBlowChance,
                crushingBlowChance,
                blockChance,
                criticalStrikeChance
            };

            _ranges = CalculateAttackTableRanges(chances);
        }
Exemplo n.º 19
0
    protected override void setupClass()
    {
        //Set up offensive Abilities
        offensiveAbilityPool = new Ability[2];

        offensiveAbilityPool[0] = new LanceShot();
        offensiveAbilityPool[1] = new RicochetShot();

        //Set up defensive Abilities
        defensiveAbilityPool = new Ability[1];

        defensiveAbilityPool[0] = new DodgeRoll();

        //Set up special Abilities
        specialAbilityPool = new Ability[1];

        specialAbilityPool[0] = new Parry();

        //Set up basic and heavy attacks
        basicAttack = new BasicShoot();
        heavyAttack = new HeavyAttack();
    }
Exemplo n.º 20
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            // A unique case where the Singleton exists but not in this scene
            if (instance.gameObject.scene.name == null)
            {
                instance = this;
            }
            else
            {
                Destroy(this);
            }
        }

        rb             = GetComponent <Rigidbody2D>();
        anim           = GetComponentInParent <Animator>();
        parryComponent = GetComponentInChildren <Parry>();
        headSprite     = GetComponentInChildren <SpriteRenderer>();
    }
Exemplo n.º 21
0
    public void playAudio(ArrowDir dir)
    {
        String name = selectedDir(dir);

        System.String clipName = "";
        AudioPlayObj  obj      = null;

        if (dir == ArrowDir.FRONT)
        {
            clipName = "frontSword";
            obj      = new AudioPlayObj(selectClip(clipName), this, selectSource(name));
        }
        else
        {
            clipName = "bow";
            obj      = new AudioPlayObj(selectClip(clipName), this, selectSource(name));
        }

        AudioPlayCtrl.getInstance().addEffectObj(obj);

        // 教学音频设计需要
        if (GameManagerGlobalData.isFirstMeetObstacle)
        {
            PlayerAudioCtrl.getInstance().play(PlayerAudioData.PARRY_TO_FRONT_TIPS, () => {
                Parry.getInstance().setParry(true);
                GameManagerGlobalData.isFirstMeetObstacle = false;
            });
        }
        else if (GameManagerGlobalData.isSecondMeetObstacle)
        {
            PlayerAudioCtrl.getInstance().play(PlayerAudioData.PARRY_TO_LEFT_TIPS, () => {
                Parry.getInstance().setParry(true);
                GameManagerGlobalData.isSecondMeetObstacle = false;
            });
        }
    }
Exemplo n.º 22
0
        public static PlayerClass ThiefClass()
        {
            var thief = new PlayerClass
            {
                Name               = "Thief",
                IsBaseClass        = true,
                ExperienceModifier = 2000,
                HelpText           = new Help(),
                Skills             = new List <Skill>(),
                ReclassOptions     = new List <PlayerClass>(),
                MaxHpGain          = 15,
                MinHpGain          = 10,
                MaxManaGain        = 15,
                MinManaGain        = 10,
                MaxEnduranceGain   = 15,
                MinEnduranceGain   = 11,
                StatBonusStr       = 1,
                StatBonusCon       = 1
            };


            #region  Lvl 1 skills

            var longBlades = LongBlades.LongBladesAb();
            longBlades.Learned = true;
            thief.Skills.Add(longBlades);

            var shortBlades = ShortBlades.ShortBladesAb();
            shortBlades.Learned = true;
            thief.Skills.Add(shortBlades);


            var staff = Staff.StaffAb();
            staff.Learned = true;
            thief.Skills.Add(staff);

            var handToHand = HandToHand.HandToHandAb();
            handToHand.Learned = true;
            thief.Skills.Add(handToHand);

            var lightArmour = LightArmour.LightArmourAb();
            lightArmour.Learned = true;
            thief.Skills.Add(lightArmour);

            #endregion

            #region  Lvl 2 skills
            var dodge = Player.Skills.Dodge.DodgeAb();
            dodge.LevelObtained = 2;
            thief.Skills.Add(dodge);

            #endregion

            #region  Lvl 3 skills
            var sneak = Player.Skills.Sneak.SneakAb();
            sneak.LevelObtained = 3;
            thief.Skills.Add(dodge);

            var exotic = Exotic.ExoticAb();
            exotic.LevelObtained = 3;
            thief.Skills.Add(exotic);

            #endregion

            #region  Lvl 4 skills
            var kick = Player.Skills.Kick.KickAb();
            kick.LevelObtained = 5;
            thief.Skills.Add(kick);

            #endregion


            #region Lvl 5 skills

            var blunt = BluntWeapons.BluntWeaponsAb();
            blunt.LevelObtained = 5;
            thief.Skills.Add(blunt);


            #endregion


            #region Lvl 7 skills

            var trip = Trip.TripAb();
            trip.LevelObtained = 7;
            thief.Skills.Add(trip);
            #endregion

            #region Lvl 8 skills

            var lore = Lore.LoreAb();
            thief.Skills.Add(lore);
            #endregion

            #region Lvl 9 skills

            var hide = Hide.HideAb();
            hide.LevelObtained = 9;
            thief.Skills.Add(hide);
            #endregion

            #region Lvl 10 skills

            var skick = SpinKick.KickAb();
            thief.Skills.Add(skick);

            var peak = Peak.PeakAb();
            thief.Skills.Add(peak);
            #endregion

            #region Lvl 11 skills

            var steal = Steal.StealAb();
            thief.Skills.Add(steal);


            #endregion


            #region Lvl 12 skills

            var tumble = Tumble.TumbleAb();
            thief.Skills.Add(tumble);
            #endregion


            #region Lvl 13 skills

            var picklock = LockPick.LockPickAb();
            thief.Skills.Add(picklock);
            #endregion

            #region Lvl 14 skills

            var dkick = DirtKick.DirtKickAb();
            dkick.LevelObtained = 14;
            thief.Skills.Add(dkick);
            #endregion


            #region Lvl 15 skills

            var bstab = Backstab.BackstabAb();
            thief.Skills.Add(bstab);
            #endregion

            #region Lvl 16 skills

            var parry = Parry.ParryAb();
            parry.LevelObtained = 16;
            thief.Skills.Add(parry);
            #endregion


            #region Lvl 18 skills

            var disarm = Disarm.DisarmAb();
            disarm.LevelObtained = 18;
            thief.Skills.Add(disarm);
            #endregion

            #region Lvl 20 skills

            var feint = Feint.FeintAb();

            thief.Skills.Add(feint);
            #endregion



            thief.ReclassOptions.Add(Ranger.RangerClass());

            return(thief);
        }
Exemplo n.º 23
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dict = new Dictionary <string, string>();

            dict["Miss"]  = Miss.ToString("F2") + "%";
            dict["Dodge"] = Dodge.ToString("F2") + "%";
            dict["Parry"] = Parry.ToString("F2") + "%";
            dict["Armor Damage Reduction"] = (ArmorDamageReduction * 100.0f).ToString("F2") + "%";
            dict["Magic Damage Reduction"] = (MagicDamageReduction * 100.0f).ToString("F2") + "%"
                                             + string.Format("*Arcane: {0:0}\n", BasicStats.ArcaneResistance)
                                             + string.Format("Fire: {0:0}\n", BasicStats.FireResistance)
                                             + string.Format("Frost: {0:0}\n", BasicStats.FrostResistance)
                                             + string.Format("Nature: {0:0}\n", BasicStats.NatureResistance)
                                             + string.Format("Shadow: {0:0}", BasicStats.ShadowResistance);

            dict["Total Avoidance"] = (Miss + Parry + Dodge).ToString("F2") + "%"; // Another duplicate math location.
            dict["Burst Time"]      = String.Format("{0:0.0} sec", BurstTime);
            dict["Reaction Time"]   = String.Format("{0:0.0} sec", ReactionTime);

            dict["Health"]                   = BasicStats.Health.ToString("F0");
            dict["Armor"]                    = BasicStats.Armor.ToString("F0");
            dict["Strength"]                 = BasicStats.Strength.ToString("F0");
            dict["Agility"]                  = BasicStats.Agility.ToString("F0");
            dict["Stamina"]                  = BasicStats.Stamina.ToString("F0");
            dict["Hit Rating"]               = BasicStats.HitRating.ToString("F0");
            dict["Haste Rating"]             = BasicStats.HasteRating.ToString("F0");
            dict["Crit Rating"]              = BasicStats.CritRating.ToString("F0");
            dict["Physical Crit"]            = (BasicStats.PhysicalCrit * 100f).ToString("F2");
            dict["Expertise"]                = Expertise.ToString("F0");
            dict["Attack Power"]             = BasicStats.AttackPower.ToString("F0");
            dict["Armor Penetration"]        = (BasicStats.ArmorPenetration * 100f).ToString("F2") + "%";
            dict["Armor Penetration Rating"] = BasicStats.ArmorPenetrationRating.ToString("F0");

            dict["DPS"]           = DPS.ToString("F0");
            dict["Rotation Time"] = String.Format("{0:0.00} sec", (RotationTime / 1000));
            dict["Total Threat"]  = TotalThreat.ToString("F0");

            #region Rune Strike Limit
            dict["RS Limited"] = "";
            if (RSLimit == (int)RSState.Good)
            {
                dict["RS Limited"] = "none";
            }
            else
            {
                if (1 == (RSLimit & (int)RSState.TimeStarved))
                {
                    dict["RS Limited"] += "Swing Starved ";
                }
                if (1 == (RSLimit & (int)RSState.RPStarved))
                {
                    dict["RS Limited"] += "RP Starved ";
                }
            }
            #endregion
            #region Ability Costs
            dict["Blood"]       = Blood.ToString("F0");
            dict["Frost"]       = Frost.ToString("F0");
            dict["Unholy"]      = Unholy.ToString("F0");
            dict["Death"]       = Death.ToString("F0");
            dict["Runic Power"] = RP.ToString("F0");
            #endregion


            dict["Overall Points"]    = OverallPoints.ToString("F1");
            dict["Mitigation Points"] = String.Format("{0:0.0}", (Mitigation * MitigationWeight)); // Modified Mitigation.
            dict["Survival Points"]   = String.Format("{0:0.0}", (Survival * SurvivalWeight))
                                        + string.Format("*Physical:{0:0.0}\n", (PhysicalSurvival * SurvivalWeight))
                                        + string.Format("Bleed:{0:0.0}\n", (BleedSurvival * SurvivalWeight))
                                        + string.Format("Magic:{0:0.0}", (MagicSurvival * SurvivalWeight)); // Modified Survival
            dict["Threat Points"] = String.Format("{0:0.0}", (Threat * ThreatWeight));                      // Modified Threat

            dict["Crit"]                  = Crit.ToString("F2");
            dict["Defense"]               = Defense.ToString("F0");
            dict["Resilience"]            = Resilience.ToString("F0");
            dict["Defense Rating"]        = DefenseRating.ToString("F0");
            dict["Defense Rating needed"] = DefenseRatingNeeded.ToString("F0");

            dict["Target Miss"]  = (TargetMiss * 100.0f).ToString("F1") + "%";
            dict["Target Dodge"] = (TargetDodge * 100.0f).ToString("F1") + "%";
            dict["Target Parry"] = (TargetParry * 100.0f).ToString("F1") + "%";

            return(dict);
        }
Exemplo n.º 24
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dict = new Dictionary <string, string>();

            dict["Miss"]  = Miss.ToString("P2") + "*" + SEStats.Miss.ToString("P2") + " after special effects";
            dict["Dodge"] = Dodge.ToString("P2") + " : " + BasicStats.DodgeRating.ToString("F0") + "*" + SEStats.DodgeRating.ToString("F0") + " Rating - " + SEStats.Dodge.ToString("P2") + " after special effects";
            dict["Parry"] = Parry.ToString("P2") + " : " + BasicStats.ParryRating.ToString("F0") + "*" + SEStats.ParryRating.ToString("F0") + " Rating - " + SEStats.Parry.ToString("P2") + " after special effects";
            dict["Armor Damage Reduction"] = ArmorDamageReduction.ToString("P2");
            dict["Magic Damage Reduction"] = MagicDamageReduction.ToString("P2")
                                             + string.Format("*Arcane: {0:0}\r\n", BasicStats.ArcaneResistance)
                                             + string.Format("Fire: {0:0}\r\n", BasicStats.FireResistance)
                                             + string.Format("Frost: {0:0}\r\n", BasicStats.FrostResistance)
                                             + string.Format("Nature: {0:0}\r\n", BasicStats.NatureResistance)
                                             + string.Format("Shadow: {0:0}", BasicStats.ShadowResistance);

            dict["Total Avoidance"] = (Miss + Parry + Dodge).ToString("P2"); // Another duplicate math location.

            dict["Health"]        = BasicStats.Health.ToString("F0") + "*" + SEStats.Health.ToString("F0") + " after special effects";
            dict["Armor"]         = BasicStats.Armor.ToString("F0") + "*" + SEStats.Armor.ToString("F0") + " after special effects";
            dict["Strength"]      = BasicStats.Strength.ToString("F0") + "*" + SEStats.Strength.ToString("F0") + " after special effects";
            dict["Agility"]       = BasicStats.Agility.ToString("F0") + "*" + SEStats.Agility.ToString("F0") + " after special effects";
            dict["Stamina"]       = BasicStats.Stamina.ToString("F0") + "*" + SEStats.Stamina.ToString("F0") + " after special effects";
            dict["Hit Rating"]    = BasicStats.HitRating.ToString("F0") + "*" + SEStats.HitRating.ToString("F0") + " after special effects";
            dict["Haste Rating"]  = BasicStats.HasteRating.ToString("F0") + "*" + SEStats.HasteRating.ToString("F0") + " after special effects";
            dict["Crit Rating"]   = BasicStats.CritRating.ToString("F0") + "*" + SEStats.CritRating.ToString("F0") + " after special effects";
            dict["Physical Crit"] = BasicStats.PhysicalCrit.ToString("P2") + "*" + SEStats.PhysicalCrit.ToString("F0") + " after special effects";
            dict["Expertise"]     = Expertise.ToString("F0") + "*" + SEStats.Expertise.ToString("F0") + " after special effects";
            dict["Attack Power"]  = BasicStats.AttackPower.ToString("F0") + "*" + SEStats.AttackPower.ToString("F0") + " after special effects including Vengeance";
            dict["Mastery"]       = BasicStats.Mastery.ToString("F2") + String.Format(" ({0:0.00} %)*", (BasicStats.Mastery * 6.25f)) + BasicStats.MasteryRating.ToString("F0") + " Rating - " + SEStats.MasteryRating.ToString("F0") + " after special effects";

            dict["DPS"]           = DPS.ToString("F0") + "* At Max Vengeance";
            dict["Rotation Time"] = String.Format("{0:0.00} sec", RotationTime);
            dict["Total Threat"]  = TotalThreat.ToString("F0");

            #region Ability Costs
            dict["Blood"]       = Blood.ToString("F0");
            dict["Frost"]       = Frost.ToString("F0");
            dict["Unholy"]      = Unholy.ToString("F0");
            dict["Death"]       = Death.ToString("F0");
            dict["Runic Power"] = RP.ToString("F0");
            dict["RE Runes"]    = FreeRERunes.ToString("F0");
            #endregion

            dict["Overall Points"]    = OverallPoints.ToString("F1");
            dict["Mitigation Points"] = String.Format("{0:0.0}*"
                                                      + "{1:000000.0} Crit Mitigation"
                                                      + "\r\n{2:000000.0} Avoidance Mitigation"
                                                      + "\r\n{3:000000.0} Armor Mitigation"
                                                      + "\r\n{4:000000.0} Damage Taken Mitigation"
                                                      + "\r\n{5:000000.0} Impedence Mitigation"
                                                      + "\r\n{6:000000.0} Health Restoration Mitigation",
                                                      Mitigation, CritMitigation, AvoidanceMitigation, ArmorMitigation,
                                                      DamageTakenMitigation, ImpedenceMitigation, HealsMitigation);
            dict["Survival Points"] = String.Format("{0:0.0}*"
                                                    + "{1:000000.0} Physical Survival"
                                                    + "\r\n{2:000000.0} Bleed Survival"
                                                    + "\r\n{3:000000.0} Magic Survival",
                                                    Survivability, PhysicalSurvival, BleedSurvival, MagicSurvival);
            dict["Burst Points"]    = String.Format("{0:0.0}", Burst * BurstWeight);       // Modified Burst
            dict["Recovery Points"] = String.Format("{0:0.0}", Recovery * RecoveryWeight); // Modified Burst
            dict["Threat Points"]   = String.Format("{0:0.0}", Threat * ThreatWeight);     // Modified Threat

            dict["Target Miss"]  = (TargetMiss).ToString("P1");
            dict["Target Dodge"] = (TargetDodge).ToString("P1");
            dict["Target Parry"] = (TargetParry).ToString("P1");

            dict["DTPS"]                 = DTPS.ToString("F2");
            dict["HPS"]                  = HPS.ToString("F2");
            dict["DPS Avoided"]          = AvoidanceMitigation.ToString("F0");
            dict["DPS Reduced By Armor"] = ArmorMitigation.ToString("F0");
            dict["Death Strike"]         = TotalDShealed.ToString("F0") + "*" + DSCount.ToString("F0") + " Death Strikes Healing for " + DSHeal.ToString("F0") + " avg " + DSOverHeal.ToString("F0") + " avg Overheal";
            dict["Blood Shield"]         = TotalBShield.ToString("F0") + "*" + BShield.ToString("F0") + " average shield size";

            return(dict);
        }
Exemplo n.º 25
0
 string BuildParryStats(Parry parryCounts)
 {
     return(string.Join(Environment.NewLine, parryCounts.Counts.Select(pair => pair.Key + ": " + pair.Value)));
 }
Exemplo n.º 26
0
        public static PlayerClass FighterClass()
        {
            var fighter = new PlayerClass
            {
                Name               = "Fighter",
                IsBaseClass        = true,
                ExperienceModifier = 500,
                HelpText           = new Help(),
                Skills             = new List <Skill>(),
                ReclassOptions     = new List <PlayerClass>(),
                MaxHpGain          = 15,
                MinHpGain          = 10,
                MaxManaGain        = 8,
                MinManaGain        = 4,
                MaxEnduranceGain   = 15,
                MinEnduranceGain   = 11,
                StatBonusStr       = 1,
                StatBonusCon       = 1,
            };

            /* TODO: some skills to add
             * Axe Dagger Polearm  Mace
             * Spear Shield Block
             * staff  sword
             *  bash Whip Enhanced damage
             *  parry rescue swim  scrolls
             *  staves  wands  recall
             *  age  dig
             *  dirt kicking
             *  second atttack
             *  third attack
             *  fouth attack
             *  fast healing
             *  kick
             *  disarm
             *  blind fighting
             *  trip
             *  berserk
             *  dual wield (eek)
             * */


            #region  Lvl 1 skills

            var longBlades = LongBlades.LongBladesAb();
            longBlades.Learned = true;
            fighter.Skills.Add(longBlades);

            var shortBlades = ShortBlades.ShortBladesAb();
            shortBlades.Learned = true;
            fighter.Skills.Add(shortBlades);

            var axe = Axe.AxeAb();
            axe.Learned = true;
            fighter.Skills.Add(axe);

            var blunt = BluntWeapons.BluntWeaponsAb();
            blunt.Learned = true;
            fighter.Skills.Add(blunt);

            var polearm = Polearms.PolearmsAb();
            polearm.Learned = true;
            fighter.Skills.Add(polearm);

            var exotic = Exotic.ExoticAb();
            exotic.Learned = true;
            fighter.Skills.Add(exotic);

            var staff = Staff.StaffAb();
            staff.Learned = true;
            fighter.Skills.Add(staff);

            var handToHand = HandToHand.HandToHandAb();
            handToHand.Learned = true;
            fighter.Skills.Add(handToHand);

            var lightArmour = LightArmour.LightArmourAb();
            lightArmour.Learned = true;
            fighter.Skills.Add(lightArmour);



            #endregion

            #region  Lvl 2 skills
            fighter.Skills.Add(HeavyArmour.HeavyArmourAb());
            fighter.Skills.Add(MediumArmour.MediumArmourAb());


            #endregion

            #region Lvl 3 skills
            fighter.Skills.Add(Trip.TripAb());
            #endregion

            #region Lvl 4
            fighter.Skills.Add(FastHealing.FastHealingAb());
            fighter.Skills.Add(Toughness.ToughnessAb());
            #endregion

            #region Lvl 5

            var parry = Parry.ParryAb();
            fighter.Skills.Add(parry);


            #endregion


            #region Lvl 6

            var shieldBlock = ShieldBlock.ShieldBlockAb();
            fighter.Skills.Add(shieldBlock);

            var dodge = Dodge.DodgeAb();
            fighter.Skills.Add(dodge);

            #endregion


            #region Lvl 7

            var dirtKick = DirtKick.DirtKickAb();
            fighter.Skills.Add(dirtKick);

            var kick = Kick.KickAb();
            fighter.Skills.Add(kick);

            #endregion

            #region Lvl 9

            var bash = Bash.BashAb();
            fighter.Skills.Add(bash);



            #endregion


            #region Lvl 10

            var rescue = Rescue.RescueAb();
            fighter.Skills.Add(rescue);



            #endregion

            #region Lvl 11

            var sneak = Sneak.SneakAb();
            fighter.Skills.Add(sneak);



            #endregion


            #region Lvl 12
            fighter.Skills.Add(SecondAttack.SecondAttackAb());



            #endregion


            #region Lvl 13

            var lunge = Lunge.LungeAb();
            fighter.Skills.Add(lunge);



            #endregion


            #region Lvl 14

            var sbash = ShieldBash.ShieldBashAb();
            fighter.Skills.Add(sbash);

            #endregion


            #region Lvl 15

            var disarm = Disarm.DisarmAb();
            fighter.Skills.Add(disarm);

            #endregion


            #region Lvl 16

            var enhancedDam = EnhancedDamage.EnhancedDamageAb();
            fighter.Skills.Add(enhancedDam);

            #endregion

            #region Lvl 18

            var mount = Mount.MountAb();
            fighter.Skills.Add(mount);

            #endregion

            #region Lvl 20

            var thirdAttk = ThirdAttack.ThirdAttackAb();
            fighter.Skills.Add(thirdAttk);

            #endregion



            fighter.ReclassOptions.Add(Ranger.RangerClass());

            return(fighter);
        }
Exemplo n.º 27
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();
            int   armorCap             = (int)Math.Ceiling((1402.5f * TargetLevel) - 66502.5f);
            float levelDifference      = 0.2f * (TargetLevel - 70);
            float targetCritReduction  = 5f + levelDifference;
            float currentCritReduction = ((float)Math.Floor(
                                              (BasicStats.DefenseRating * WarriorConversions.DefenseRatingToDefense + BasicStats.Defense)) *
                                          WarriorConversions.DefenseToCritReduction) +
                                         (BasicStats.Resilience * WarriorConversions.ResilienceRatingToCritReduction);
            int defToCap = 0, resToCap = 0;

            if (currentCritReduction < targetCritReduction)
            {
                while ((((float)Math.Floor(
                             ((BasicStats.DefenseRating + defToCap) * WarriorConversions.DefenseRatingToDefense + BasicStats.Defense)) *
                         WarriorConversions.DefenseToCritReduction) +
                        (BasicStats.Resilience * WarriorConversions.ResilienceRatingToCritReduction)) < targetCritReduction)
                {
                    defToCap++;
                }
                while ((((float)Math.Floor(
                             (BasicStats.DefenseRating * WarriorConversions.DefenseRatingToDefense + BasicStats.Defense)) *
                         WarriorConversions.DefenseToCritReduction) +
                        ((BasicStats.Resilience + resToCap) * WarriorConversions.ResilienceRatingToCritReduction)) < targetCritReduction)
                {
                    resToCap++;
                }
            }
            else if (currentCritReduction > targetCritReduction)
            {
                while ((((float)Math.Floor(
                             ((BasicStats.DefenseRating + defToCap) * WarriorConversions.DefenseRatingToDefense + BasicStats.Defense)) *
                         WarriorConversions.DefenseToCritReduction) +
                        (BasicStats.Resilience * WarriorConversions.ResilienceRatingToCritReduction)) > targetCritReduction)
                {
                    defToCap--;
                }
                while ((((float)Math.Floor(
                             (BasicStats.DefenseRating * WarriorConversions.DefenseRatingToDefense + BasicStats.Defense)) *
                         WarriorConversions.DefenseToCritReduction) +
                        ((BasicStats.Resilience + resToCap) * WarriorConversions.ResilienceRatingToCritReduction)) > targetCritReduction)
                {
                    resToCap--;
                }
                defToCap++;
                resToCap++;
            }

            dictValues.Add("Health", BasicStats.Health.ToString());
            dictValues.Add("Strength", BasicStats.Strength.ToString());
            dictValues.Add("Agility", BasicStats.Agility.ToString());
            dictValues.Add("Stamina", BasicStats.Stamina.ToString());
            dictValues.Add("Armor", BasicStats.Armor.ToString());
            dictValues.Add("Defense", Defense.ToString() +
                           string.Format("*Defense Rating {0}", BasicStats.DefenseRating));
            dictValues.Add("Dodge", Dodge.ToString() +
                           string.Format("%*Dodge Rating {0}", BasicStats.DodgeRating));
            dictValues.Add("Parry", Parry.ToString() +
                           string.Format("%*Parry Rating {0}", BasicStats.ParryRating));
            if (BlockOverCap > 0f)
            {
                dictValues.Add("Block", (Block + BlockOverCap).ToString()
                               + string.Format("%*Block Rating {0}. Over the crush cap by {1}% block", BasicStats.BlockRating, BlockOverCap));
            }
            else
            {
                dictValues.Add("Block", Block.ToString()
                               + string.Format("%*Block Rating {0}", BasicStats.BlockRating));
            }
            dictValues.Add("Miss", Miss.ToString() + "%");
            dictValues.Add("Resilience", BasicStats.Resilience.ToString() +
                           string.Format(@"*Reduces periodic damage and chance to be critically hit by {0}%.
Reduces the effect of mana-drains and the damage of critical strikes by {1}%.",
                                         BasicStats.Resilience * WarriorConversions.ResilienceRatingToCritReduction,
                                         BasicStats.Resilience * WarriorConversions.ResilienceRatingToCritReduction * 2));
            dictValues.Add("Block Value", BlockValue.ToString());

            #region Offensive Stats
            dictValues["Attack Power"] = BasicStats.AttackPower.ToString();
            dictValues["Hit"]          = (BasicStats.HitRating * WarriorConversions.HitRatingToHit +
                                          BasicStats.Hit).ToString() +
                                         string.Format("%*Hit Rating {0}", BasicStats.HitRating);
            dictValues["Expertise"] = (Math.Round(BasicStats.ExpertiseRating * WarriorConversions.ExpertiseRatingToExpertise +
                                                  BasicStats.Expertise)).ToString() +
                                      string.Format(@"*Expertise Rating {0}
Reduces chance to be dodged or parried by {1}%.", BasicStats.ExpertiseRating,
                                                    Math.Round((BasicStats.ExpertiseRating * WarriorConversions.ExpertiseRatingToExpertise +
                                                                BasicStats.Expertise) * WarriorConversions.ExpertiseToDodgeParryReduction));
            dictValues["Haste"] = (BasicStats.HasteRating * WarriorConversions.HasteRatingToHaste).ToString() +
                                  string.Format("%*Haste Rating {0}", BasicStats.HasteRating);
            dictValues["Armor Penetration"] = BasicStats.ArmorPenetration.ToString();
            dictValues["Crit"] = Crit.ToString() +
                                 string.Format("%*Crit Rating {0}", BasicStats.CritRating);
            dictValues["Weapon Damage"] = BasicStats.WeaponDamage.ToString();
            dictValues.Add("Missed Attacks", AvoidedAttacks.ToString() +
                           string.Format(@"%*Out of 100 attacks:
Attacks Missed: {0}%
Attacks Dodged: {1}%
Attacks Parried: {2}%", MissedAttacks, DodgedAttacks, ParriedAttacks));
            dictValues.Add("Limited Threat", (LimitedThreat / ThreatScale).ToString() +
                           string.Format(@"*White TPS: {0}
Shield Slam TPS: {1}
Revenge TPS: {2}
Devastate TPS: {3}
Windfury TPS: {4}", WhiteThreat, ShieldSlamThreat, RevengeThreat, DevastateThreat, WindfuryThreat));
            dictValues.Add("Unlimited Threat", (UnlimitedThreat / ThreatScale).ToString() +
                           string.Format(@"*Heroic Strike TPS: {0}
Shield Slam TPS: {1}
Revenge TPS: {2}
Devastate TPS: {3}
Windfury TPS: {4}", HeroicStrikeThreat, ShieldSlamThreat, RevengeThreat, DevastateThreat, WindfuryThreat));
            #endregion

            dictValues["Nature Resist"] = (BasicStats.NatureResistance + BasicStats.AllResist).ToString();
            dictValues["Arcane Resist"] = (BasicStats.ArcaneResistance + BasicStats.AllResist).ToString();
            dictValues["Frost Resist"]  = (BasicStats.FrostResistance + BasicStats.AllResist).ToString();
            dictValues["Fire Resist"]   = (BasicStats.FireResistance + BasicStats.AllResist).ToString();
            dictValues["Shadow Resist"] = (BasicStats.ShadowResistance + BasicStats.AllResist).ToString();
            if (BasicStats.Armor == armorCap)
            {
                dictValues.Add("Mitigation", Mitigation.ToString()
                               + string.Format("%*Exactly at the armor cap against level {0} mobs.", TargetLevel));
            }
            else if (BasicStats.Armor > armorCap)
            {
                dictValues.Add("Mitigation", Mitigation.ToString()
                               + string.Format("%*Over the armor cap by {0} armor.", BasicStats.Armor - armorCap));
            }
            else
            {
                dictValues.Add("Mitigation", Mitigation.ToString()
                               + string.Format("%*Short of the armor cap by {0} armor.", armorCap - BasicStats.Armor));
            }
            dictValues.Add("Avoidance", DodgePlusMissPlusParry.ToString() + "%");
            dictValues.Add("Avoidance + Block", DodgePlusMissPlusParryPlusBlock.ToString() + "%");
            dictValues.Add("Total Mitigation", TotalMitigation.ToString() + "%");
            dictValues.Add("Damage Taken", DamageTaken.ToString() + "%");
            if (defToCap == 0 && resToCap == 0)
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritReduction).ToString()
                               + "%*Exactly enough defense rating/resilience to be uncrittable by bosses.");
            }
            else if (defToCap + resToCap > 0)
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritReduction).ToString()
                               + string.Format("%*CRITTABLE! Short by {0} defense rating ({1} defense) or {2} resilience to be uncrittable by bosses.",
                                               defToCap, defToCap * WarriorConversions.DefenseRatingToDefense, resToCap));
            }
            else
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritReduction).ToString()
                               + string.Format("%*Uncrittable by bosses. {0} defense rating ({1} defense) or {2} resilience over the crit cap.",
                                               -defToCap, -defToCap * WarriorConversions.DefenseRatingToDefense, -resToCap));
            }

            dictValues.Add("Chance Crushed", CrushChance.ToString() + "%");
            dictValues.Add("Overall Points", OverallPoints.ToString());
            dictValues.Add("Mitigation Points", MitigationPoints.ToString());
            dictValues.Add("Survival Points", SurvivalPoints.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();

            return(dictValues);
        }
Exemplo n.º 28
0
        /// <summary>

        /// </summary>
        /// <returns></returns>
        public static PlayerSetup.Player AnkerGuardNpc()
        {
            var Guard = new PlayerSetup.Player
            {
                NPCId        = Guid.NewGuid(),
                Name         = "Lara, the Anker guard",
                NPCLongName  = "Lara the guard stands here keeping watch",
                KnownByName  = true,
                Type         = PlayerSetup.Player.PlayerTypes.Mob,
                Description  = "Dark chain mail armour covers the guard head to toe. A long sword is sheathed at her waist",
                Strength     = 70,
                Dexterity    = 72,
                Constitution = 60,
                Intelligence = 60,
                Wisdom       = 60,
                Charisma     = 60,
                MaxHitPoints = 722,
                HitPoints    = 722,
                Level        = 23,
                Status       = PlayerSetup.Player.PlayerStatus.Standing,
                Skills       = new List <Skill>()
                {
                    Dodge.DodgeAb(),
                ShieldBlock.ShieldBlockAb(),
                Parry.ParryAb(),
                SecondAttack.SecondAttackAb(),
                LongBlades.LongBladesAb(),
                },
                Inventory     = new ItemContainer(),
                Trainer       = false,
                Greet         = true,
                Shop          = false,
                GreetMessage  = "Hello there!",
                DialogueTree  = new List <DialogTree>(),
                Dialogue      = new List <Responses>(),
                Quest         = new List <Quest>(),
                Region        = "Anker",
                Area          = "Anker",
                AreaId        = 37,
                Gender        = "Female",
                SelectedClass = "Fighter",
                ArmorRating   = 280,
                Recall        = new Recall()
                {
                    Region = "Anker",
                    Area   = "Anker",
                    AreaId = 37
                },
                Guard = true,

                PathList = new List <string>()
                {
                    "e",
                    "e",
                    "e",
                    "e",
                    "e",
                    "e",
                    "e",
                    //reverse
                    "w",
                    "w",
                    "w",
                    "w",
                    "w",
                    "w",
                    "w"
                }
            };

            var sword = LongSwordBasic.LongIronSword();

            sword.stats = new Stats()
            {
                damMin = 1,
                damMax = 20
            };
            Guard.Equipment.Wielded = sword.name;
            sword.location          = Item.Item.ItemLocation.Wield;
            Guard.Inventory.Add(sword);


            return(Guard);
        }