示例#1
0
        public string GetPowers(Boost boost, bool attuned, string prefix, string catalyzed)
        {
            int    attribCount = boost.aspects.Count - 1;
            string s           = "Power Boosts." + prefix + boost.name + "." + prefix + boost.name + Environment.NewLine;

            s += "{" + Environment.NewLine;
            s += "\tName                 \"" + prefix + boost.name + "\"" + Environment.NewLine;
            s += "\tDisplayName          \"" + PString(displayName + ": " + boost.displayName) + "\"" + Environment.NewLine;
            s += "\tType                 kBoost" + Environment.NewLine;
            s += "\tAccuracy             1" + Environment.NewLine;
            s += "\tEntsAffected         kCaster" + Environment.NewLine;
            s += "\tEntsAutoHit          kCaster" + Environment.NewLine;
            s += "\tTarget               kCaster" + Environment.NewLine;
            s += "\tRange                0" + Environment.NewLine;
            s += "\tEnduranceCost        0" + Environment.NewLine;
            s += "\tIdeaCost             0" + Environment.NewLine;
            s += "\tInterruptTime        0" + Environment.NewLine;
            s += "\tTimeToActivate       0" + Environment.NewLine;
            s += "\tRechargeTime         0" + Environment.NewLine;
            s += "\tActivatePeriod       10" + Environment.NewLine;
            s += "\tEffectArea           kCharacter" + Environment.NewLine;
            s += "\tActivatePeriod       10" + Environment.NewLine;
            s += "\tRadius               0" + Environment.NewLine;
            s += "\tArc                  0" + Environment.NewLine;
            s += "\tBoostsAllowed        kScience_Boost, kTechnology_Boost, kMagic_Boost, kMutation_Boost, kNatural_Boost" + (String.IsNullOrEmpty(boostsAllowed) ? String.Empty : ", " + boostsAllowed) + Environment.NewLine;
            if (!String.IsNullOrEmpty(catalyzed))
            {
                s += "\tBoostCatalystConversion Boosts." + catalyzed + boost.name + "." + catalyzed + boost.name + Environment.NewLine;
            }
            s += "\t" + (attuned ? "BoostUsePlayerLevel  " : "BoostBoostable       ") + "True" + Environment.NewLine;
            s += "\tBoostIgnoreEffectiveness True" + Environment.NewLine;
            s += "\tBoostCombinable      False" + Environment.NewLine;
            s += "\tMinSlotLevel         " + (minSlotLevel - 1) + Environment.NewLine;
            if (!String.IsNullOrEmpty(boost.slotRequires))
            {
                s += "\tSlotRequires " + boost.slotRequires + Environment.NewLine;
            }
            if (attuned || rarity == "VeryRare")
            {
                s += "\tBoostAlwaysCountForSet True" + Environment.NewLine;
            }
            if (attuned)
            {
                s += "\tBoostLicenseLevel    0" + Environment.NewLine;
            }
            s += "\tDisplayShortHelp     \"" + PString(boost.shortHelp) + "\"" + Environment.NewLine;
            s += "\tDisplayHelp          \"" + PString(boost.description) + "\"" + Environment.NewLine;
            s += "\tIconName             \"" + iconName + "\"" + Environment.NewLine;
            s += "\tTimeToConfirm        0" + Environment.NewLine + Environment.NewLine;

            foreach (BoostType aspect in boost.aspects)
            {
                foreach (AttribMod attrib in aspect.attribMods[attribCount])
                {
                    s += "\tAttribMod" + Environment.NewLine;
                    s += "\t{" + Environment.NewLine;
                    s += "\t\tName                 \"" + attrib.name + "\"" + Environment.NewLine;
                    s += "\t\tTable                \"" + attrib.table + "\"" + Environment.NewLine;
                    s += "\t\tAspect               " + (String.IsNullOrEmpty(attrib.aspect) ? "kStr" : attrib.aspect) + Environment.NewLine;
                    s += "\t\tAttrib               " + attrib.attrib + Environment.NewLine;
                    s += "\t\tTarget               kSelf" + Environment.NewLine;
                    s += "\t\tScale                " + attrib.scale + Environment.NewLine;
                    s += "\t\tType                 kMagnitude" + Environment.NewLine;
                    s += "\t\tAllowStrength        kFalse" + Environment.NewLine;
                    s += "\t\tAllowResistance      kFalse" + Environment.NewLine;
                    s += "\t\tDelay                0" + Environment.NewLine;
                    s += "\t\tDuration             10.25" + Environment.NewLine;
                    s += "\t\tMagnitude            1" + Environment.NewLine;
                    s += "\t\tPeriod               0" + Environment.NewLine;
                    s += "\t\tChance               1" + Environment.NewLine;
                    s += "\t\tNearGround           kFalse" + Environment.NewLine;
                    s += "\t\tCancelOnMiss         kFalse" + Environment.NewLine;
                    s += "\t\tBoostTemplate        " + (attrib.attrib == "kNull" ? "kFalse" : "kTrue") + Environment.NewLine;
                    s += "\t\tStackType            kReplace" + Environment.NewLine;
                    if (!String.IsNullOrEmpty(attrib.reward))
                    {
                        s += "\t\tReward               " + attrib.reward + Environment.NewLine;
                    }
                    s += "\t}" + Environment.NewLine;
                }
            }

            s += "}" + Environment.NewLine;
            return(s);
        }