Example #1
0
            public virtual object GetCopy()
            {
                DBUPGRADE copy = new DBUPGRADE(hpsInitialData);

                copy.level = this.level;
                copy.owner = this.owner;
                return(copy);
            }
Example #2
0
            internal UPGRADEPROFILE(DBUPGRADE u)
            {
                owner = u;

                hpsInitialData = DHMpqDatabase.UpgradeSlkDatabase["Profile"][u.codeID];

                ////////////////////////
                //  get codeID
                ////////////////////////

                this.m_codeID = hpsInitialData.name;

                ////////////////////////
                //  get name
                ////////////////////////

                this.name = hpsInitialData.GetStringListValue("Name");

                ////////////////////////
                //  get tip
                ////////////////////////

                tip = hpsInitialData.GetStringListValue("Tip");

                ////////////////////////
                //  get ubertip
                ////////////////////////

                ubertip = hpsInitialData.GetStringListValue("Ubertip");

                ////////////////////////
                //  get hotkey
                ////////////////////////

                this.hotkey = hpsInitialData.GetStringValue("Hotkey");

                ////////////////////////
                //  get slot priority
                ////////////////////////

                List <string> buttonpos = hpsInitialData.GetStringListValue("Buttonpos");

                slotPriority = RecordSlotComparer.get_slot(Convert.ToInt32(buttonpos[0]), Convert.ToInt32(buttonpos[1]));

                ////////////////////////
                //  get art
                ////////////////////////

                this.art = hpsInitialData.GetStringListValue("Art");
            }
Example #3
0
        public void showDamageToolTip(UnitStatsCalculator usc)
        {
            UIRichTextEx.Default.ClearText();

            if (usc == null)
            {
                return;
            }

            //Damage totalDamage = (Damage)hero.damage + additional_damage;
            unit hero = usc.unit;

            UIRichTextEx.Default.AddText("Damage: " + usc.total_damage, UIFonts.boldArial8, Color.White);

            UIRichTextEx.Default.AddLineInterval();

            UIRichTextEx.Default.AddText("Type: ", Color.Gray); UIRichTextEx.Default.AddText("Hero", Color.Yellow);
            UIRichTextEx.Default.AddText("\nRange: " + hero.range + " (" + hero.attackMethod + ")", Color.Gray);
            UIRichTextEx.Default.AddText("\nSpeed (cooldown): " + hero.cooldown + " sec (" + ((int)(hero.ias * 100)).ToString(DBINT.full_format, DBDOUBLE.provider) + "% IAS)");
            UIRichTextEx.Default.AddText("\nAvg. damage per second: " + usc.dps_normal.ToString(DBDOUBLE.format, DBDOUBLE.provider));

            // atack damage ugrades

            DBUPGRADE upgrade = hero.upgrades.GetByEffectOfType <DbAttackDamageBonus>();

            if (upgrade != null)
            {
                UIRichTextEx.Default.AddText("\nUpgrade: " + upgrade.Profile.Name + " - Level " + upgrade.Level);
            }

            UIRichTextEx.Default.AddLineInterval();

            UIRichTextEx.Default.AddText("Hero attacks do reduced damage to fortified armor", Color.White);

            contentRTB.Rtf = UIRichTextEx.Default.CloseRtf();
        }