예제 #1
0
    // Start is called before the first frame update
    void Awake()
    {
        //Temporarily disabled since it gave errors
        weaponDamage = GameObject.FindGameObjectWithTag("Weapon").GetComponent <WeaponDamage>();
        spellHit     = GameObject.FindGameObjectWithTag("SpellCollider").GetComponent <SpellHit>();
        anim         = GetComponent <Animator>();
        rb           = GetComponent <Rigidbody>();
        shovel       = GameObject.Find("Shovel").GetComponent <Renderer>();
        shield       = GameObject.Find("Shield").GetComponent <Renderer>();
        dashSmoker   = GetComponent <DashSmokeScripts>();
        noOfClicks   = 0;
        canClick     = true;
        endPosition  = new Vector3(0, 0, 0);

        //PhotonView
        PV = GetComponent <PhotonView>();


        // Input Controller Related Things Start Here ------------------------------------

        controls = new PlayerControls();

        // Rotation
        controls.Gameplay.Rotate.performed += ctx => rotateInput = ctx.ReadValue <Vector2>();
        controls.Gameplay.Rotate.canceled  += ctx => rotateInput = Vector2.zero;

        // Other Stuff
        controls.Gameplay.MeleeAttack.performed += ctx => MeleeAttack();
        controls.Gameplay.Spell1.performed      += ctx => Spell1();
        controls.Gameplay.Spell2.performed      += ctx => Spell2();
        controls.Gameplay.Walk.performed        += ctx => Walk();
        controls.Gameplay.Walk.canceled         += ctx => Run();
        controls.Gameplay.Interactive.performed += ctx => OnInteract();
        controls.Gameplay.Interactive.canceled  += ctx => NoInteract();
        controls.Gameplay.Pause.performed       += ctx => Pause();
        controls.Gameplay.AngleChange.performed += ctx => ChangeAngle();

        // Input Controller Related Things End Here --------------------------------------
    }
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            dictValues.Add("Health", BasicStats.Health.ToString("F0", CultureInfo.InvariantCulture));
            dictValues.Add("Mana", BasicStats.Mana.ToString("F0", CultureInfo.InvariantCulture));
            dictValues.Add("Attack Power", BasicStats.AttackPower.ToString("F0", CultureInfo.InvariantCulture));
            dictValues.Add("Agility", BasicStats.Agility.ToString("F0", CultureInfo.InvariantCulture));
            dictValues.Add("Strength", BasicStats.Strength.ToString("F0", CultureInfo.InvariantCulture));
            dictValues.Add("Intellect", BasicStats.Intellect.ToString("F0", CultureInfo.InvariantCulture));

            dictValues.Add("White Hit", WhiteHit.ToString("F2", CultureInfo.InvariantCulture) + "%");
            if (YellowHit < 100f && TotalExpertiseMH < 26)
            {
                float ratingRequired = (float)Math.Ceiling(4f * StatConversion.GetRatingFromExpertise(100f - YellowHit));
                dictValues.Add("Yellow Hit", String.Format("{0}% (Under Cap)*You need {1} more expertise to cap specials (WF,SS)",
                                                           YellowHit.ToString("F2", CultureInfo.InvariantCulture),
                                                           ratingRequired.ToString("F0", CultureInfo.InvariantCulture)));
            }
            else
            {
                if (ParriedAttacks > 0)
                {
                    float ratingRequired = (float)Math.Ceiling(4f * StatConversion.GetRatingFromExpertise(100f - YellowHit));
                    dictValues.Add("Yellow Hit", String.Format("{0}%*Being in front of boss allows your attacks to be parried\r\nYou would need {1} more expertise to cap specials (WF,SS)",
                                                               YellowHit.ToString("F2", CultureInfo.InvariantCulture),
                                                               ratingRequired.ToString("F0", CultureInfo.InvariantCulture)));
                }
                else
                {
                    dictValues.Add("Yellow Hit", YellowHit.ToString("F2", CultureInfo.InvariantCulture) + "%");
                }
            }
            if (OverSpellHitCap > 0.38f) // only warn if more than .38% over cap (equivalent to 10 hit rating)
            {
                dictValues.Add("Spell Hit", String.Format("{0}% (Over Cap)*Over Spell Hit Cap by {1}%",
                                                          SpellHit.ToString("F2", CultureInfo.InvariantCulture),
                                                          OverSpellHitCap.ToString("F2", CultureInfo.InvariantCulture)));
            }
            else
            {
                if (SpellHit < 100f)
                {
                    float ratingRequired = (float)Math.Ceiling(StatConversion.GetRatingFromHit(1f - SpellHit / 100f));
                    dictValues.Add("Spell Hit", String.Format("{0}% (Under Cap)*You need {1} more hit rating to cap spells (ES, LB etc)",
                                                              SpellHit.ToString("F2", CultureInfo.InvariantCulture),
                                                              ratingRequired.ToString("F0", CultureInfo.InvariantCulture)));
                }
                else
                {
                    dictValues.Add("Spell Hit", SpellHit.ToString("F2", CultureInfo.InvariantCulture) + "%");
                }
            }
            if (OverMeleeCritCap > 0.21f) // only warn if more than .21% over cap (equivalent to 10 crit rating)
            {
                dictValues.Add("Melee Crit", String.Format("{0} (Over Cap)*Crit Rating {1} (+{2}% crit chance)\r\nOver Soft Cap by {3}%",
                                                           MeleeCrit.ToString("F2", CultureInfo.InvariantCulture) + "%",
                                                           BasicStats.CritRating.ToString("F0", CultureInfo.InvariantCulture),
                                                           (StatConversion.GetCritFromRating(BasicStats.CritRating) * 100f).ToString("F2", CultureInfo.InvariantCulture),
                                                           OverMeleeCritCap.ToString("F2", CultureInfo.InvariantCulture)));
            }
            else
            {
                dictValues.Add("Melee Crit", String.Format("{0}*Crit Rating {1} (+{2}% crit chance)",
                                                           MeleeCrit.ToString("F2", CultureInfo.InvariantCulture) + "%",
                                                           BasicStats.CritRating.ToString("F0", CultureInfo.InvariantCulture),
                                                           (StatConversion.GetCritFromRating(BasicStats.CritRating) * 100f).ToString("F2", CultureInfo.InvariantCulture)));
            }

            dictValues.Add("Spell Crit", String.Format("{0}*Crit Rating {1} (+{2}% crit chance)",
                                                       SpellCrit.ToString("F2", CultureInfo.InvariantCulture) + "%",
                                                       BasicStats.CritRating.ToString("F0", CultureInfo.InvariantCulture),
                                                       (StatConversion.GetSpellCritFromRating(BasicStats.CritRating) * 100f).ToString("F2", CultureInfo.InvariantCulture)));

            dictValues.Add("Spellpower", BasicStats.SpellPower.ToString("F0", CultureInfo.InvariantCulture));
            dictValues.Add("Total Expertise", getExpertiseString());
            dictValues.Add("Haste Rating", String.Format("{0}*{1}% Melee Haste\r\n{2}% Spell Haste",
                                                         BasicStats.HasteRating.ToString("F0", CultureInfo.InvariantCulture),
                                                         (StatConversion.GetHasteFromRating(BasicStats.HasteRating, CharacterClass.Shaman) * 100f).ToString("F2", CultureInfo.InvariantCulture),
                                                         (StatConversion.GetSpellHasteFromRating(BasicStats.HasteRating, CharacterClass.Shaman) * 100f).ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Hit Rating", String.Format("{0}*{1}% Melee Hit\r\n{2}% Spell Hit",
                                                       BasicStats.HitRating.ToString("F0", CultureInfo.InvariantCulture),
                                                       (StatConversion.GetHitFromRating(BasicStats.HitRating) * 100f).ToString("F2", CultureInfo.InvariantCulture),
                                                       (StatConversion.GetSpellHitFromRating(BasicStats.HitRating) * 100f).ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Armour Pen Rating", String.Format("{0}*{1}% Armour Penetration",
                                                              BasicStats.ArmorPenetrationRating.ToString("F0", CultureInfo.InvariantCulture),
                                                              (StatConversion.GetArmorPenetrationFromRating(BasicStats.ArmorPenetrationRating) * 100f).ToString("F2", CultureInfo.InvariantCulture)));
            float spellMiss = 100 - SpellHit;

            dictValues.Add("Avoided Attacks", String.Format("{0}%*{1}% Boss Dodged\r\n{2}% Boss Parried\r\n{3}% Spell Misses\r\n{4}% White Misses",
                                                            AvoidedAttacks.ToString("F2", CultureInfo.InvariantCulture),
                                                            DodgedAttacks.ToString("F2", CultureInfo.InvariantCulture),
                                                            ParriedAttacks.ToString("F2", CultureInfo.InvariantCulture),
                                                            spellMiss.ToString("F2", CultureInfo.InvariantCulture),
                                                            MissedAttacks.ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Avg MH Speed", AvMHSpeed.ToString("F2", CultureInfo.InvariantCulture));
            dictValues.Add("Avg OH Speed", AvOHSpeed.ToString("F2", CultureInfo.InvariantCulture));
            dictValues.Add("Armor Mitigation", ArmorMitigation.ToString("F2", CultureInfo.InvariantCulture) + "%*Amount of physical damage lost due to boss armor");

            dictValues.Add("ED Uptime", String.Format("{0}%*{1}% ED Bonus Crit",
                                                      EDUptime.ToString("F2", CultureInfo.InvariantCulture),
                                                      EDBonusCrit.ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Flurry Uptime", FlurryUptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("Avg Time to 5 Stack", String.Format("{0} sec*{1} PPM",
                                                                SecondsTo5Stack.ToString("F2", CultureInfo.InvariantCulture),
                                                                _MWPPM.ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("MH Enchant Uptime", MHEnchantUptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("OH Enchant Uptime", OHEnchantUptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("Trinket 1 Uptime", Trinket1Uptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("Trinket 2 Uptime", Trinket2Uptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("Fire Totem Uptime", FireTotemUptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("Tier 10 2 pc Uptime", T10_2Uptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("Tier 10 4 pc Uptime", T10_4Uptime.ToString("F2", CultureInfo.InvariantCulture) + "%");

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

            dictValues.Add("White Damage", dpsOutputFormat(SwingDamage, DPSPoints, true));
            dictValues.Add("Windfury Attack", dpsOutputFormat(WindfuryAttack, DPSPoints, true));
            dictValues.Add("Flametongue Attack", dpsOutputFormat(FlameTongueAttack, DPSPoints, false));
            dictValues.Add("Lightning Bolt", dpsOutputFormat(LightningBolt, DPSPoints, false));
            dictValues.Add("Earth Shock", dpsOutputFormat(EarthShock, DPSPoints, false));
            dictValues.Add("Flame Shock", dpsOutputFormat(FlameShock, DPSPoints, false));
            dictValues.Add("Searing/Magma Totem", dpsOutputFormat(SearingMagma, DPSPoints, false));
            dictValues.Add("Stormstrike", dpsOutputFormat(Stormstrike, DPSPoints, true));
            dictValues.Add("Spirit Wolf", dpsOutputFormat(SpiritWolf, DPSPoints, true));
            dictValues.Add("Fire Nova", dpsOutputFormat(FireNova, DPSPoints, false));
            dictValues.Add("Fire Elemental", FireElemental.getDPSOutput());
            dictValues.Add("Lightning Shield", dpsOutputFormat(LightningShield, DPSPoints, false));
            dictValues.Add("Lava Lash", dpsOutputFormat(LavaLash, DPSPoints, true));
            dictValues.Add("Total DPS", DPSPoints.ToString("F2", CultureInfo.InvariantCulture));

            dictValues.Add("Enhance Version", _version);

            dictValues.Add("Status", String.Format("Enhance Model : DPS Points {0}, Survivability Points {1}, Overall Points {2}",
                                                   DPSPoints.ToString("F2", CultureInfo.InvariantCulture),
                                                   SurvivabilityPoints.ToString("F2", CultureInfo.InvariantCulture),
                                                   OverallPoints.ToString("F2", CultureInfo.InvariantCulture)));

            return(dictValues);
        }
예제 #3
0
파일: Program.cs 프로젝트: ThulioST/ST
        private static void Loading_OnLoadingComplete(EventArgs args)
        {
            if (User.ChampionName != "Ezreal")
            {
                return;
            }
            Q = new Spell.Skillshot(spellSlot: SpellSlot.Q, spellRange: 1150, skillShotType: SkillShotType.Linear, castDelay: 250, spellSpeed: 200, spellWidth: 600)
            {
                AllowedCollisionCount = 0
            };
            //-------------------------------//
            W = new Spell.Skillshot(spellSlot: SpellSlot.W, spellRange: 1000, skillShotType: SkillShotType.Linear, castDelay: 250, spellSpeed: 1550, spellWidth: 80)
            {
                AllowedCollisionCount = int.MaxValue
            };
            //------------------------------//
            E = new Spell.Skillshot(spellSlot: SpellSlot.E, spellRange: 475, skillShotType: SkillShotType.Circular, castDelay: 250, spellSpeed: null, spellWidth: 700);
            //-----------------------------//
            R = new Spell.Skillshot(spellSlot: SpellSlot.R, spellRange: 3000, skillShotType: SkillShotType.Linear, castDelay: 1000, spellSpeed: 2000, spellWidth: 160)
            {
                AllowedCollisionCount = int.MaxValue
            };

            SpellList.Add(Q);
            SpellList.Add(W);
            SpellList.Add(E);
            SpellList.Add(R);

            var slot = _Player.GetSpellSlotFromName("summonerheal");

            if (slot != SpellSlot.Unknown)
            {
                Heal = new Spell.Active(slot, 600);
            }
            HealthPotion = new Item(2003, 0);

            //Menu cEz//
            Menu = MainMenu.AddMenu("cEzreal", "cEzreal");
            //Combo
            EzMenu = Menu.AddSubMenu("Combo");
            /////////////////////////////////
            EzMenu.Add("Q", new CheckBox("Use Q", true));
            EzMenu.Add("HitChance Q", new Slider("HitChancePercent", 70));
            EzMenu.Add("W", new CheckBox("Use W", true));
            EzMenu.Add("HitChance W", new Slider("HitChancePercent", 50));
            EzMenu.Add("E", new CheckBox("Use E", true));
            EzMenu.Add("HitChance E", new Slider("HitChancePercent", 30));
            EzMenu.Add("R", new CheckBox("Use R", true));
            EzMenu.Add("HitChance R", new Slider("HitChancePercent", 65));
            //ComboBox SpellHit
            SpellHit = Menu.AddSubMenu("Hit%");
            /////////////////////////////
            SpellHit.Add("hit", new ComboBox("Hit Chance", 1, "Low", "Medium", "High"));

            //DrawSystem
            foreach (var Spell in SpellList)
            {
                DrawMenu.Add(Spell.Slot.ToString(), new CheckBox("Draw" + Spell.Slot));
            }

            //Harass
            HarassMenu = Menu.AddSubMenu("Harass");
            ///////////////////////////////////////
            HarassMenu.Add("Q", new CheckBox("Use Q", true));
            HarassMenu.Add("HitChance Q", new Slider("HitChancePercent", 70));
            HarassMenu.Add("ManaQ", new Slider("Min. Mana Percent:", 20));
            HarassMenu.Add("W", new CheckBox("Use W", true));
            HarassMenu.Add("HitChance W", new Slider("HitChancePercent", 50));
            HarassMenu.Add("ManaW", new Slider("Min. Mana Percent:", 20));
            HarassMenu.Add("R", new CheckBox("Use R", true));
            HarassMenu.Add("HitChance R", new Slider("HitChancePercent", 65));
            //AutoHeal
            AutoHealMenu = Menu.AddSubMenu("Potion & HeaL", "Potion & HeaL");
            AutoHealMenu.AddGroupLabel("Auto pot usage");
            AutoHealMenu.Add("potion", new CheckBox("Use potions"));
            AutoHealMenu.Add("potionminHP", new Slider("Minimum Health {0}(%) to use potion", 40));
            AutoHealMenu.Add("potionMinMP", new Slider("Minimum Mana {0}(%) to use potion", 20));
            AutoHealMenu.AddLabel("AUto Heal Usage");
            AutoHealMenu.Add("UseHeal", new CheckBox("Use Heal"));
            AutoHealMenu.Add("useHealHP", new Slider("Minimum Health {0}(%) to use Heal", 20));
            //Draw
            DrawMenu = Menu.AddSubMenu("Draws");
            //////////////////////////////////
            DrawMenu.Add("Q", new CheckBox("DrawQ", true));
            DrawMenu.Add("W", new CheckBox("DrawW", false));
            DrawMenu.Add("E", new CheckBox("DrawE", true));
            DrawMenu.Add("R", new CheckBox("DrawR", false));
            //LaneClear
            LaneMenu = Menu.AddSubMenu("LaneClear");
            //////////////////////////////////////
            LaneMenu.Add("Q", new CheckBox("Use Q", true));
            LaneMenu.Add("ManaQ", new Slider("Min. Mana Percent:", 20));
            //Jungle
            JungleMenu = Menu.AddSubMenu("JungleClear");
            ////////////////////////////////////////////
            JungleMenu.Add("Q", new CheckBox("Use Q"));
            JungleMenu.Add("ManaQ", new Slider("Min. Mana Percent:", 20));


            Game.OnTick    += Game_OnTick;
            Drawing.OnDraw += Game_OnDraw;
        }