상속: ICenterEffect
예제 #1
0
        public static CenterEffect Create(string name, string desc)
        {
            if (string.IsNullOrEmpty(desc))
            {
                return(null);
            }

            CenterEffect effect = AppealUp.Create(name, desc);

            if (effect != null)
            {
                return(effect);
            }

            effect = SkillTriggerProbabilityUp.Create(name, desc);
            if (effect != null)
            {
                return(effect);
            }

            effect = LifeUp.Create(name, desc);
            if (effect != null)
            {
                return(effect);
            }

            effect = ConditionalAppealUp.Create(name, desc);
            if (effect != null)
            {
                return(effect);
            }

            throw new FormatException("Unknown effect description: " + desc);
        }
예제 #2
0
 private Idol ParseIdolData(HtmlNodeCollection td)
 {
     try
     {
         return(new Idol(
                    ExtractLabel(td[LabelColumn].InnerText.Trim()), td[NameColumn].InnerText.Trim(), td[RarityColumn].InnerText.Trim().ToRarity(),
                    td[CategoryColumn].InnerText.Trim().ToIdolCategory(), Convert.ToInt32(td[LifeColumn].InnerText.Trim()), Convert.ToInt32(td[DanceColumn].InnerText.Trim().Replace(",", "")),
                    Convert.ToInt32(td[VocalColumn].InnerText.Trim().Replace(",", "")), Convert.ToInt32(td[VisualColumn].InnerText.Trim().Replace(",", "")),
                    DateTime.Parse(td[ImplementationDateColumn].InnerText.Trim()),
                    CenterEffect.Create(td[CenterEffectColumn].InnerText.Trim(),
                                        td[CenterEffectDetailsColumn].InnerText.Trim()
                                        .Replace("パッショナイドル", "パッションアイドル")),
                    Skill.Create(td[SkillColumn].InnerText.Trim(),
                                 td[SkillDetailsColumn].InnerText.Trim()
                                 .Replace("PEFECT", "PERFECT")
                                 .Replace("PERFCT", "PERFECT")
                                 .Replace("秒毎", "秒ごと")
                                 .Replace("秒間", "秒ごと")
                                 .Replace("しばらく間", "しばらくの間"))));
     }
     catch (Exception)
     {
         return(null);
     }
 }