Beispiel #1
0
        public string GetInfoForCombat(GameHandler gameHandler)
        {
            string ret = string.Empty;

            bool isVanilla = true;

            string preCombatEffects = string.Empty;

            for (int i = 0; i < this.effects.Count(); i++)
            {
                if (this.effects[i].effectText.Equals(string.Empty))
                {
                    continue;
                }
                if (this.effects[i].displayMode != Effect.EffectDisplayMode.Public)
                {
                    continue;
                }

                if (isVanilla)
                {
                    preCombatEffects = this.effects[i].effectText;
                }
                else
                {
                    preCombatEffects += $"\n{this.effects[i].effectText}";
                }
                isVanilla = false;
            }

            if (isVanilla)
            {
                foreach (var kw in this.creatureData.staticKeywords)
                {
                    if (kw.Value > 0)
                    {
                        isVanilla = false;
                        break;
                    }
                }
            }

            if (isVanilla)
            {
                ret += $"**{this.name} is a {this.creatureData.attack}/{this.creatureData.health} vanilla.**\n";
            }
            else
            {
                ret += $"**{this.name} is a {this.creatureData.attack}/{this.creatureData.health} with:**\n";
                foreach (var kw in this.creatureData.staticKeywords)
                {
                    if (kw.Value == 0)
                    {
                        continue;
                    }
                    ret += $"{kw.Key}: {kw.Value}\n";
                }
            }

            if (!preCombatEffects.Equals(string.Empty))
            {
                ret += preCombatEffects + "\n";
            }

            return(ret);
        }