Beispiel #1
0
        // 地形効果を追加
        public void AddFeature(string fdef)
        {
            FeatureData fd;
            string      ftype, fdata = default;
            double      flevel;
            int         i, j;
            string      buf;

            buf = fdef;

            // 地形効果の種類、レベル、データを切り出し
            flevel = Constants.DEFAULT_LEVEL;
            i      = Strings.InStr(buf, "Lv");
            j      = Strings.InStr(buf, "=");
            if (i > 0 && j > 0 && i > j)
            {
                i = 0;
            }

            if (i > 0)
            {
                ftype = Strings.Left(buf, i - 1);
                if (j > 0)
                {
                    flevel = Conversions.ToDouble(Strings.Mid(buf, i + 2, j - (i + 2)));
                    fdata  = Strings.Mid(buf, j + 1);
                }
                else
                {
                    flevel = Conversions.ToDouble(Strings.Mid(buf, i + 2));
                }
            }
            else if (j > 0)
            {
                ftype = Strings.Left(buf, j - 1);
                fdata = Strings.Mid(buf, j + 1);
            }
            else
            {
                ftype = buf;
            }

            // 地形効果を登録
            fd         = new FeatureData();
            fd.Name    = ftype;
            fd.Level   = flevel;
            fd.StrData = fdata;
            if (IsFeatureAvailable(ftype))
            {
                colFeature.Add(fd, ftype + SrcFormatter.Format(CountFeature()));
            }
            else
            {
                colFeature.Add(fd, ftype);
            }
        }
Beispiel #2
0
        //// 地形効果の名称
        //public string FeatureName(string Index)
        //{
        //    string FeatureNameRet = default;
        //    FeatureData fd;
        //    fd = (FeatureData)colFeature[Index];
        //    if (Strings.Len(fd.StrData) > 0)
        //    {
        //        FeatureNameRet = GeneralLib.ListIndex(fd.StrData, 1);
        //    }
        //    else if (fd.Level != Constants.DEFAULT_LEVEL)
        //    {
        //        FeatureNameRet = fd.Name + "Lv" + SrcFormatter.Format(fd.Level);
        //    }
        //    else
        //    {
        //        FeatureNameRet = fd.Name;
        //    }

        //    return FeatureNameRet;
        //}

        // 地形効果のレベル
        public double FeatureLevel(string Index)
        {
            FeatureData fd = colFeature[Index];

            if (fd != null)
            {
                var FeatureLevelRet = fd.Level;
                if (FeatureLevelRet == Constants.DEFAULT_LEVEL)
                {
                    FeatureLevelRet = 1d;
                }
                return(FeatureLevelRet);
            }
            else
            {
                return(0d);
            }
        }
Beispiel #3
0
        // 特殊能力の名称
        public string FeatureName(Unit unit)
        {
            FeatureData fd = this;

            // 非表示の能力
            switch (fd.Name ?? "")
            {
            case "ノーマルモード":
            case "パーツ合体":
            case "換装":
            case "制限時間":
            case "制御不可":
            case "主形態":
            case "他形態":
            case "合体制限":
            case "格闘武器":
            case "迎撃武器":
            case "合体技":
            case "変形技":
            case "ランクアップ":
            case "追加パイロット":
            case "暴走時パイロット":
            case "追加サポート":
            case "装備個所":
            case "ハードポイント":
            case "武器クラス":
            case "防具クラス":
            case "BGM":
            case "武器BGM":
            case "アビリティBGM":
            case "合体BGM":
            case "分離BGM":
            case "変形BGM":
            case "ハイパーモードBGM":
            case "ユニット画像":
            case "パイロット画像":
            case "パイロット愛称":
            case "パイロット読み仮名":
            case "性別":
            case "性格変更":
            case "吸収":
            case "無効化":
            case "耐性":
            case "弱点":
            case "有効":
            case "特殊効果無効化":
            case "アイテム所有":
            case "レアアイテム所有":
            case "ラーニング可能技":
            case "改造費修正":
            case "最大改造数":
            case "パイロット能力付加":
            case "パイロット能力強化":
            case "非表示":
            case "攻撃属性":
            case "射程延長":
            case "武器強化":
            case "命中率強化":
            case "CT率強化":
            case "特殊効果発動率強化":
            case "必要技能":
            case "不必要技能":
            case "ダミーユニット":
            case "地形ユニット":
            case "召喚解除コマンド名":
            case "変身解除コマンド名":
            case "1人乗り可能":
            case "特殊効果":
            case "戦闘アニメ":
            case "パイロット地形適応変更":
            case "メッセージクラス":
            case "用語名":
            case "発光":
                // ユニット用特殊能力
                return("");

            case "愛称変更":
            case "読み仮名変更":
            case "サイズ変更":
            case "地形適応変更":
            case "地形適応固定変更":
            case "空中移動":
            case "陸上移動":
            case "水中移動":
            case "宇宙移動":
            case "地中移動":
            case "修理費修正":
            case "経験値修正":
            case "最大弾数増加":
            case "EN消費減少":
            case "V-UP":
            case "大型アイテム":
            case "呪い":
                // アイテム用特殊能力
                return("");
            }

            // 拡大画像能力は「拡大画像(文字列)」といった指定もあるので他の非表示能力と異なる
            // 判定方法を使う
            if (Strings.InStr(fd.Name, "拡大画像") == 1)
            {
                return("");
            }

            string resultName;

            if (Strings.Len(fd.StrData) > 0)
            {
                // 別名の指定あり
                resultName = GeneralLib.ListIndex(fd.StrData, 1);
                if (resultName == "非表示" || resultName == "解説")
                {
                    resultName = "";
                }
            }
            else if (fd.Level == Constants.DEFAULT_LEVEL)
            {
                // レベル指定なし
                resultName = fd.Name;
            }
            else if (fd.Level >= 0d)
            {
                // レベル指定あり
                resultName = fd.Name + "Lv" + SrcFormatter.Format(fd.Level);
                if (fd.Name == "射撃強化")
                {
                    if (unit.CountPilot() > 0)
                    {
                        if (unit.MainPilot().HasMana())
                        {
                            resultName = "魔力強化Lv" + SrcFormatter.Format(fd.Level);
                        }
                    }
                }
            }
            else
            {
                // マイナスのレベル指定
                switch (fd.Name ?? "")
                {
                case "格闘強化":
                    resultName = "格闘低下" + "Lv" + SrcFormatter.Format(Math.Abs(fd.Level));
                    break;

                case "射撃強化":
                    resultName = "射撃低下" + "Lv" + SrcFormatter.Format(Math.Abs(fd.Level));
                    if (unit.CountPilot() > 0)
                    {
                        if (unit.MainPilot().HasMana())
                        {
                            resultName = "魔力低下Lv" + SrcFormatter.Format(Math.Abs(fd.Level));
                        }
                    }

                    break;

                case "命中強化":
                    resultName = "命中低下" + "Lv" + SrcFormatter.Format(Math.Abs(fd.Level));
                    break;

                case "回避強化":
                    resultName = "回避低下" + "Lv" + SrcFormatter.Format(Math.Abs(fd.Level));
                    break;

                case "技量強化":
                    resultName = "技量低下" + "Lv" + SrcFormatter.Format(Math.Abs(fd.Level));
                    break;

                case "反応強化":
                    resultName = "反応低下" + "Lv" + SrcFormatter.Format(Math.Abs(fd.Level));
                    break;

                default:
                    resultName = fd.Name + "Lv" + SrcFormatter.Format(fd.Level);
                    break;
                }
            }

            return(resultName);
        }