Пример #1
0
        /// <summary>
        ///     Shows the required alignment (optional),
        ///     alignment change (optional),
        ///     and the force pool usage
        /// </summary>
        /// <returns></returns>
        public override string PostAbilityVerbCompDesc(VerbProperties_Ability verbDef)
        {
            var result = "";

            if (verbDef is not {
                abilityDef : ForceAbilityDef forceDef
            })
Пример #2
0
        /// <summary>
        /// Shows the required alignment (optional),
        /// alignment change (optional),
        /// and the force pool usage
        /// </summary>
        /// <param name="verb"></param>
        /// <returns></returns>
        public override string PostAbilityVerbCompDesc(VerbProperties_Ability verbDef)
        {
            //Log.Message("1");
            string result = "";

            if (verbDef == null)
            {
                return(result);
            }
            if (verbDef?.abilityDef is VitaeAbilityDef vampDef)
            {
                StringBuilder postDesc   = new StringBuilder();
                string        pointsDesc = "";
                pointsDesc = "ROMV_BloodPoints".Translate(new object[]
                {
                    Mathf.Abs(vampDef.bloodCost).ToString()
                })
                ;
                if (pointsDesc != "")
                {
                    postDesc.AppendLine(pointsDesc);
                }
                result = postDesc.ToString();
            }
            return(result);
        }
Пример #3
0
        public override string PostAbilityVerbCompDesc(VerbProperties_Ability verbDef)
        {
            string        result          = "";
            StringBuilder stringBuilder   = new StringBuilder();
            TMAbilityDef  mightAbilityDef = (TMAbilityDef)verbDef.abilityDef;
            bool          flag            = mightAbilityDef != null;

            if (flag)
            {
                string text  = "";
                string text2 = "";
                float  num   = 0;
                float  num2  = 0;


                if (false) //mightAbilityDef == TorannMagicDefOf.)
                {
                    num = this.MightUser.ActualStaminaCost(mightDef);

                    //num2 =
                    //text2 = "TM_AbilityDescPortalTime".Translate(new object[]
                    //{
                    //    num2.ToString()
                    //});
                }
                else if (false)
                {
                }
                else
                {
                    num = this.MightUser.ActualStaminaCost(mightDef);
                }

                text = "TM_AbilityDescBaseStaminaCost".Translate(new object[]
                {
                    mightAbilityDef.staminaCost.ToString("p1")
                }) + "\n" + "TM_AbilityDescAdjustedStaminaCost".Translate(new object[]
                {
                    num.ToString("p1")
                });

                bool flag2 = text != "";
                if (flag2)
                {
                    stringBuilder.AppendLine(text);
                }
                bool flag3 = text2 != "";
                if (flag3)
                {
                    stringBuilder.AppendLine(text2);
                }
                result = stringBuilder.ToString();
            }
            return(result);
        }
        public override string PostAbilityVerbCompDesc(VerbProperties_Ability verbDef)
        {
            var    text = "";
            string result;

            if (verbDef == null)
            {
                result = text;
            }
            else
            {
                if ((_ = verbDef.abilityDef as WizardAbilityDef) != null)
                {
                    var stringBuilder = new StringBuilder();
                    text = stringBuilder.ToString();
                }

                result = text;
            }

            return(result);
        }
        public override string PostAbilityVerbCompDesc(VerbProperties_Ability verbDef)
        {
            string text = "";
            bool   flag = verbDef == null;
            string result;

            if (flag)
            {
                result = text;
            }
            else
            {
                WizardAbilityDef wizardAbilityDef;
                bool             flag2 = (wizardAbilityDef = ((verbDef?.abilityDef) as WizardAbilityDef)) != null;
                if (flag2)
                {
                    StringBuilder stringBuilder = new StringBuilder();
                    text = stringBuilder.ToString();
                }
                result = text;
            }
            return(result);
        }
Пример #6
0
        public override string PostAbilityVerbCompDesc(VerbProperties_Ability verbDef)
        {
            string        result          = "";
            StringBuilder stringBuilder   = new StringBuilder();
            TMAbilityDef  magicAbilityDef = (TMAbilityDef)verbDef.abilityDef;
            bool          flag            = magicAbilityDef != null;

            if (flag)
            {
                string text  = "";
                string text2 = "";
                string text3 = "";
                float  num   = 0;
                float  num2  = 0;


                if (magicAbilityDef == TorannMagicDefOf.TM_Teleport)
                {
                    num = this.MagicUser.ActualManaCost(magicDef) * 100;
                    MagicPowerSkill mps2 = this.MagicUser.MagicData.MagicPowerSkill_Teleport.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_Teleport_ver");
                    MagicPowerSkill mps1 = this.MagicUser.MagicData.MagicPowerSkill_Teleport.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_Teleport_pwr");
                    num2  = 80 + (mps1.level * 20) + (mps2.level * 20);
                    text2 = "TM_AbilityDescPortalTime".Translate(
                        num2.ToString()
                        );
                }
                else if (magicAbilityDef == TorannMagicDefOf.TM_SummonMinion)
                {
                    num = this.MagicUser.ActualManaCost(magicDef) * 100;
                    MagicPowerSkill mps1 = this.MagicUser.MagicData.MagicPowerSkill_SummonMinion.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_SummonMinion_ver");
                    num2  = 1200 + (600 * mps1.level);
                    text2 = "TM_AbilityDescSummonDuration".Translate(
                        num2.ToString()
                        );
                }
                else if (magicAbilityDef == TorannMagicDefOf.TM_SummonPylon)
                {
                    num = this.MagicUser.ActualManaCost(magicDef) * 100;
                    MagicPowerSkill mps1 = this.MagicUser.MagicData.MagicPowerSkill_SummonPylon.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_SummonPylon_ver");
                    num2  = 240 + (120 * mps1.level);
                    text2 = "TM_AbilityDescSummonDuration".Translate(
                        num2.ToString()
                        );
                }
                else if (magicAbilityDef == TorannMagicDefOf.TM_SummonExplosive)
                {
                    num = this.MagicUser.ActualManaCost(magicDef) * 100;
                    MagicPowerSkill mps1 = this.MagicUser.MagicData.MagicPowerSkill_SummonExplosive.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_SummonExplosive_ver");
                    num2  = 240 + (120 * mps1.level);
                    text2 = "TM_AbilityDescSummonDuration".Translate(
                        num2.ToString()
                        );
                }
                else if (magicAbilityDef == TorannMagicDefOf.TM_SummonElemental)
                {
                    num = this.MagicUser.ActualManaCost(magicDef) * 100;
                    MagicPowerSkill mps1 = this.MagicUser.MagicData.MagicPowerSkill_SummonElemental.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_SummonElemental_ver");
                    num2  = 30 + (15 * mps1.level);
                    text2 = "TM_AbilityDescSummonDuration".Translate(
                        num2.ToString()
                        );
                }
                else if (magicAbilityDef == TorannMagicDefOf.TM_PsychicShock)
                {
                    num   = this.MagicUser.ActualManaCost(magicDef) * 100;
                    num2  = this.MagicUser.Pawn.GetStatValue(StatDefOf.PsychicSensitivity, false);
                    text3 = "TM_PsychicSensitivity".Translate(
                        num2.ToString()
                        );
                }
                else
                {
                    num = this.MagicUser.ActualManaCost(magicDef) * 100;
                }

                text = "TM_AbilityDescBaseManaCost".Translate(
                    (magicAbilityDef.manaCost * 100).ToString("n1")
                    ) + "\n" + "TM_AbilityDescAdjustedManaCost".Translate(
                    num.ToString("n1")
                    );

                if (magicAbilityDef == TorannMagicDefOf.TM_IgniteBlood || magicAbilityDef == TorannMagicDefOf.TM_BloodShield || magicAbilityDef == TorannMagicDefOf.TM_BloodForBlood ||
                    magicAbilityDef == TorannMagicDefOf.TM_Rend || magicAbilityDef == TorannMagicDefOf.TM_Rend_I || magicAbilityDef == TorannMagicDefOf.TM_Rend_II || magicAbilityDef == TorannMagicDefOf.TM_Rend_III ||
                    magicAbilityDef == TorannMagicDefOf.TM_BloodMoon || magicAbilityDef == TorannMagicDefOf.TM_BloodMoon_I || magicAbilityDef == TorannMagicDefOf.TM_BloodMoon_II || magicAbilityDef == TorannMagicDefOf.TM_BloodMoon_III)
                {
                    num  = this.ActualBloodCost * 100;
                    text = "TM_AbilityDescBaseBloodCost".Translate(
                        (magicAbilityDef.bloodCost * 100).ToString("n1")
                        ) + "\n" + "TM_AbilityDescAdjustedBloodCost".Translate(
                        num.ToString("n1")
                        );
                }

                if (this.MagicUser.coolDown != 1f)
                {
                    text3 = "TM_AdjustedCooldown".Translate(
                        ((this.MaxCastingTicks * this.MagicUser.coolDown) / 60).ToString("0.00")
                        );
                }

                bool flag2 = text != "";
                if (flag2)
                {
                    stringBuilder.AppendLine(text);
                }
                bool flag3 = text2 != "";
                if (flag3)
                {
                    stringBuilder.AppendLine(text2);
                }
                bool flag4 = text3 != "";
                if (flag4)
                {
                    stringBuilder.AppendLine(text3);
                }
                result = stringBuilder.ToString();
            }
            return(result);
        }
Пример #7
0
        public override string PostAbilityVerbCompDesc(VerbProperties_Ability verbDef)
        {
            TMAbilityDef mightAbilityDef = (TMAbilityDef)verbDef.abilityDef;

            return(PostAbilityDesc(mightAbilityDef, this.MightUser, this.MaxCastingTicks));
        }
Пример #8
0
        /// <summary>
        /// Shows the required alignment (optional),
        /// alignment change (optional),
        /// and the force pool usage
        /// </summary>
        /// <param name="verb"></param>
        /// <returns></returns>
        public override string PostAbilityVerbCompDesc(VerbProperties_Ability verbDef)
        {
            //Log.Message("1");
            string result = "";

            if (verbDef == null)
            {
                return(result);
            }
            if (verbDef?.abilityDef is ForceAbilityDef forceDef)
            {
                //Log.Message("2");

                StringBuilder postDesc   = new StringBuilder();
                string        alignDesc  = "";
                string        changeDesc = "";
                string        pointsDesc = "";
                //Log.Message("3");

                if (forceDef?.changedAlignmentType != ForceAlignmentType.None)
                {
                    //Log.Message("3a");

                    alignDesc = "ForceAbilityDescAlign".Translate(new object[]
                    {
                        forceDef.requiredAlignmentType.ToString(),
                    });
                }
                //Log.Message("4");

                if (forceDef?.changedAlignmentType != ForceAlignmentType.None)
                {
                    //Log.Message("4a");
                    changeDesc = "ForceAbilityDescChange".Translate(new object[]
                    {
                        forceDef.changedAlignmentType.ToString(),
                        Mathf.Abs(forceDef.changedAlignmentRate).ToString("0.##")
                    });
                }
                //Log.Message("5");

                if (ForceUser?.ForceSkillLevel("PJ_ForcePool") > 0)
                {
                    //Log.Message("5a");
                    float poolCost = 0f;
                    //Log.Message("PC" + forceDef.forcePoolCost.ToString());
                    poolCost   = forceDef.forcePoolCost - (forceDef.forcePoolCost * (0.15f * (float)ForceUser.ForceSkillLevel("PJ_ForcePool")));
                    pointsDesc = "ForceAbilityDescOriginPoints".Translate(new object[]
                    {
                        Mathf.Abs(forceDef.forcePoolCost).ToString("0.##")
                    })

                                 + "\n" +

                                 "ForceAbilityDescNewPoints".Translate(new object[]
                    {
                        poolCost.ToString("0.##")
                    })
                    ;
                }
                else
                {
                    //Log.Message("6");

                    pointsDesc = "ForceAbilityDescPoints".Translate(new object[]
                    {
                        Mathf.Abs(forceDef.forcePoolCost).ToString("0.##")
                    });
                }
                //Log.Message("7");

                if (alignDesc != "")
                {
                    postDesc.AppendLine(alignDesc);
                }
                if (changeDesc != "")
                {
                    postDesc.AppendLine(changeDesc);
                }
                if (pointsDesc != "")
                {
                    postDesc.AppendLine(pointsDesc);
                }
                result = postDesc.ToString();
                //Log.Message("8");
            }
            return(result);
        }
Пример #9
0
        public override string PostAbilityVerbCompDesc(VerbProperties_Ability verbDef)
        {
            string        result          = "";
            StringBuilder stringBuilder   = new StringBuilder();
            TMAbilityDef  magicAbilityDef = (TMAbilityDef)verbDef.abilityDef;
            bool          flag            = magicAbilityDef != null;

            if (flag)
            {
                string text  = "";
                string text2 = "";
                string text3 = "";
                float  num   = 0;
                float  num2  = 0;


                if (magicAbilityDef == TorannMagicDefOf.TM_Teleport)
                {
                    num = this.MagicUser.ActualManaCost(magicDef);
                    MagicPowerSkill mps2 = this.MagicUser.MagicData.MagicPowerSkill_Teleport.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_Teleport_ver");
                    MagicPowerSkill mps1 = this.MagicUser.MagicData.MagicPowerSkill_Teleport.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_Teleport_pwr");
                    num2  = 60 + (mps1.level * 15) + (mps2.level * 15);
                    text2 = "TM_AbilityDescPortalTime".Translate(new object[]
                    {
                        num2.ToString()
                    });
                }
                else if (magicAbilityDef == TorannMagicDefOf.TM_SummonMinion)
                {
                    num = this.MagicUser.ActualManaCost(magicDef);
                    MagicPowerSkill mps1 = this.MagicUser.MagicData.MagicPowerSkill_SummonMinion.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_SummonMinion_ver");
                    num2  = 600 + (300 * mps1.level);
                    text2 = "TM_AbilityDescSummonDuration".Translate(new object[]
                    {
                        num2.ToString()
                    });
                }
                else if (magicAbilityDef == TorannMagicDefOf.TM_SummonPylon)
                {
                    num = this.MagicUser.ActualManaCost(magicDef);
                    MagicPowerSkill mps1 = this.MagicUser.MagicData.MagicPowerSkill_SummonPylon.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_SummonPylon_ver");
                    num2  = 120 + (60 * mps1.level);
                    text2 = "TM_AbilityDescSummonDuration".Translate(new object[]
                    {
                        num2.ToString()
                    });
                }
                else if (magicAbilityDef == TorannMagicDefOf.TM_SummonExplosive)
                {
                    num = this.MagicUser.ActualManaCost(magicDef);
                    MagicPowerSkill mps1 = this.MagicUser.MagicData.MagicPowerSkill_SummonExplosive.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_SummonExplosive_ver");
                    num2  = 120 + (60 * mps1.level);
                    text2 = "TM_AbilityDescSummonDuration".Translate(new object[]
                    {
                        num2.ToString()
                    });
                }
                else if (magicAbilityDef == TorannMagicDefOf.TM_SummonElemental)
                {
                    num = this.MagicUser.ActualManaCost(magicDef);
                    MagicPowerSkill mps1 = this.MagicUser.MagicData.MagicPowerSkill_SummonElemental.FirstOrDefault((MagicPowerSkill x) => x.label == "TM_SummonElemental_ver");
                    num2  = 30 + (15 * mps1.level);
                    text2 = "TM_AbilityDescSummonDuration".Translate(new object[]
                    {
                        num2.ToString()
                    });
                }
                else
                {
                    num = this.MagicUser.ActualManaCost(magicDef);
                }

                text = "TM_AbilityDescBaseManaCost".Translate(new object[]
                {
                    magicAbilityDef.manaCost.ToString("p1")
                }) + "\n" + "TM_AbilityDescAdjustedManaCost".Translate(new object[]
                {
                    num.ToString("p1")
                });

                if (this.MagicUser.coolDown != 1f)
                {
                    text3 = "TM_AdjustedCooldown".Translate(new object[]
                    {
                        ((this.MaxCastingTicks * this.MagicUser.coolDown) / 60).ToString("0.00")
                    });
                }

                bool flag2 = text != "";
                if (flag2)
                {
                    stringBuilder.AppendLine(text);
                }
                bool flag3 = text2 != "";
                if (flag3)
                {
                    stringBuilder.AppendLine(text2);
                }
                bool flag4 = text3 != "";
                if (flag4)
                {
                    stringBuilder.AppendLine(text3);
                }
                result = stringBuilder.ToString();
            }
            return(result);
        }
        /// <summary>
        /// Shows the required alignment (optional),
        /// alignment change (optional),
        /// and the force pool usage
        /// </summary>
        /// <param name="verb"></param>
        /// <returns></returns>
        public override string PostAbilityVerbCompDesc(VerbProperties_Ability verbDef)
        {
            string          result   = "";
            StringBuilder   postDesc = new StringBuilder();
            ForceAbilityDef forceDef = (ForceAbilityDef)verbDef.abilityDef;

            if (forceDef != null)
            {
                string alignDesc  = "";
                string changeDesc = "";
                string pointsDesc = "";
                if (forceDef.changedAlignmentType != ForceAlignmentType.None)
                {
                    alignDesc = "ForceAbilityDescAlign".Translate(new object[]
                    {
                        forceDef.requiredAlignmentType.ToString(),
                    });
                }
                if (forceDef.changedAlignmentType != ForceAlignmentType.None)
                {
                    changeDesc = "ForceAbilityDescChange".Translate(new object[]
                    {
                        forceDef.changedAlignmentType.ToString(),
                        forceDef.changedAlignmentRate.ToString("p1")
                    });
                }
                if (ForceSkillLevel("PJ_ForcePool") > 0)
                {
                    float poolCost = 0f;
                    //Log.Message("PC" + forceDef.forcePoolCost.ToString());
                    poolCost   = forceDef.forcePoolCost - (forceDef.forcePoolCost * (0.15f * (float)ForceSkillLevel("PJ_ForcePool")));
                    pointsDesc = "ForceAbilityDescOriginPoints".Translate(new object[]
                    {
                        forceDef.forcePoolCost.ToString("p1")
                    })

                                 + "\n" +

                                 "ForceAbilityDescNewPoints".Translate(new object[]
                    {
                        poolCost.ToString("p1")
                    })
                    ;
                }
                else
                {
                    pointsDesc = "ForceAbilityDescPoints".Translate(new object[]
                    {
                        forceDef.forcePoolCost.ToString("p1")
                    });
                }
                if (alignDesc != "")
                {
                    postDesc.AppendLine(alignDesc);
                }
                if (changeDesc != "")
                {
                    postDesc.AppendLine(changeDesc);
                }
                if (pointsDesc != "")
                {
                    postDesc.AppendLine(pointsDesc);
                }
                result = postDesc.ToString();
            }
            return(result);
        }