Ejemplo n.º 1
0
        public static void FillBuffList()
        {
            try
            {
                activeBuffs.Clear();
                BuffsByID.Clear();
                new Buff(1, "Move speed reduced", true, false, 1, SpellActions.BUFF_DivideMS, SpellActions.BUFF_MultMS);
                new Buff(2, "Attack speed reduced", true, false, 1, SpellActions.BUFF_DivideAS, SpellActions.BUFF_MultAS);
                new Buff(3, "Poisoned", true, true, 2)
                {
                    DisplayAsPercent = false
                };
                new Buff(4, "Root Immune", false, false, 0, (f) => ModdedPlayer.instance.RootImmune = false, f => ModdedPlayer.instance.RootImmune = true)
                {
                    DisplayAmount = false
                };

                new Buff(5, "Move speed increased", false, false, 1, SpellActions.BUFF_DivideMS, SpellActions.BUFF_MultMS);

                new Buff(6, "Stun Immune", false, false, 0, (f) => ModdedPlayer.instance.StunImmune = false, f => ModdedPlayer.instance.StunImmune = true)
                {
                    DisplayAmount = false
                };
                new Buff(7, "Debuff Immune", false, false, 0, (f) => ModdedPlayer.instance.DebuffImmune = false, f => ModdedPlayer.instance.DebuffImmune = true)
                {
                    DisplayAmount = false
                };
                new Buff(8, "Debuff Resistant", false, false, 0, (f) => ModdedPlayer.instance.DebuffResistant = false, f => ModdedPlayer.instance.DebuffResistant = true)
                {
                    DisplayAmount = false
                };


                new Buff(9, "Increased Damage", false, false, 0, f => ModdedPlayer.instance.DamageOutputMult *= f, f => ModdedPlayer.instance.DamageOutputMult /= f);

                new Buff(10, "Decreased Damage", true, false, 3, f => ModdedPlayer.instance.DamageOutputMult *= f, f => ModdedPlayer.instance.DamageOutputMult /= f);

                new Buff(11, "Energy Regen Amp", false, false, 0, f => ItemDataBase.AddPercentage(ref ModdedPlayer.instance.StaminaRegenPercent, f), f => ItemDataBase.RemovePercentage(ref ModdedPlayer.instance.StaminaRegenPercent, f));

                new Buff(12, "Death Pact Damage", false, false)
                {
                    OnAddOverrideAmount = true
                };
            }
            catch (System.Exception ex)
            {
                ModAPI.Log.Write(ex.ToString());
            }
        }
Ejemplo n.º 2
0
 public static void AddMagicResistance(float f)
 {
     ItemDataBase.AddPercentage(ref ChampionsOfForest.ModdedPlayer.instance.MagicResistance, f);
 }
Ejemplo n.º 3
0
 public static void AddDamageReduction(float f)
 {
     ItemDataBase.AddPercentage(ref ChampionsOfForest.ModdedPlayer.instance.DamageReduction, f);
 }
        public static void FillBuffList()
        {
            try
            {
                activeBuffs.Clear();
                BuffsByID.Clear();
                new Buff(1, 156, "Move speed reduced", true, false, 1, SpellActions.BUFF_DivideMS, SpellActions.BUFF_MultMS);
                new Buff(2, 148, "Attack speed reduced", true, false, 1, SpellActions.BUFF_DivideAS, SpellActions.BUFF_MultAS);
                new Buff(3, 157, "Poisoned", true, true, 2)
                {
                    DisplayAsPercent = false
                };
                new Buff(4, 158, "Root Immune", false, false, 0, (f) => ModdedPlayer.instance.RootImmune--, f => ModdedPlayer.instance.RootImmune++)
                {
                    DisplayAmount = false
                };

                new Buff(5, 150, "Move speed increased", false, false, 1, SpellActions.BUFF_DivideMS, SpellActions.BUFF_MultMS);

                new Buff(6, 155, "Stun Immune", false, false, 0, (f) => ModdedPlayer.instance.StunImmune--, f => ModdedPlayer.instance.StunImmune++)
                {
                    DisplayAmount = false
                };
                new Buff(7, 154, "Debuff Immune", false, false, 0, (f) => ModdedPlayer.instance.DebuffImmune--, f => ModdedPlayer.instance.DebuffImmune++)
                {
                    DisplayAmount = false
                };
                new Buff(8, 155, "Debuff Resistant", false, false, 0, (f) => ModdedPlayer.instance.DebuffResistant--, f => ModdedPlayer.instance.DebuffResistant++)
                {
                    DisplayAmount = false
                };


                new Buff(9, 151, "Increased Damage", false, false, 0, f => ModdedPlayer.instance.DamageOutputMult /= f, f => ModdedPlayer.instance.DamageOutputMult *= f);

                new Buff(10, 152, "Decreased Damage", true, false, 2, f => ModdedPlayer.instance.DamageOutputMult /= f, f => ModdedPlayer.instance.DamageOutputMult *= f);

                new Buff(11, 160, "Energy Regen Amp", false, false, 0, f => ItemDataBase.RemovePercentage(ref ModdedPlayer.instance.StaminaRegenPercent, f), f => ItemDataBase.AddPercentage(ref ModdedPlayer.instance.StaminaRegenPercent, f));

                new Buff(12, 153, "Death Pact Damage", false, false)
                {
                    OnAddOverrideAmount = true
                };
                new Buff(13, 151, "Increased Melee Damage", false, false, 0, f => ModdedPlayer.instance.MeleeDamageAmplifier_Mult /= f, f => ModdedPlayer.instance.MeleeDamageAmplifier_Mult *= f);
                new Buff(14, 149, "Attack speed increased", false, false, 1, SpellActions.BUFF_DivideAS, SpellActions.BUFF_MultAS);

                new Buff(15, 146, "Armor", false, false, 1, f => ModdedPlayer.instance.Armor -= Mathf.RoundToInt(f), f => ModdedPlayer.instance.Armor += Mathf.RoundToInt(f))
                {
                    DisplayAsPercent = false
                };

                new Buff(16, 133, "Gold", false, false, 1, f => Gold.Disable(), f => Gold.Enable())
                {
                    DisplayAmount = false
                };

                new Buff(17, 131, "Berserk", false, false, 1, f => Berserker.OnDisable(), f => Berserker.OnEnable())
                {
                    DisplayAmount = false
                };

                new Buff(18, 161, "Energy Leak", true, false, 1, f => ModdedPlayer.instance.EnergyPerSecond += f, f => ModdedPlayer.instance.EnergyPerSecond -= f)
                {
                    DisplayAmount = false
                };

                new Buff(19, 136, "Frenzy", false, false, 1, f =>
                {
                    ModdedPlayer.instance.AttackSpeedMult  /= 1 + f * SpellActions.FrenzyAtkSpeed;
                    ModdedPlayer.instance.DamageOutputMult /= 1 + f * SpellActions.FrenzyDmg;
                    if (SpellActions.FrenzyMS)
                    {
                        ModdedPlayer.instance.MoveSpeedMult /= 1 + f * 0.05f;
                    }

                    SpellActions.FrenzyStacks = 0;
                }, f => {
                    ModdedPlayer.instance.AttackSpeedMult  *= 1 + f * SpellActions.FrenzyAtkSpeed;
                    ModdedPlayer.instance.DamageOutputMult *= 1 + f * SpellActions.FrenzyDmg;
                    if (SpellActions.FrenzyMS)
                    {
                        ModdedPlayer.instance.MoveSpeedMult *= 1 + f * 0.05f;
                    }
                })
                {
                    DisplayAsPercent = false
                };

                new Buff(20, 159, "Near Death Experience", false, false, 5, f => ModdedPlayer.instance.NearDeathExperience = false, f => ModdedPlayer.instance.NearDeathExperience = true)
                {
                    DisplayAmount = false
                };

                new Buff(21, 147, "Armor Corruption", true, true, 1, f => ModdedPlayer.instance.ArmorReduction += Mathf.RoundToInt(f), f => ModdedPlayer.instance.ArmorReduction -= Mathf.RoundToInt(f))
                {
                    DisplayAsPercent = false
                };

                new Buff(22, 151, "Increased Damage", false, false, 0, f => ModdedPlayer.instance.MeleeDamageBonus     -= f, f => ModdedPlayer.instance.MeleeDamageBonus += f);
                new Buff(23, 151, "Counter Strike", false, true, 0, f => ModdedPlayer.instance.ParryCounterStrikeDamage = 0)
                {
                    DisplayAsPercent = false
                };
                new Buff(24, 151, "Critical Damage", false, false, 0, f => ModdedPlayer.instance.CritDamage  -= f * 100, f => ModdedPlayer.instance.CritDamage += f * 100);
                new Buff(25, 146, "Life Regeneration", false, false, 0, f => ModdedPlayer.instance.LifeRegen -= f, f => ModdedPlayer.instance.LifeRegen += f);
                new Buff(26, 146, "Resistance", false, false, 0, f => ModdedPlayer.instance.DamageReduction  /= 1 - f, f => ModdedPlayer.instance.DamageReduction *= 1 - f);
            }
            catch (System.Exception ex)
            {
                ModAPI.Log.Write(ex.ToString());
            }
        }
Ejemplo n.º 5
0
        public static void FillBuffList()
        {
            try
            {
                activeBuffs.Clear();
                BuffsByID.Clear();
                new Buff(1, "Move speed reduced", true, false, 1, SpellActions.BUFF_DivideMS, SpellActions.BUFF_MultMS);
                new Buff(2, "Attack speed reduced", true, false, 1, SpellActions.BUFF_DivideAS, SpellActions.BUFF_MultAS);
                new Buff(3, "Poisoned", true, true, 2)
                {
                    DisplayAsPercent = false
                };
                new Buff(4, "Root Immune", false, false, 0, (f) => ModdedPlayer.instance.RootImmune--, f => ModdedPlayer.instance.RootImmune++)
                {
                    DisplayAmount = false
                };

                new Buff(5, "Move speed increased", false, false, 1, SpellActions.BUFF_DivideMS, SpellActions.BUFF_MultMS);

                new Buff(6, "Stun Immune", false, false, 0, (f) => ModdedPlayer.instance.StunImmune--, f => ModdedPlayer.instance.StunImmune++)
                {
                    DisplayAmount = false
                };
                new Buff(7, "Debuff Immune", false, false, 0, (f) => ModdedPlayer.instance.DebuffImmune--, f => ModdedPlayer.instance.DebuffImmune++)
                {
                    DisplayAmount = false
                };
                new Buff(8, "Debuff Resistant", false, false, 0, (f) => ModdedPlayer.instance.DebuffResistant--, f => ModdedPlayer.instance.DebuffResistant++)
                {
                    DisplayAmount = false
                };


                new Buff(9, "Increased Damage", false, false, 0, f => ModdedPlayer.instance.DamageOutputMult /= f, f => ModdedPlayer.instance.DamageOutputMult *= f);

                new Buff(10, "Decreased Damage", true, false, 2, f => ModdedPlayer.instance.DamageOutputMult /= f, f => ModdedPlayer.instance.DamageOutputMult *= f);

                new Buff(11, "Energy Regen Amp", false, false, 0, f => ItemDataBase.RemovePercentage(ref ModdedPlayer.instance.StaminaRegenPercent, f), f => ItemDataBase.AddPercentage(ref ModdedPlayer.instance.StaminaRegenPercent, f));

                new Buff(12, "Death Pact Damage", false, false)
                {
                    OnAddOverrideAmount = true
                };
                new Buff(13, "Increased Melee Damage", false, false, 0, f => ModdedPlayer.instance.MeleeDamageAmplifier_Mult /= f, f => ModdedPlayer.instance.MeleeDamageAmplifier_Mult *= f);
                new Buff(14, "Attack speed increased", false, false, 1, SpellActions.BUFF_DivideAS, SpellActions.BUFF_MultAS);

                new Buff(15, "Armor", false, false, 1, f => ModdedPlayer.instance.Armor -= Mathf.RoundToInt(f), f => ModdedPlayer.instance.Armor += Mathf.RoundToInt(f))
                {
                    DisplayAsPercent = false
                };;

                new Buff(16, "Gold", false, false, 1, f => Gold.Disable(), f => Gold.Enable())
                {
                    DisplayAmount = false
                };

                new Buff(17, "Berserk", false, false, 1, f => Berserker.OnDisable(), f => Berserker.OnEnable())
                {
                    DisplayAmount = false
                };

                new Buff(18, "Energy Leak", true, false, 1, f => ModdedPlayer.instance.EnergyPerSecond += f, f => ModdedPlayer.instance.EnergyPerSecond -= f);
            }
            catch (System.Exception ex)
            {
                ModAPI.Log.Write(ex.ToString());
            }
        }
Ejemplo n.º 6
0
        public static void FillPerkList()
        {
            AllPerks.Clear();
            //Tier one basic upgrades that allow stats to take effect
            new Perk("Stronger Hits", "Every point of STRENGHT increases MEELE DAMAGE by 0.5%.", -1, 1.5f, 0, PerkCategory.MeleeOffense, 1, 1, () => ModdedPlayer.instance.DamagePerStrenght         += 0.005f, () => ModdedPlayer.instance.DamagePerStrenght -= 0.005f);
            new Perk("Stronger Spells", "Every point of INTELLIGENCE increases SPELL DAMAGE by 0.5%.", -1, 1.5f, 0, PerkCategory.MagicOffense, 1, 1, () => ModdedPlayer.instance.SpellDamageperInt   += 0.005f, () => ModdedPlayer.instance.SpellDamageperInt -= 0.005f);
            new Perk("Stronger Projectiles", "Every point of AGILITY increases RANGED DAMAGE by 0.5%.", -1, 1.5f, 0, PerkCategory.RangedOffense, 1, 1, () => ModdedPlayer.instance.SpellDamageperInt += 0.005f, () => ModdedPlayer.instance.SpellDamageperInt -= 0.005f);
            new Perk("Stamina Recovery", "Every point of INTELLIGENCE increases stamina recover by 0.75%.", -1, 1.5f, 0, PerkCategory.Utility, 1, 1, () => ModdedPlayer.instance.EnergyRegenPerInt   += 0.0075f, () => ModdedPlayer.instance.EnergyRegenPerInt -= 0.0075f);
            new Perk("More Stamina", "Every point of AGILITY increases max stamina by 0.5", -1, -1.5f, 0, PerkCategory.Utility, 1, 1, () => ModdedPlayer.instance.EnergyPerAgility += 0.5f, () => ModdedPlayer.instance.EnergyPerAgility -= 0.5f);
            new Perk("More Health", "Every point of VITALITY increases max health by 1", -1, 1.5f, 0, PerkCategory.Defense, 1, 1, () => ModdedPlayer.instance.HealthPerVitality    += 1, () => ModdedPlayer.instance.HealthPerVitality -= 1f);
            new Perk("More Healing", "Increases healing by 10%", -1, -1.5f, 0, PerkCategory.Support, 1, 1, () => ModdedPlayer.instance.HealingMultipier *= 1.10f, () => ModdedPlayer.instance.HealingMultipier /= 1.10f);
            //new Perk()
            //{
            //    ApplyMethods = () => ,
            //    DisableMethods = () => ,
            //    Category = PerkCategory.MeleeOffense,
            //    Icon = Texture2D.whiteTexture,
            //    InheritIDs = new int[] { -1 },
            //    LevelRequirement = 1,
            //    PointsToBuy = 1,
            //    Size = 1,
            //    PosOffsetX = 2f,
            //    PosOffsetY = 0.5f,
            //    Name = "NAME",
            //    Description = "DESCRIPTION",
            //    TextureVariation = 0, //0 or 1
            //    Endless = false,
            //};
            new Perk()
            {
                ApplyMethods     = () => ModdedPlayer.instance.HungerRate *= 0.96f,
                DisableMethods   = () => ModdedPlayer.instance.HungerRate /= 0.96f,
                Category         = PerkCategory.Utility,
                Icon             = null,
                InheritIDs       = new int[] { 4 },
                LevelRequirement = 5,
                PointsToBuy      = 1,
                Size             = 1,
                PosOffsetX       = -2f,
                PosOffsetY       = 0.75f,
                Name             = "Metabolism",
                Description      = "Decreases hunger rate by 4%.",
                TextureVariation = 1, //0 or 1
                Endless          = true,
            };
            new Perk()
            {
                ApplyMethods     = () => ModdedPlayer.instance.ThirstRate *= 0.96f,
                DisableMethods   = () => ModdedPlayer.instance.ThirstRate /= 0.96f,
                Category         = PerkCategory.Utility,
                Icon             = null,
                InheritIDs       = new int[] { 4 },
                LevelRequirement = 5,
                PointsToBuy      = 1,
                Size             = 1,
                PosOffsetX       = -2f,
                PosOffsetY       = -0.75f,
                Name             = "Water Conservation",
                Description      = "Decreases thirst rate by 4%.",
                TextureVariation = 1, //0 or 1
                Endless          = true,
            };
            new Perk()
            {
                ApplyMethods     = () => ModdedPlayer.instance.MeleeDamageBonus += 5,
                DisableMethods   = () => ModdedPlayer.instance.MeleeDamageBonus -= 5,
                Category         = PerkCategory.MeleeOffense,
                Icon             = null,
                InheritIDs       = new int[] { 0 },
                LevelRequirement = 4,
                PointsToBuy      = 1,
                Size             = 1,
                PosOffsetX       = 2f,
                PosOffsetY       = 0.75f,
                Name             = "Damage",
                Description      = "Increases melee damage by 5",
                TextureVariation = 0, //0 or 1
                Endless          = true,
            };
            new Perk()
            {
                ApplyMethods     = () => ModdedPlayer.instance.MeleeDamageAmplifier += 0.02f,
                DisableMethods   = () => ModdedPlayer.instance.MeleeDamageBonus -= 0.02f,
                Category         = PerkCategory.MeleeOffense,
                Icon             = null,
                InheritIDs       = new int[] { 0 },
                LevelRequirement = 4,
                PointsToBuy      = 1,
                Size             = 1,
                PosOffsetX       = 2.5f,
                PosOffsetY       = 0f,
                Name             = "Damage",
                Description      = "Increases melee damage by 2%",
                TextureVariation = 0, //0 or 1
                Endless          = false,
            };
            new Perk()
            {
                ApplyMethods     = () => ModdedPlayer.instance.strenght += 10,
                DisableMethods   = () => ModdedPlayer.instance.strenght -= 10,
                Category         = PerkCategory.MeleeOffense,
                Icon             = null,
                InheritIDs       = new int[] { 0 },
                LevelRequirement = 4,
                PointsToBuy      = 1,
                Size             = 1,
                PosOffsetX       = 2f,
                PosOffsetY       = -0.75f,
                Name             = "Strenght",
                Description      = "Increases strenght by 10",
                TextureVariation = 0, //0 or 1
                Endless          = false,
            };
            new Perk()
            {
                ApplyMethods     = () => ModdedPlayer.instance.RangedDamageBonus += 5,
                DisableMethods   = () => ModdedPlayer.instance.MeleeDamageBonus -= 5,
                Category         = PerkCategory.RangedOffense,
                Icon             = null,
                InheritIDs       = new int[] { 2 },
                LevelRequirement = 4,
                PointsToBuy      = 1,
                Size             = 1,
                PosOffsetX       = 2f,
                PosOffsetY       = -0.75f,
                Name             = "Damage",
                Description      = "Increases projectile damage by 5",
                TextureVariation = 0, //0 or 1
                Endless          = true,
            };
            new Perk()
            {
                ApplyMethods     = () => ModdedPlayer.instance.ProjectileSizeRatio += 0.05f,
                DisableMethods   = () => ModdedPlayer.instance.ProjectileSizeRatio -= 0.05f,
                Category         = PerkCategory.RangedOffense,
                Icon             = null,
                InheritIDs       = new int[] { 2 },
                LevelRequirement = 4,
                PointsToBuy      = 1,
                Size             = 1,
                PosOffsetX       = 2f,
                PosOffsetY       = 0.75f,
                Name             = "Size",
                Description      = "Increases projectile size by 5%",
                TextureVariation = 0, //0 or 1
                Endless          = false,
            };
            new Perk()
            {
                ApplyMethods     = () => ModdedPlayer.instance.ProjectileSpeedRatio += 0.05f,
                DisableMethods   = () => ModdedPlayer.instance.ProjectileSpeedRatio -= 0.05f,
                Category         = PerkCategory.RangedOffense,
                Icon             = null,
                InheritIDs       = new int[] { 2 },
                LevelRequirement = 4,
                PointsToBuy      = 1,
                Size             = 1,
                PosOffsetX       = 2.5f,
                PosOffsetY       = 0f,
                Name             = "Speed",
                Description      = "Increases projectile speed by 5%",
                TextureVariation = 0, //0 or 1
                Endless          = false,
            };
            new Perk()
            {
                ApplyMethods     = () => ItemDataBase.AddPercentage(ref ModdedPlayer.instance.SpellCostToStamina, 0.05f),
                DisableMethods   = () => ItemDataBase.RemovePercentage(ref ModdedPlayer.instance.SpellCostToStamina, 0.05f),
                Category         = PerkCategory.MagicOffense,
                Icon             = null,
                InheritIDs       = new int[] { 1 },
                LevelRequirement = 4,
                PointsToBuy      = 1,
                Size             = 1,
                PosOffsetX       = 2.5f,
                PosOffsetY       = 0f,
                Name             = "Transmutation",
                Description      = "5% of the spell cost is now taxed from stamina instead of energy.",
                TextureVariation = 0, //0 or 1
                Endless          = false,
            };
            new Perk()
            {
                ApplyMethods     = () => ItemDataBase.AddPercentage(ref ModdedPlayer.instance.SpellCostRatio, 0.02f),
                DisableMethods   = () => ItemDataBase.RemovePercentage(ref ModdedPlayer.instance.SpellCostRatio, 0.02f),
                Category         = PerkCategory.MagicOffense,
                Icon             = null,
                InheritIDs       = new int[] { 15 },
                LevelRequirement = 7,
                PointsToBuy      = 1,
                Size             = 1,
                PosOffsetX       = 2.5f,
                PosOffsetY       = 0.75f,
                Name             = "Resource Cost Reduction",
                Description      = "Spell costs are reduced by 5",
                TextureVariation = 0, //0 or 1
                Endless          = false,
            };
            //0.7 perks
            new Perk()
            {
                ApplyMethods     = () => { ItemDataBase.AddPercentage(ref ModdedPlayer.instance.DamageReductionPerks, 0.20f); ItemDataBase.RemovePercentage(ref ModdedPlayer.instance.DamageOutputMultPerks, 0.20f); },
                DisableMethods   = () => { ItemDataBase.RemovePercentage(ref ModdedPlayer.instance.DamageReductionPerks, 0.20f); ItemDataBase.AddPercentage(ref ModdedPlayer.instance.DamageOutputMultPerks, 0.20f); },
                Category         = PerkCategory.Defense,
                Icon             = Texture2D.whiteTexture,
                InheritIDs       = new int[] { 5 },
                LevelRequirement = 8,
                PointsToBuy      = 1,
                Size             = 1,
                PosOffsetX       = 2f,
                PosOffsetY       = 0.75f,
                Name             = "Undestructable",
                Description      = "Decreases all damage taken and decreases all damage dealt by 20%",
                TextureVariation = 0, //0 or 1
                Endless          = false,
            };



            foreach (Perk item in AllPerks)
            {
                ModAPI.Log.Write("[" + item.ID + "]" + item.Name);
            }
        }