Exemple #1
0
        public Description GetDescription()
        {
            var desc = modifyer.GetDescription();
            List <DescriptionItem> l = new List <DescriptionItem>(desc.Stats);

            l.Add(new DescriptionItem()
            {
                Name = LocalizedStrings.duration, Description = duration.ToString(StringFormats.floatNumber), ItPositiveDesc = true
            });
            l.Add(new DescriptionItem()
            {
                Name = LocalizedStrings.cooldown, Description = cooldown.ToString(StringFormats.floatNumber), ItPositiveDesc = true
            });

            return(new Description()
            {
                Stats = l.ToArray()
            });
        }
Exemple #2
0
        public Description GetDescription()
        {
            var desc = firstPhaseModifyer.GetDescription();
            List <DescriptionItem> l = new List <DescriptionItem>(desc.Stats);

            l.Add(new DescriptionItem()
            {
                Name = LocalizedStrings.duration, Description = firstPhaseDuration.ToString(StringFormats.floatNumber), ItPositiveDesc = true
            });

            var desc2 = secondPhaseModifyer.GetDescription();
            List <DescriptionItem> l2 = new List <DescriptionItem>(desc2.Stats);

            if (secondPhaseDuration > 0)
            {
                l2.Add(new DescriptionItem()
                {
                    Name = LocalizedStrings.duration, Description = secondPhaseDuration.ToString(StringFormats.floatNumber), ItPositiveDesc = true
                });
            }

            DescriptionItem coold = new DescriptionItem()
            {
                ItPositiveDesc = true,
                Name           = LocalizedStrings.cooldown,
                Description    = cooldown.ToString(StringFormats.floatNumber)
            };

            DescriptionItem constr = new DescriptionItem()
            {
                ItPositiveDesc = false,
                Name           = LocalizedStrings.attention,
                Description    = LocalizedStrings.two_phases_skill
            };


            List <DescriptionItem> c = new List <DescriptionItem>();

            if (secondPhaseDuration > 0)
            {
                c.Add(constr);
            }

            if (bashType == Type.SHIELD)
            {
                var constr2 = new DescriptionItem()
                {
                    ItPositiveDesc = false,
                    Name           = LocalizedStrings.attention,
                    Description    = LocalizedStrings.toast_cant_use_skill_without_shields
                };
                c.Add(constr2);
            }

            if (secondPhaseDuration > 0)
            {
                c.Add(coold);
            }
            else
            {
                l.Add(coold);
            }

            var res = new Description()
            {
                Constraints = c.ToArray(),
                Stats       = l.ToArray(),
            };

            if (secondPhaseDuration > 0)
            {
                res.StatsName       = LocalizedStrings.first_phase;
                res.SecondStatsName = LocalizedStrings.second_phase;
                res.SecondStats     = l2.ToArray();
            }
            return(res);
        }