コード例 #1
0
 public override string Format()
 {
     if (Count > 1)
     {
         return(Count.ToString() + " " + HtmlCompiler.GetPlural(Translation.Translate(Structure)));
     }
     return(Translation.Translate(Structure));
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: jpb06/DowproStatsCompiler
 public static void Dump()
 {
     MainForm.ToggleLock();
     BarReset(Bars.Data);
     BarReset(Bars.Html);
     DataDumper.Dump();
     HtmlCompiler.CompileHtml();
     MainForm.ToggleLock();
 }
コード例 #3
0
        public override string Format()
        {
            string output = "";

            if (Count > 1)
            {
                output += Count.ToString() + " ";
                output += HtmlCompiler.GetPlural(Translation.Translate(OwnName));
            }
            else
            {
                output = Translation.Translate(OwnName);
            }
            return(output);
        }
コード例 #4
0
        public override void Compile(ref int index, ref string html)
        {
            HtmlCompiler.HtmlInsert(ref index, ref html, "<h4>" + Name + "</h4>");
            HtmlCompiler.CompileToolTips(ref index, ref html, this);
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""box"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""boxHeader skillHeader"">" + Name + "</div>");
            if (Icon == null)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/general/PassiveAbility_icon.jpg"">");
            }
            else
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/" + Icon + @".png"">");
            }


            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""innerInfo"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""innerInfoTable"">");


            #region SKILL INFO TABLE

            #region APPLICATION-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Application Type</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Activated Ability");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region target-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Target types</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, FormatAlliance() + " " + FormatFilter());
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region REQUIREMENTS

            if (Requirements != null && Requirements.Count > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Requirements</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, HtmlCompiler.CompileRequirements(Requirements));
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region MODIFIERS

            string mod = "";
            mod += HtmlCompiler.CompileModifiers(Modifiers);


            if (mod != "")
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Effects</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td><ul class=""innerInfoList"">");
                HtmlCompiler.HtmlInsert(ref index, ref html, mod);
                HtmlCompiler.HtmlInsert(ref index, ref html, "</ul></td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region AREA OF EFFECT - RANGE

            if (Radius > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Area of Effect</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>" + Radius + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region DURATION AND RECHARGE TIME


            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Duration</td>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>" + Duration.ToString() + " seconds.</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");


            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Recharge time</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>" + RechargeTime.ToString() + " seconds.</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");


            #endregion


            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");

            #region DAMAGE

            if (Weapon.MoraleDamage > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""dpsTable skillDpsTable"">");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<th colspan=""8"">Damage values</th>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

                #region DpsTables
                double dps = 0.0;
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");

                #region INFANTRY
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class =""dpsCell"">");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<th colspan=""3"" class=""armorClass"">Infantry</th>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">Low</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">Med</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">High</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                dps = 0;
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");

                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

                HtmlCompiler.HtmlInsert(ref index, ref html, "</table>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                #endregion
                #region HEAVY INFANTRY
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class =""dpsCell"">");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<th colspan=""3"" class=""armorClass"">Heavy Infantry</th>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">Low</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">Med</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">High</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</table>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");;
                #endregion
                #region COMMANDERS

                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class =""dpsCell"">");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<th class=""armorClass"">Comm</th>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">&nbsp</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</table>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");

                #endregion
                #region VEHICLES
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class =""dpsCell"">");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<th colspan=""4"" class=""armorClass"">Vehicles</th>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">U.Low</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">Low</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">Med</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">High</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");

                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</table>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");;
                #endregion
                #region BUILDINGS
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class =""dpsCell"">");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<th colspan=""3"" class=""armorClass"">Buildings</th>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">Low</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">Med</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">High</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");

                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</table>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");;
                #endregion
                #region MONSTERS
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class =""dpsCell"">");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<th colspan=""3"" class=""armorClass"">Monsters</th>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">Low</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">Med</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">High</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetDamageColor(dps) + @""">" + dps + "</td>");

                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</table>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");;
                #endregion
                #region MORALE
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class =""dpsCell"">");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<th class=""armorClass"">Morale</th>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">&nbsp</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                dps = this.Weapon.MoraleDamage;
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue " + HtmlCompiler.GetMoraleColor(dps) + @""">" + dps + "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</table>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                #endregion

                /*
                 #region Throw FORCE
                 * HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class =""dpsCell"">");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, @"<th class=""armorClass"">Throw</th>");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""armorClass"">force</td>");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, @"<td class=""dpsValue"">--</td>");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, "</table>");
                 * HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                 #endregion
                 */
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</table>");
                #endregion
            }

            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</div>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td></tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");
        }
コード例 #5
0
        public override void Compile(ref int index, ref string html)
        {
            HtmlCompiler.HtmlInsert(ref index, ref html, "<h4>" + Name + "</h4>");
            HtmlCompiler.CompileToolTips(ref index, ref html, this);
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""box"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""boxHeader skillHeader"">" + Name + "</div>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/command_icons/cannibalize.png"">");


            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""innerInfo"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""innerInfoTable"">");


            #region SKILL INFO TABLE

            #region APPLICATION-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Application Type</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Activated Ability");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Target types</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Self");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion


            #region REQUIREMENTS

            if (Requirements != null && Requirements.Count > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Requirements</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, HtmlCompiler.CompileRequirements(Requirements));
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region EFFECTS
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Effects</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td><ul class=""innerInfoList"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<li>Consume corpses to increase the maximum health of all Kroot squads up to " + MaxHP + " hit points</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</ul></td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion
            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</div>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td></tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");
        }
コード例 #6
0
        public override void Compile(ref int index, ref string html)
        {
            HtmlCompiler.HtmlInsert(ref index, ref html, "<h4>" + Name + "</h4>");
            HtmlCompiler.CompileToolTips(ref index, ref html, this);
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""box"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""boxHeader skillHeader"">" + Name + "</div>");

            if (Icon == null)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/general/PassiveAbility_icon.jpg"">");
            }
            else
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/" + Icon + @".png"">");
            }

            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""innerInfo"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""innerInfoTable"">");


            #region SKILL INFO TABLE

            #region APPLICATION-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Application Type</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Activated Ability");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Target types</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Self");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            #region Recharge
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Recharge Time</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, Recharge + " seconds");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            #region REQUIREMENTS

            if (Requirements != null && Requirements.Count > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Requirements</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, HtmlCompiler.CompileRequirements(Requirements));
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region EFFECTS
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Spawn</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td><ul class=""innerInfoList"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<li><a href=""" + "../units/" + Spawn + @".htm"">Spawns " + HtmlCompiler.Getarticle(Translation.Translate(Spawn)) + " " + Translation.Translate(Spawn) + @"</li>");
            if (HealthFraction > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<li>Each activation consumes " + HealthFraction * 100 + "% of the total health</li>");
            }

            HtmlCompiler.HtmlInsert(ref index, ref html, "</ul></td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion
            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</div>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td></tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");
        }
コード例 #7
0
        public override void Compile(ref int index, ref string html)
        {
            HtmlCompiler.HtmlInsert(ref index, ref html, "<h4>Entrench</h4>");
            HtmlCompiler.CompileToolTips(ref index, ref html, this);
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""box"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""boxHeader skillHeader"">Entrench</div>");
            if (Icon == null)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/general/PassiveAbility_icon.jpg"">");
            }
            else
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/" + Icon + @".png"">");
            }


            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""innerInfo"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""innerInfoTable"">");
            #region SKILL INFO TABLE

            #region APPLICATION-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Application Type</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Toggled Ability");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Target types</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Self");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion
            #region REQUIREMENTS

            if (Requirements != null && Requirements.Count > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Requirements</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, HtmlCompiler.CompileRequirements(Requirements));
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region Modifiers

            string mod = "<li>This unit becomes immobile</li>";
            mod += HtmlCompiler.CompileModifiers(Modifiers) + GetEntrenchInfo();



            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Effects</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td><ul class=""innerInfoList"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, mod);
            HtmlCompiler.HtmlInsert(ref index, ref html, "</ul></td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");


            #endregion

            #endregion
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table></td></tr>");

            HtmlCompiler.HtmlInsert(ref index, ref html, "</table><br>");
        }
コード例 #8
0
 public override void Compile(ref int index, ref string html)
 {
     HtmlCompiler.CompileWeapon(ref index, ref html, Weapon);
 }
コード例 #9
0
        public override void Compile(ref int index, ref string html)
        {
            HtmlCompiler.HtmlInsert(ref index, ref html, "<h4>" + Name + "</h4>");
            HtmlCompiler.CompileToolTips(ref index, ref html, this);
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""box"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""boxHeader skillHeader"">" + Name + "</div>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/command_icons/Rampage.png"">");


            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""innerInfo"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""innerInfoTable"">");


            #region SKILL INFO TABLE

            #region APPLICATION-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Application Type</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Target Ability");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Target types</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Enemy Infantries in the path");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            #region recharge
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Recharge Time</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, Recharge + " seconds");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion
            #region REQUIREMENTS

            if (Requirements != null && Requirements.Count > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Requirements</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, HtmlCompiler.CompileRequirements(Requirements));
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region EFFECTS
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Effects</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td><ul class=""innerInfoList"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<li>The unit charges the enemy lines doing damage and disruption</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</ul></td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion
            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</div>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td></tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");
        }
コード例 #10
0
        public string GetTarget(string prep)
        {
            // SQUAD
            if (Parent is SquadInfo)
            {
                if (ApplicationType == ApplicationTypes.ApplyToSquad)
                {
                    return(" " + prep + " the squad");
                }
            }
            // UNIT
            else if (Parent is UnitInfo)
            {
                switch (ApplicationType)
                {
                case ApplicationTypes.ApplyToSquad:
                    return(" " + prep + " the squad");

                case ApplicationTypes.ApplyToEntityType:
                    if (Target != "")
                    {
                        return(prep + " " + HtmlCompiler.GetPlural(TargetName));
                    }
                    break;

                case ApplicationTypes.ApplyToEntity:
                    if (Target != "")
                    {
                        return(prep + " " + Translation.Translate(((UnitInfo)Parent).Name));
                    }
                    break;
                }
            }
            // Abilities
            else if (Parent is SkillInfo)
            {
                SkillInfo sk       = Parent as SkillInfo;
                bool      aoe      = (sk.Radius > 0);
                bool      isTarget = (sk.ActivationType == "tp_ability_activation_targeted");

                if (isTarget)
                {
                    if (aoe)
                    {
                        return(prep + " each target in the area of effect");
                    }
                    else
                    {
                        switch (ApplicationType)
                        {
                        case ApplicationTypes.ApplyToSquad:
                            return(prep + " targeted squad");

                        case ApplicationTypes.ApplyToEntity:
                            return(prep + " the target ");
                        }
                    }
                }
                else
                {
                    switch (ApplicationType)
                    {
                    case ApplicationTypes.ApplyToEntity:
                    {
                        if (aoe)
                        {
                            return(prep + " each target in the area of effect");
                        }
                        break;
                    }

                    case ApplicationTypes.ApplyToWeaponType:
                        if (Target != "")
                        {
                            return(prep + " " + TargetName);
                        }
                        break;

                    case ApplicationTypes.ApplyToSquadType:
                        if (Target != "")
                        {
                            return(prep + " " + TargetName);
                        }
                        break;

                    case ApplicationTypes.ApplyToEntityType:
                        if (Target != "")
                        {
                            return(prep + " " + TargetName);
                        }
                        break;
                    }
                }
            }
            else if (Target != "")      // research and others
            {
                return(prep + " " + TargetName);
            }

            return("");
        }
コード例 #11
0
        public override void Compile(ref int index, ref string html)
        {
            if (Name != null && Name != "")
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<h4>" + Name + "</h4>");
            }
            else
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<h4>" + Translation.Translate(Replacement) + "</h4>");
            }

            HtmlCompiler.CompileToolTips(ref index, ref html, this);
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""box"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            if (Name != null && Name != "")
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""boxHeader skillHeader"">" + Name + "</div>");
            }
            else
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""boxHeader skillHeader"">" + Translation.Translate(Replacement) + "</div>");
            }

            if (Icon == null)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/general/PassiveAbility_icon.jpg"">");
            }
            else
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/" + Icon + @".png"">");
            }


            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""innerInfo"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""innerInfoTable"">");


            #region SKILL INFO TABLE

            #region APPLICATION-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Application Type</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Possession");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Target types</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Self");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion
            #region REQUIREMENTS

            if (Requirements != null && Requirements.Count > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Requirements</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, HtmlCompiler.CompileRequirements(Requirements));
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region Possession
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Effects</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td><ul class=""innerInfoList"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<li>The " + ((BuildableInfo)Parent).Name + " is replaced by " + Translation.Translate(Replacement) + "</li>");
            if (Duration != 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<li>Automatically starts after " + Duration + " seconds</li>");
            }
            HtmlCompiler.HtmlInsert(ref index, ref html, "</ul></td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</div>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td></tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");
        }
コード例 #12
0
        public override string Compile()
        {
            if (Parent != null)
            {
                string target  = "";
                string action  = "Increases ";
                bool   further = false;
                string amount  = "";
                bool   stacks  = !DoNotStacks;

                switch (UsageType)
                {
                case UsageTypes.Add:
                    if (Amount < 0)
                    {
                        action = "Decreases";
                    }
                    break;

                case UsageTypes.Multiply:
                    if (Amount < 1)
                    {
                        action = "Decreases";
                    }
                    break;
                }

                double mul = 1.0;

                if (Parent is SquadInfo || Parent is UnitInfo)
                {
                    SquadInfo squad   = Parent is UnitInfo ? (SquadInfo)((UnitInfo)Parent).Parent : (SquadInfo)Parent;
                    bool      isSquad = squad.MaxSquadSize > 1;

                    if (TargetName == squad.Unit.Name)
                    {
                        further = true;
                    }

                    if (isSquad)
                    {
                        target = TargetName + " squads";
                        mul    = squad.StartingSquadSize;
                    }
                    else
                    {
                        target = HtmlCompiler.GetPlural(TargetName);
                    }
                }
                else if (Parent is ResearchInfo)
                {
                    target = TargetName;
                }
                else if (Parent is BuildingInfo)
                {
                    if (TargetName == ((BuildingInfo)Parent).Name)
                    {
                        further = true;
                    }
                    target = HtmlCompiler.GetPlural(TargetName);
                }
                else
                {
                    target = HtmlCompiler.GetPlural(TargetName);
                }

                if (this.UsageType == UsageTypes.Add)
                {
                    amount = ((double)Math.Abs((mul * Amount))).ToString();
                }
                else
                {
                    amount = ((double)(mul * Math.Abs((this.Amount - 1) * 100))).ToString() + "%";
                }

                return(action + " the " + this.ModifierTranslation + " of " + (further ? "further " : "") + target + " by " + amount + (ModifierTranslation == "build time" ? " seconds" : "") + (stacks ? "" : "(do not stacks)"));
            }
            return(base.Compile());
        }
コード例 #13
0
        public override void Compile(ref int index, ref string html)
        {
            HtmlCompiler.HtmlInsert(ref index, ref html, "<h4>" + Name + "</h4>");
            HtmlCompiler.CompileToolTips(ref index, ref html, this);
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""box"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""boxHeader skillHeader"">" + Name + "</div>");
            if (Icon == null)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/general/PassiveAbility_icon.jpg"">");
            }
            else
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/" + Icon + @".png"">");
            }


            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""innerInfo"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""innerInfoTable"">");


            #region SKILL INFO TABLE

            #region APPLICATION-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Application Type</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Activated Ability");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Target types</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Self");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion
            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Duration</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, Duration + " seconds");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion
            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Recharge Time</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, Recharge + " seconds");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion
            #region REQUIREMENTS

            if (Requirements != null && Requirements.Count > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Requirements</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, HtmlCompiler.CompileRequirements(Requirements));
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region EFFECTS
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Effects</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td><ul class=""innerInfoList"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<li>The unit starts to leap and dance among enemy troops</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</ul></td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion
            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</div>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td></tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");
        }
コード例 #14
0
        public override void Compile(ref int index, ref string html)
        {
            HtmlCompiler.HtmlInsert(ref index, ref html, "<h4>Possesion</h4>");

            HtmlCompiler.CompileToolTips(ref index, ref html, this);
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""box"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""boxHeader skillHeader"">Possession</div>");


            HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/necron_icons/necron_possess_enemy_icon.png"">");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""innerInfo"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""innerInfoTable"">");


            #region SKILL INFO TABLE

            #region APPLICATION-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Application Type</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Possession");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Target types</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Enemy Vehicles Low, Vehicles Medium and Vehicles High");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            #region RANGE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Range</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, Range.ToString());
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            #region REQUIREMENTS

            if (Requirements != null && Requirements.Count > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Requirements</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, HtmlCompiler.CompileRequirements(Requirements));
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region Possession
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Effects</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td><ul class=""innerInfoList"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<li>Tries to take control of the targeted unit</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<li>It needs " + Duration + " seconds to complete the possession</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</ul></td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</div>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td></tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");
        }
コード例 #15
0
        public override void Compile(ref int index, ref string html)
        {
            HtmlCompiler.HtmlInsert(ref index, ref html, "<h4>" + Name + "</h4>");
            HtmlCompiler.CompileToolTips(ref index, ref html, this);
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""box"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""boxHeader skillHeader"">" + Name + "</div>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/necron_icons/necron_harvest_icon_off.png"">");


            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""innerInfo"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""innerInfoTable"">");


            #region SKILL INFO TABLE

            #region APPLICATION-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Application Type</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Toggled Ability");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Target types</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Self");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion


            #region REQUIREMENTS

            if (Requirements != null && Requirements.Count > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Requirements</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, HtmlCompiler.CompileRequirements(Requirements));
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region EFFECTS
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Effects</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td><ul class=""innerInfoList"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<li>" + Slot1_Squad + ": " + Slot1_Bodies + " corpses</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<li>" + Slot2_Squad + ": " + Slot2_Bodies + " corpses</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<li>" + Slot3_Squad + ": " + Slot3_Bodies + " corpses</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</ul></td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion
            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</div>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td></tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");
        }
コード例 #16
0
        public override void Compile(ref int index, ref string html)
        {
            HtmlCompiler.HtmlInsert(ref index, ref html, "<h4>Lightning Field</h4>");

            HtmlCompiler.CompileToolTips(ref index, ref html, this);
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""box"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""boxHeader skillHeader"">Lightning Field</div>");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"<img class=""icon"" src=""../../../images/necron_icons/necron_lightning_field_icon.png"">");

            HtmlCompiler.HtmlInsert(ref index, ref html, @"<div class=""innerInfo"">");



            #region SKILL INFO TABLE
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""innerInfoTable"">");
            #region APPLICATION-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Application Type</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Passive");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Target types</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Self");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            #region REQUIREMENTS

            if (Requirements != null && Requirements.Count > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Requirements</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, HtmlCompiler.CompileRequirements(Requirements));
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region EFFECTS
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Charge</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td><ul class=""innerInfoList"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<li>Damage taken by the unit will charge the Lightning Field</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<li>Can store up to 900 points of damage</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<li>" + ReflectedDamageRatio * 100 + "% of the melee damage taken by the unit is reflected back to the enemy</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<li>" + RechargeImpactRatio * 100 + "% of the melee damage inflicted by the unit charges the Lightning Field</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</ul></td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");
            #endregion



            #region DISCHARGE

            HtmlCompiler.HtmlInsert(ref index, ref html, @"<table class=""innerInfoTable"">");

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Discharge</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "&nbsp;");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #region APPLICATION-TYPE

            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Application Type</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Target Ability");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");

            #endregion

            #region target-TYPE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Target types</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "Enemy Infantries Vehicles and Buildings in the area of effect");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            #region AOE
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Area of Effect</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, Radius.ToString());
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            #region REQUIREMENTS

            if (Requirements != null && Requirements.Count > 0)
            {
                HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Requirements</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "<td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "At least " + MaxCharge * RechargeMinFraction + " of charged damage points");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</td>");
                HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            }

            #endregion

            #region EFFECTS
            HtmlCompiler.HtmlInsert(ref index, ref html, "<tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "<td>Charge</td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<td><ul class=""innerInfoList"">");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<li>Discharge the Lightning Field</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"<li>Deals a damage equal to " + DischargeDamageRatio * 100 + "% of the charged points to each target in the area of effect.</li>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</ul></td>");
            HtmlCompiler.HtmlInsert(ref index, ref html, "</tr>");
            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");

            #endregion

            HtmlCompiler.HtmlInsert(ref index, ref html, @"</div>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</td></tr>");
            HtmlCompiler.HtmlInsert(ref index, ref html, @"</table>");
        }