예제 #1
0
        public CustomSkillDefinition(CustomSurvivor survivor, string skillName)
        {
            SkillName = skillName;

            BaseRechargeInterval = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                       skillName + "BaseRechargeInterval",
                                                                       skillName + ": How long it takes for this skill to recharge after being used."),
                                                                   "baseRechargeInterval");

            ShootDelay = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                             skillName + "ShootDelay",
                                                             skillName + ": Time between bullets for bullet-style weapons"),
                                                         "shootDelay");

            BaseMaxStock = new FieldConfigWrapper <int>(survivor.WrapConfigInt(
                                                            skillName + "BaseMaxStock",
                                                            skillName + ": Maximum number of charges this skill can carry."),
                                                        "baseMaxStock");

            RechargeStock = new FieldConfigWrapper <int>(survivor.WrapConfigInt(
                                                             skillName + "RechargeStock",
                                                             skillName + ": How much stock to restore on a recharge."),
                                                         "rechargeStock");

            IsCombatSkill = new FieldConfigWrapper <string>(survivor.WrapConfigBool(
                                                                skillName + "IsCombatSkill",
                                                                skillName + ": Whether or not this is considered a combat skill."),
                                                            "isCombatSkill");

            NoSprint = new FieldConfigWrapper <string>(survivor.WrapConfigBool(
                                                           skillName + "NoSprint",
                                                           skillName + ": Whether or not the usage of this skill is mutually exclusive with sprinting."),
                                                       "noSprint");

            RequiredStock = new FieldConfigWrapper <int>(survivor.WrapConfigInt(
                                                             skillName + "RequiredStock",
                                                             skillName + ": How much stock is required to activate this skill."),
                                                         "requiredStock");

            StockToConsume = new FieldConfigWrapper <int>(survivor.WrapConfigInt(
                                                              skillName + "StockToConsume",
                                                              skillName + ": How much stock to deduct when the skill is activated."),
                                                          "stockToConsume");

            MustKeyPress = new FieldConfigWrapper <string>(survivor.WrapConfigBool(
                                                               skillName + "MustKeyPress",
                                                               skillName + ": The skill can't be activated if the key is held."),
                                                           "mustKeyPress");

            BeginSkillCooldownOnSkillEnd = new FieldConfigWrapper <string>(survivor.WrapConfigBool(
                                                                               skillName + "BeginSkillCooldownOnSkillEnd",
                                                                               skillName + ": Whether or not the cooldown waits until it leaves the set state"),
                                                                           "beginSkillCooldownOnSkillEnd");

            CanceledFromSprinting = new FieldConfigWrapper <string>(survivor.WrapConfigBool(
                                                                        skillName + "CanceledFromSprinting",
                                                                        skillName + ": Sprinting will actively cancel this ability."),
                                                                    "canceledFromSprinting");

            IsBullets = new FieldConfigWrapper <string>(survivor.WrapConfigBool(
                                                            skillName + "IsBullets",
                                                            skillName + ": Whether or not it has bullet reload behavior"),
                                                        "isBullets");


            AllFields = new List <IFieldChanger>
            {
                BaseRechargeInterval,
                BaseMaxStock,
                ShootDelay,
                RechargeStock,
                IsCombatSkill,
                NoSprint,
                RequiredStock,
                StockToConsume,
                MustKeyPress,
                BeginSkillCooldownOnSkillEnd,
                CanceledFromSprinting,
                IsBullets
            };
        }
        public CustomBodyDefinition(CustomSurvivor survivor, string commonName, string survivorNameToken)
        {
            CommonName        = commonName;
            SurvivorNameToken = survivorNameToken;

            BaseMaxHealth = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                               commonName + "BaseMaxHealth",
                                                               0f,
                                                               commonName + ": The base health of your survivor"),
                                                           "baseMaxHealth");

            BaseRegen = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                           commonName + "BaseRegen",
                                                           0f,
                                                           commonName + ": The base regen of your survivor"),
                                                       "baseRegen");

            BaseMaxShield = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                               commonName + "BaseMaxShield",
                                                               0f,
                                                               commonName + ": the base max shield of you survivor"),
                                                           "baseMaxShield");

            BaseMoveSpeed = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                               commonName + "BaseMoveSpeed",
                                                               0f,
                                                               commonName + ": The base move speed of your survivor"),
                                                           "baseMoveSpeed");

            BaseAcceleration = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                                  commonName + "BaseAcceleration",
                                                                  0f,
                                                                  commonName + ": The base acceleration of your survivor"),
                                                              "baseAcceleration");

            BaseJumpPower = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                               commonName + "BaseJumpPower",
                                                               0f,
                                                               commonName + ": The base jump power of your survivor"),
                                                           "baseJumpPower");

            BaseDamage = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                            commonName + "BaseDamage",
                                                            0f,
                                                            commonName + ": The base damage of your survivor"),
                                                        "baseDamage");

            BaseAttackSpeed = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                                 commonName + "BaseAttackSpeed",
                                                                 0f,
                                                                 commonName + ": The base attack speed of your survivor"),
                                                             "baseAttackSpeed");

            BaseCrit = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                          commonName + "BaseCrit",
                                                          0f,
                                                          commonName + ": The base crit chance of your survivor"),
                                                      "baseCrit");

            BaseArmor = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                           commonName + "BaseArmor",
                                                           0f,
                                                           commonName + ": The base armor of your survivor"),
                                                       "baseArmor");

            BaseJumpCount = new FieldConfigWrapper <int>(survivor.BindConfig(
                                                             commonName + "BaseJumpCount",
                                                             0,
                                                             commonName + ": The base jump count of your survivor"),
                                                         "baseJumpCount");

            LevelMaxHealth = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                                commonName + "LevelMaxHealth",
                                                                0f,
                                                                commonName + ": The max health per level your survivor gets."),
                                                            "levelMaxHealth");

            LevelRegen = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                            commonName + "LevelRegen",
                                                            0f,
                                                            commonName + ": The regen per level your survivor gets."),
                                                        "levelRegen");

            LevelMaxShield = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                                commonName + "LevelMaxShield",
                                                                0f,
                                                                commonName + ": The max shield per level your survivor gets"),
                                                            "levelMaxShield");

            LevelMoveSpeed = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                                commonName + "LevelMoveSpeed",
                                                                0f,
                                                                commonName + ": The move speed per level your survivor gets"),
                                                            "levelMoveSpeed");

            LevelJumpPower = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                                commonName + "LevelJumpPower",
                                                                0f,
                                                                commonName + ": The jump power per level your survivor gets"),
                                                            "levelJumpPower");

            LevelDamage = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                             commonName + "LevelDamage",
                                                             0f,
                                                             commonName + ": The damage per level your survivor gets"),
                                                         "levelDamage");

            LevelAttackSpeed = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                                  commonName + "LevelAttackSpeed",
                                                                  0f,
                                                                  commonName + ": The attack speed per level your survivor gets"),
                                                              "levelAttackSpeed");

            LevelCrit = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                           commonName + "LevelCrit",
                                                           0f,
                                                           commonName + ": The crit chance per level your survivor gets"),
                                                       "levelCrit");

            LevelArmor = new FieldConfigWrapper <float>(survivor.BindConfig(
                                                            commonName + "LevelArmor",
                                                            0f,
                                                            commonName + ": The armor per level your survivor gets"),
                                                        "levelArmor");

            AllFields = new List <IFieldChanger>
            {
                BaseMaxHealth,
                BaseRegen,
                BaseMaxShield,
                BaseMoveSpeed,
                BaseAcceleration,
                BaseJumpPower,
                BaseDamage,
                BaseAttackSpeed,
                BaseCrit,
                BaseArmor,
                BaseJumpCount,

                LevelMaxHealth,
                LevelRegen,
                LevelMaxShield,
                LevelMoveSpeed,
                LevelJumpPower,
                LevelDamage,
                LevelAttackSpeed,
                LevelCrit,
                LevelArmor
            };

            foreach (var fieldChanger in AllFields)
            {
                fieldChanger.AddFieldChangedListener(InternalFieldChanged);
            }
        }
        public CustomBodyDefinition(CustomSurvivor survivor, string survivorName)
        {
            SurvivorName = survivorName;

            BaseMaxHealth = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                survivorName + "BaseMaxHealth",
                                                                survivorName + ": The base health of your survivor"),
                                                            "baseMaxHealth");

            BaseRegen = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                            survivorName + "BaseRegen",
                                                            survivorName + ": The base regen of your survivor"),
                                                        "baseRegen");

            BaseMaxShield = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                survivorName + "BaseMaxShield",
                                                                survivorName + ": the base max shield of you survivor"),
                                                            "baseMaxShield");

            BaseMoveSpeed = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                survivorName + "BaseMoveSpeed",
                                                                survivorName + ": The base move speed of your survivor"),
                                                            "baseMoveSpeed");

            BaseAcceleration = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                   survivorName + "BaseAcceleration",
                                                                   survivorName + ": The base acceleration of your survivor"),
                                                               "baseAcceleration");

            BaseJumpPower = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                survivorName + "BaseJumpPower",
                                                                survivorName + ": The base jump power of your survivor"),
                                                            "baseJumpPower");

            BaseDamage = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                             survivorName + "BaseDamage",
                                                             survivorName + ": The base damage of your survivor"),
                                                         "baseDamage");

            BaseAttackSpeed = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                  survivorName + "BaseAttackSpeed",
                                                                  survivorName + ": The base attack speed of your survivor"),
                                                              "baseAttackSpeed");

            BaseCrit = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                           survivorName + "BaseCrit",
                                                           survivorName + ": The base crit chance of your survivor"),
                                                       "baseCrit");

            BaseArmor = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                            survivorName + "BaseArmor",
                                                            survivorName + ": The base armor of your survivor"),
                                                        "baseArmor");

            BaseJumpCount = new FieldConfigWrapper <int>(survivor.WrapConfigInt(
                                                             survivorName + "BaseJumpCount",
                                                             survivorName + ": The base jump count of your survivor"),
                                                         "baseJumpCount");

            LevelMaxHealth = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                 survivorName + "LevelMaxHealth",
                                                                 survivorName + ": The max health per level your survivor gets."),
                                                             "levelMaxHealth");

            LevelRegen = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                             survivorName + "LevelRegen",
                                                             survivorName + ": The regen per level your survivor gets."),
                                                         "levelRegen");

            LevelMaxShield = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                 survivorName + "LevelMaxShield",
                                                                 survivorName + ": The max shield per level your survivor gets"),
                                                             "levelMaxShield");

            LevelMoveSpeed = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                 survivorName + "LevelMoveSpeed",
                                                                 survivorName + ": The move speed per level your survivor gets"),
                                                             "levelMoveSpeed");

            LevelJumpPower = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                 survivorName + "LevelJumpPower",
                                                                 survivorName + ": The jump power per level your survivor gets"),
                                                             "levelJumpPower");

            LevelDamage = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                              survivorName + "LevelDamage",
                                                              survivorName + ": The damage per level your survivor gets"),
                                                          "levelDamage");

            LevelAttackSpeed = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                                   survivorName + "LevelAttackSpeed",
                                                                   survivorName + ": The attack speed per level your survivor gets"),
                                                               "levelAttackSpeed");

            LevelCrit = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                            survivorName + "LevelCrit",
                                                            survivorName + ": The crit chance per level your survivor gets"),
                                                        "levelCrit");

            LevelArmor = new FieldConfigWrapper <string>(survivor.WrapConfigFloat(
                                                             survivorName + "LevelArmor",
                                                             survivorName + ": The armor per level your survivor gets"),
                                                         "levelArmor");

            AllFields = new List <IFieldChanger>
            {
                BaseMaxHealth,
                BaseRegen,
                BaseMaxShield,
                BaseMoveSpeed,
                BaseAcceleration,
                BaseJumpPower,
                BaseDamage,
                BaseAttackSpeed,
                BaseCrit,
                BaseArmor,
                BaseJumpCount,

                LevelMaxHealth,
                LevelRegen,
                LevelMaxShield,
                LevelMoveSpeed,
                LevelJumpPower,
                LevelDamage,
                LevelAttackSpeed,
                LevelCrit,
                LevelArmor
            };
        }