Beispiel #1
0
        /// <summary>
        ///   <para>Creates a new <see cref="CustomItem"/> with the specified <paramref name="id"/>, <paramref name="sprite"/>, <paramref name="name"/> and <paramref name="description"/>.</para>
        /// </summary>
        public static CustomItem CreateCustomItem(string id, Sprite sprite, bool unlockedFromStart, CustomNameInfo name, CustomNameInfo description, Action <InvItem> setupDetails)
        {
            CustomItem customItem = GetCustomItem(id);

            if (customItem != null)
            {
                string message = string.Concat("A CustomItem with Id \"", id, "\" already exists!");
                Logger.LogError(message);
                throw new ArgumentException(message, nameof(id));
            }
            CustomItems.Add(customItem = new CustomItem(id,
                                                        CreateCustomName(id, "Item", name),
                                                        CreateCustomName(id, "Description", description)
                                                        ));
            customItem.Unlocked     = unlockedFromStart;
            customItem.Sprite       = sprite;
            customItem.SetupDetails = setupDetails;
            sprite.name             = id;

            PluginInstance.Setup(customItem);

            Logger.LogDebug(string.Concat("A CustomItem with Id \"", id, "\" was created."));

            return(customItem);
        }
Beispiel #2
0
        // Token: 0x0600000D RID: 13 RVA: 0x00002744 File Offset: 0x00000944
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Divine Favour",
                EffectBehaviour        = EffectBehaviours.OverrideEffects,
                Target_ItemID          = 8205030,
                New_ItemID             = 2502026,
                SLPackName             = "Templar",
                SubfolderName          = "Divine Favour",
                Description            = "Augments Divine Light Imbue to cause a Radiating effect, which damages the victim and those in its proximity over time.",
                IsUsable               = false,
                CastType               = Character.SpellCastType.NONE,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f,
                Cooldown               = 0f,
                StaminaCost            = 0f,
                ManaCost               = 0f,
            };
            Skill skill = (Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill);

            UnityEngine.Object.Destroy(skill.gameObject.GetComponentInChildren <HasStatusEffectEffectCondition>());
            return(skill);
        }
Beispiel #3
0
        // Token: 0x06000064 RID: 100 RVA: 0x00004548 File Offset: 0x00002748
        public static Skill Init()
        {
            SL_AttackSkill sl_AttackSkill = new SL_AttackSkill
            {
                Name                   = "Parry",
                EffectBehaviour        = EffectBehaviours.OverrideEffects,
                Target_ItemID          = 8100360,
                New_ItemID             = 2502016,
                Description            = "Completely block a physical attack.",
                CastType               = Character.SpellCastType.Counter,
                CastModifier           = Character.SpellCastModifier.Attack,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f,
                CastSheatheRequired    = 2,
                RequiredWeaponTypes    = new Weapon.WeaponType[]
                {
                    Weapon.WeaponType.Axe_1H,
                    Weapon.WeaponType.Axe_2H,
                    Weapon.WeaponType.Sword_1H,
                    Weapon.WeaponType.Sword_2H,
                    Weapon.WeaponType.Mace_1H,
                    Weapon.WeaponType.Mace_2H,
                    Weapon.WeaponType.Halberd_2H,
                    Weapon.WeaponType.Spear_2H
                },
                Cooldown    = 3f,
                StaminaCost = 4f,
                ManaCost    = 0f
            };
            Skill     skill     = (Skill)CustomItems.CreateCustomItem(sl_AttackSkill.Target_ItemID, sl_AttackSkill.New_ItemID, sl_AttackSkill.Name, sl_AttackSkill);
            Transform transform = skill.gameObject.transform.FindInAllChildren("HitEffects");

            UnityEngine.Object.Destroy(transform.gameObject);
            return(skill);
        }
Beispiel #4
0
        // Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
        public static Item MakeItem()
        {
            float[] array = new float[]
            {
                4f,
                25f,
                1.1f,
                35f
            };
            SL_Weapon sl_Weapon = new SL_Weapon
            {
                Name          = "Blessed Longsword",
                Target_ItemID = 2000010,
                New_ItemID    = 2501013,
                Description   = "Augments lightning damage infusions that are applied to it.",
                Tags          = HolyAvengerItemPack.GetSafeTags(new List <string>
                {
                    "Finesse",
                    "Holy",
                    "Blade",
                    "Weapon",
                    "Item"
                }),
                StatsHolder = new SL_WeaponStats
                {
                    BaseValue     = new int?(1000),
                    RawWeight     = new float?(3.5f),
                    MaxDurability = new int?(500),
                    AttackSpeed   = new float?(array[2]),
                    BaseDamage    = new List <SL_Damage>
                    {
                        new SL_Damage
                        {
                            Damage = array[3],
                            Type   = DamageType.Types.Physical
                        }
                    },
                    Impact  = new float?(array[1]),
                    Attacks = new WeaponStats.AttackData[]
                    {
                        HolyAvengerItemPack.MakeAttackData(array[0], array[1], array[2], array[3], 1f, 1f),
                        HolyAvengerItemPack.MakeAttackData(array[0], array[1], array[2], array[3], 1f, 1f),
                        HolyAvengerItemPack.MakeAttackData(array[0], array[1], array[2] + 0.1f, array[3], 1.2f, 1.3f),
                        HolyAvengerItemPack.MakeAttackData(array[0], array[1], array[2] + 0.1f, array[3], 1.1f, 1.1f),
                        HolyAvengerItemPack.MakeAttackData(array[0], array[1], array[2] + 0.1f, array[3], 1.1f, 1.1f)
                    }
                },
                ItemVisuals = new SL_ItemVisual
                {
                    Prefab_Name        = "keenlongsword_Prefab",
                    Prefab_AssetBundle = "keenlongsword",
                    Prefab_SLPack      = "HolyAvengerItemPack"
                },
                SLPackName    = "HolyAvengerItemPack",
                SubfolderName = "BlessedLongsword",
                SwingSound    = new SwingSoundWeapon?(SwingSoundWeapon.Weapon_2H)
            };

            return(CustomItems.CreateCustomItem(sl_Weapon.Target_ItemID, sl_Weapon.New_ItemID, "Blessed Longsword", sl_Weapon));
        }
Beispiel #5
0
        // Token: 0x06000013 RID: 19 RVA: 0x00002C78 File Offset: 0x00000E78
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Shield of Faith",
                EffectBehaviour        = 0,
                Target_ItemID          = 8100360,
                New_ItemID             = 2502009,
                SLPackName             = "Templar",
                SubfolderName          = "Shield of Faith",
                Description            = "Blocks an attack, restores your stability and protects you against damage for a brief moment.",
                CastType               = new Character.SpellCastType?(Character.SpellCastType.Brace),
                CastModifier           = new Character.SpellCastModifier?(Character.SpellCastModifier.Immobilized),
                CastLocomotionEnabled  = new bool?(false),
                MobileCastMovementMult = new float?((float)-1),
                CastSheatheRequired    = new int?(0),
                Cooldown               = new float?((float)15),
                StaminaCost            = new float?(0f),
                ManaCost               = new float?((float)7)
            };
            Skill skill = (Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill);

            UnityEngine.Object.Destroy(skill.gameObject.GetComponentInChildren <AddBoonEffect>());
            UnityEngine.Object.Destroy(skill.gameObject.GetComponentInChildren <AutoKnock>());
            GameObject gameObject = skill.transform.Find("HitEffects").gameObject;

            gameObject.AddComponent <AddStatusEffect>().Status = ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Force Bubble");
            GameObject gameObject2 = skill.transform.Find("BlockEffects").gameObject;

            gameObject2.AddComponent <CasualStagger>();
            return(skill);
        }
        // Token: 0x06000052 RID: 82 RVA: 0x00003A34 File Offset: 0x00001C34
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "War Cry",
                EffectBehaviour        = EffectBehaviours.OverrideEffects,
                Target_ItemID          = 8200110,
                New_ItemID             = 2502025,
                SLPackName             = "Juggernaut",
                SubfolderName          = "WarCry",
                Description            = string.Format("Unleash a terrifying roar that staggers nearby enemies.\n\n{0}: Applies confusion to affected enemies.\n\n{1}: Applies pain to affected enemies.", "Unyielding", "Vengeful"),
                CastType               = Character.SpellCastType.Rage,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = 0f,
                EffectTransforms       = new SL_EffectTransform[]
                {
                    new SL_EffectTransform
                    {
                        TransformName = "Effects",
                        Effects       = new SL_Effect[0],
                    }
                },
                Cooldown    = 100f,
                StaminaCost = 0f,
                ManaCost    = 0f
            };
            Skill skill = (Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill);

            skill.transform.Find("Effects").gameObject.AddComponent <WarCryEffect>();
            return(skill);
        }
Beispiel #7
0
        // Token: 0x06000054 RID: 84 RVA: 0x00003B78 File Offset: 0x00001D78
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Juggernaughty",
                EffectBehaviour        = EffectBehaviours.DestroyEffects,
                Target_ItemID          = 8100120,
                New_ItemID             = 2502023,
                Description            = "Trainer Hax",
                CastType               = Character.SpellCastType.Sit,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = true,
                MobileCastMovementMult = -1f,
                EffectTransforms       = new SL_EffectTransform[]
                {
                    new SL_EffectTransform
                    {
                        TransformName = "Effects",
                        Effects       = new SL_Effect[0],
                    }
                },
                Cooldown = 1f,
            };
            Skill     skill     = (Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill);
            Transform transform = skill.transform.Find("Effects");

            transform.gameObject.AddComponent <JuggernaughtyEffect>();
            return(skill);
        }
Beispiel #8
0
            public override CraftableItem GetCraftableItem(GameEntityManager usedMgr)
            {
                var craftableCabinet    = usedMgr.WorkshopDef(WorkshopID.Carpenter).CraftableItems.Single(ci => ci.ItemID == ItemID.Cabinet);
                var craftableBookshelve = CopyCraftableItem(craftableCabinet);

                craftableBookshelve.ItemID = CustomItems.GetItemIdForType <BookShelveItemProvider>();
                return(craftableBookshelve);
            }
Beispiel #9
0
            public override ConstructionDef GetConstructionDefinition(GameEntityManager usedMgr)
            {
                var def = CreateDefinitionCopy(ConstructionID.Cabinet, usedMgr);

                def.Name             = "book shelve";
                def.Components[0].ID = CustomItems.GetItemIdForType <BookShelveItemProvider>();
                return(def);
            }
        // Token: 0x06000056 RID: 86 RVA: 0x00003C78 File Offset: 0x00001E78
        public static Skill Init()
        {
            SL_AttackSkill sl_AttackSkill = new SL_AttackSkill
            {
                Name                   = "Horde Breaker",
                EffectBehaviour        = EffectBehaviours.OverrideEffects,
                Target_ItemID          = 8100320,
                New_ItemID             = 2502024,
                SLPackName             = "Juggernaut",
                SubfolderName          = "HordeBreaker",
                Description            = string.Format("Does two attacks in wide archs that stagger on hit.\n\n{0}: Confused enemies are knocked down.\n\n{1}: Enemies in pain are slowed down.", "Unyielding", "Vengeful"),
                CastType               = new Character.SpellCastType?(Character.SpellCastType.WeaponSkill1),
                CastModifier           = new Character.SpellCastModifier?(Character.SpellCastModifier.Attack),
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f,
                CastSheatheRequired    = 2,
                RequiredWeaponTypes    = new Weapon.WeaponType[]
                {
                    Weapon.WeaponType.Axe_1H,
                    Weapon.WeaponType.Axe_2H,
                    Weapon.WeaponType.Sword_1H,
                    Weapon.WeaponType.Sword_2H,
                    Weapon.WeaponType.Mace_1H,
                    Weapon.WeaponType.Mace_2H,
                    Weapon.WeaponType.Halberd_2H,
                    Weapon.WeaponType.Spear_2H
                },
                EffectTransforms = new SL_EffectTransform[]
                {
                    new SL_EffectTransform
                    {
                        TransformName = "Effects",
                        Effects       = new SL_Effect[0],
                    }
                },
                Cooldown    = 60f,
                StaminaCost = 16f,
                ManaCost    = 0f
            };
            Skill skill = (Skill)CustomItems.CreateCustomItem(sl_AttackSkill.Target_ItemID, sl_AttackSkill.New_ItemID, sl_AttackSkill.Name, sl_AttackSkill);

            UnityEngine.Object.Destroy(skill.transform.Find("HitEffects_Rage").gameObject);
            UnityEngine.Object.Destroy(skill.transform.Find("HitEffects_Discipline").gameObject);
            WeaponSkillAnimationSelector.SetCustomAttackAnimation(skill, Weapon.WeaponType.Halberd_2H);
            Transform transform = skill.transform.Find("HitEffects");

            transform.gameObject.AddComponent <HordeBreakerEffect>();
            WeaponDamage componentInChildren = skill.gameObject.GetComponentInChildren <WeaponDamage>();

            componentInChildren.WeaponDamageMult            = 1f;
            componentInChildren.WeaponDurabilityLossPercent = 0f;
            componentInChildren.WeaponDurabilityLoss        = 1f;
            componentInChildren.Damages             = new DamageType[0];
            componentInChildren.WeaponKnockbackMult = 1f;
            UnityEngine.Object.Destroy(skill.gameObject.GetComponentInChildren <HasStatusEffectEffectCondition>());
            UnityEngine.Object.Destroy(skill.gameObject.GetComponentInChildren <AddStatusEffect>());
            return(skill);
        }
Beispiel #11
0
        // Token: 0x06000011 RID: 17 RVA: 0x000029EC File Offset: 0x00000BEC
        public static Skill Init()
        {
            SL_AttackSkill sl_AttackSkill = new SL_AttackSkill
            {
                Name                   = "Wrathful Smite",
                EffectBehaviour        = EffectBehaviours.OverrideEffects,
                Target_ItemID          = 8100350,
                New_ItemID             = 2502008,
                SLPackName             = "Templar",
                SubfolderName          = "Wrathful Smite",
                Description            = "A leaping attack that deals more damage to enemies that are knocked down.\n\nWrathful Smite instantly becomes available for another use if it kills its target.",
                CastType               = Character.SpellCastType.AxeLeap,
                CastModifier           = Character.SpellCastModifier.Attack,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f,
                CastSheatheRequired    = 2,
                RequiredWeaponTypes    = new Weapon.WeaponType[]
                {
                    Weapon.WeaponType.Axe_1H,
                    Weapon.WeaponType.Axe_2H,
                    Weapon.WeaponType.Sword_1H,
                    Weapon.WeaponType.Sword_2H,
                    Weapon.WeaponType.Mace_1H,
                    Weapon.WeaponType.Mace_2H,
                    Weapon.WeaponType.Halberd_2H,
                    Weapon.WeaponType.Spear_2H
                },
                Cooldown    = 40f,
                StaminaCost = 8f,
                ManaCost    = 7f
            };
            Skill skill = (Skill)CustomItems.CreateCustomItem(sl_AttackSkill.Target_ItemID, sl_AttackSkill.New_ItemID, sl_AttackSkill.Name, sl_AttackSkill);

            skill.transform.Find("ActivationEffects").gameObject.AddComponent <EnableHitDetection>().Delay = 0.5f;
            UnityEngine.Object.Destroy(skill.gameObject.GetComponentInChildren <WeaponDamage>());
            ExecutionWeaponDamage executionWeaponDamage = skill.transform.Find("HitEffects").gameObject.AddComponent <ExecutionWeaponDamage>();

            executionWeaponDamage.SetCooldown                 = 1f;
            executionWeaponDamage.WeaponDamageMult            = 1f;
            executionWeaponDamage.WeaponDamageMultKDown       = 2f;
            executionWeaponDamage.WeaponDurabilityLossPercent = 0f;
            executionWeaponDamage.WeaponDurabilityLoss        = 1f;
            executionWeaponDamage.OverrideDType               = DamageType.Types.Count;
            executionWeaponDamage.Damages = new DamageType[]
            {
                new DamageType(DamageType.Types.Electric, 30f)
            };
            executionWeaponDamage.WeaponKnockbackMult = 2f;
            UnityEngine.Object.Destroy(skill.gameObject.GetComponentInChildren <HasStatusEffectEffectCondition>());
            UnityEngine.Object.Destroy(skill.gameObject.GetComponentInChildren <AddStatusEffect>());
            foreach (PlaySoundEffect obj in from x in skill.gameObject.GetComponentsInChildren <PlaySoundEffect>()
                     where x.Sounds.Contains(GlobalAudioManager.Sounds.CS_Golem_HeavyAttackFence_Whoosh1)
                     select x)
            {
                UnityEngine.Object.Destroy(obj);
            }
            return(skill);
        }
 private void OnRemoveCustomItemExecute()
 {
     SelectedCustomItem.PropertyChanged -= WrappedCustomItem_PropertyChanged;
     _customItemRepository.Remove(SelectedCustomItem.Model);
     CustomItems.Remove(_selectedCustomItem);
     SelectedCustomItem = null;
     HasChanges         = _customItemRepository.HasChanges();
     SaveCommand.RaiseCanExecuteChanged();
 }
        // Token: 0x06000009 RID: 9 RVA: 0x00002460 File Offset: 0x00000660
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Restoration",
                EffectBehaviour        = EffectBehaviours.OverrideEffects,
                Target_ItemID          = 8200180,
                New_ItemID             = 2502003,
                SLPackName             = "Templar",
                SubfolderName          = "Restoration",
                Description            = "Cures you from all hexes, bleeding and slowing effects.",
                CastType               = Character.SpellCastType.CallElements,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = 0f,
                EffectTransforms       = new SL_EffectTransform[]
                {
                    new SL_EffectTransform
                    {
                        TransformName = "Effects",
                        Effects       = new SL_Effect[]
                        {
                            new SL_RemoveStatusEffect
                            {
                                Status_Tag  = "Hex",
                                CleanseType = RemoveStatusEffect.RemoveTypes.StatusType
                            },
                            new SL_RemoveStatusEffect
                            {
                                Status_Name = "Slow Down",
                                CleanseType = RemoveStatusEffect.RemoveTypes.StatusSpecific
                            },
                            new SL_RemoveStatusEffect
                            {
                                Status_Name = "Cripple",
                                CleanseType = RemoveStatusEffect.RemoveTypes.StatusSpecific
                            },
                            new SL_RemoveStatusEffect
                            {
                                Status_Tag  = "Bleeding",
                                CleanseType = RemoveStatusEffect.RemoveTypes.StatusType
                            }
                        }
                    }
                },
                Cooldown    = 30f,
                StaminaCost = 0f,
                ManaCost    = 14f,
            };

            return((Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill));
        }
        // Token: 0x06000007 RID: 7 RVA: 0x000022B4 File Offset: 0x000004B4
        public static Skill Init()
        {
            SL_AttackSkill sl_AttackSkill = new SL_AttackSkill
            {
                Name                   = "Infuse Burst of Light",
                EffectBehaviour        = EffectBehaviours.OverrideEffects,
                Target_ItemID          = 8200100,
                New_ItemID             = 2502001,
                SLPackName             = "Templar",
                SubfolderName          = "Infuse Burst of Light",
                Description            = "Temporarly infuse your weapon with light for, without consuming your Blessed boon.",
                IsUsable               = true,
                CastType               = Character.SpellCastType.SpellBindLight,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f,
                RequiredWeaponTypes    = new Weapon.WeaponType[]
                {
                    Weapon.WeaponType.Axe_1H,
                    Weapon.WeaponType.Axe_2H,
                    Weapon.WeaponType.Sword_1H,
                    Weapon.WeaponType.Sword_2H,
                    Weapon.WeaponType.Mace_1H,
                    Weapon.WeaponType.Mace_2H,
                    Weapon.WeaponType.Halberd_2H,
                    Weapon.WeaponType.Spear_2H
                },
                EffectTransforms = new SL_EffectTransform[]
                {
                    new SL_EffectTransform
                    {
                        TransformName = "Effects",
                        Effects       = new SL_Effect[]
                        {
                            new SL_ImbueWeapon
                            {
                                Lifespan = 60f,
                                ImbueEffect_Preset_ID = 219,
                                Imbue_Slot            = Weapon.WeaponSlot.MainHand
                            }
                        }
                    }
                },
                Cooldown    = new float?((float)2),
                StaminaCost = new float?(0f),
                ManaCost    = new float?((float)7)
            };
            Skill skill = (Skill)CustomItems.CreateCustomItem(sl_AttackSkill.Target_ItemID, sl_AttackSkill.New_ItemID, sl_AttackSkill.Name, sl_AttackSkill);

            UnityEngine.Object.Destroy(skill.gameObject.GetComponentInChildren <HasStatusEffectEffectCondition>());
            return(skill);
        }
        private async void HardwareTypesViewModel_PropertyChangedAsync(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName == nameof(SelectedHardwareType))
            {
                if (SelectedHardwareType == null)
                {
                    CustomItems.Clear();
                    return;
                }

                await LoadCustomItems();
            }
        }
Beispiel #16
0
        // Token: 0x06000002 RID: 2 RVA: 0x00002290 File Offset: 0x00000490
        public static Item MakeRecipes()
        {
            string text = "com.ehaugw.holyavengeritempack." + "BlessedLongsword".ToLower() + "recipe";

            new SL_Recipe
            {
                StationType = Recipe.CraftingType.Survival,
                Results     = new List <SL_Recipe.ItemQty>
                {
                    new SL_Recipe.ItemQty
                    {
                        Quantity = 1,
                        ItemID   = 2501013
                    }
                },
                Ingredients = new List <SL_Recipe.Ingredient>
                {
                    new SL_Recipe.Ingredient
                    {
                        Type = RecipeIngredient.ActionTypes.AddSpecificIngredient,
                        Ingredient_ItemID = 2000160
                    },
                    new SL_Recipe.Ingredient
                    {
                        Type = RecipeIngredient.ActionTypes.AddSpecificIngredient,
                        Ingredient_ItemID = 5300170
                    },
                    new SL_Recipe.Ingredient
                    {
                        Type = RecipeIngredient.ActionTypes.AddSpecificIngredient,
                        Ingredient_ItemID = 2020091
                    },
                    new SL_Recipe.Ingredient
                    {
                        Type = RecipeIngredient.ActionTypes.AddSpecificIngredient,
                        Ingredient_ItemID = 6600210
                    }
                },
                UID = text
            }.ApplyRecipe();
            SL_RecipeItem sl_RecipeItem = new SL_RecipeItem
            {
                Name            = "Crafting: Blessed Longsword",
                Target_ItemID   = 5700024,
                New_ItemID      = 2501026,
                EffectBehaviour = EffectBehaviours.OverrideEffects,
                RecipeUID       = text
            };

            return(CustomItems.CreateCustomItem(sl_RecipeItem.Target_ItemID, sl_RecipeItem.New_ItemID, sl_RecipeItem.Name, sl_RecipeItem));
        }
        private async void OnAddCustomItemExecute()
        {
            var dialogResult = await _messageDialogService.ShowInputMessageAsync(this, "Nowe pole zdefiniowane...", "Podaj nazwę nowego pola:");

            if (!String.IsNullOrWhiteSpace(dialogResult))
            {
                var wrappedCustomItem = new CustomItemWrapper(new CustomItem()
                {
                    HardwareTypeId = SelectedHardwareType.Model.Id
                });
                wrappedCustomItem.PropertyChanged += WrappedCustomItem_PropertyChanged;
                _customItemRepository.Add(wrappedCustomItem.Model);
                CustomItems.Add(wrappedCustomItem);

                wrappedCustomItem.Key = dialogResult;
            }
        }
        public static void Postfix()
        {
            if (CustomItems.s_customLocalizations.Any())
            {
                for (int i = CustomItems.s_customLocalizations.Count - 1; i >= 0; i--)
                {
                    var entry = CustomItems.s_customLocalizations.ElementAt(i);

                    if (!(ResourcesPrefabManager.Instance.GetItemPrefab(entry.Key) is Item item))
                    {
                        continue;
                    }

                    CustomItems.SetNameAndDescription(item, entry.Value.Name, entry.Value.Desc);
                }
            }
        }
Beispiel #19
0
        private static void Create(Item result, List <int> ingredients, int recipeItemID)
        {
            SL_Recipe recipe = new SL_Recipe();

            recipe.UID = Main.MODID + ":" + result.ItemID;

            recipe.Ingredients = new List <Ingredient>();

            foreach (int id in ingredients)
            {
                Ingredient ing = new Ingredient();
                ing.Ingredient_ItemID = id;
                ing.Type = RecipeIngredient.ActionTypes.AddSpecificIngredient;

                recipe.Ingredients.Add(ing);
            }

            SL_Recipe.ItemQty slresult = new SL_Recipe.ItemQty();
            slresult.ItemID   = result.ItemID;
            slresult.Quantity = 1;

            recipe.Results = new List <SL_Recipe.ItemQty>()
            {
                slresult
            };

            recipe.StationType = Recipe.CraftingType.Survival;

            recipe.ApplyRecipe();


            RecipeItem recipeitem = (RecipeItem)CustomItems.CreateCustomItem(new SL_Item()
            {
                Name          = "Crafting: " + result.Name,
                Description   = "Teaches you how to craft the item.",
                Target_ItemID = 5700118, // a recipe item id
                New_ItemID    = recipeItemID,
                IsUsable      = true
            });

            Log.Print("recpe");
            recipeitem.Recipe = References.ALL_RECIPES[recipe.UID];

            recipeItems.Add(recipeitem);
        }
        // Token: 0x0600000F RID: 15 RVA: 0x00002850 File Offset: 0x00000A50
        public static Skill Init()
        {
            SL_AttackSkill sl_AttackSkill = new SL_AttackSkill
            {
                Name                   = "Retributive Smite",
                EffectBehaviour        = EffectBehaviours.NONE,
                Target_ItemID          = 8100260,
                New_ItemID             = 2502006,
                SLPackName             = "Templar",
                SubfolderName          = "Retributive Smite",
                Description            = "Completely block a physical attack, striking the attacker and dealing additional lightning damage.",
                CastType               = Character.SpellCastType.Counter,
                CastModifier           = Character.SpellCastModifier.Attack,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f,
                CastSheatheRequired    = 2,
                RequiredWeaponTypes    = new Weapon.WeaponType[]
                {
                    Weapon.WeaponType.Axe_1H,
                    Weapon.WeaponType.Axe_2H,
                    Weapon.WeaponType.Sword_1H,
                    Weapon.WeaponType.Sword_2H,
                    Weapon.WeaponType.Mace_1H,
                    Weapon.WeaponType.Mace_2H,
                    Weapon.WeaponType.Halberd_2H,
                    Weapon.WeaponType.Spear_2H
                },
                Cooldown    = 40f,
                StaminaCost = 8f,
                ManaCost    = 7f,
            };
            Skill        skill = (Skill)CustomItems.CreateCustomItem(sl_AttackSkill.Target_ItemID, sl_AttackSkill.New_ItemID, sl_AttackSkill.Name, sl_AttackSkill);
            WeaponDamage componentInChildren = skill.gameObject.GetComponentInChildren <WeaponDamage>();

            componentInChildren.WeaponDamageMult            = 1.5f;
            componentInChildren.WeaponDamageMultKDown       = -1f;
            componentInChildren.WeaponDurabilityLossPercent = 0f;
            componentInChildren.WeaponDurabilityLoss        = 1f;
            componentInChildren.OverrideDType = DamageType.Types.Count;
            componentInChildren.Damages       = new DamageType[]
            {
                new DamageType(DamageType.Types.Electric, 20f)
            };
            return(skill);
        }
        // Token: 0x06000060 RID: 96 RVA: 0x000041F4 File Offset: 0x000023F4
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Relentless",
                EffectBehaviour        = EffectBehaviours.DestroyEffects,
                Target_ItemID          = 8205030,
                New_ItemID             = 2502018,
                Description            = "Reduces armor movement penalties and gives bonus physical resistance equal to your armor protection.",
                IsUsable               = false,
                CastType               = Character.SpellCastType.NONE,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f,
            };

            return((Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill));
        }
Beispiel #22
0
        public override void ApplyToComponent <T>(T component)
        {
            var comp = component as RemoveStatusEffect;

            if (!string.IsNullOrEmpty(this.Status_Name))
            {
                this.SelectorValue = this.Status_Name;
            }
            else if (!string.IsNullOrEmpty(this.Status_Tag))
            {
                this.SelectorValue = this.Status_Tag;
            }

            comp.CleanseType = this.CleanseType;

            if (this.CleanseType == RemoveStatusEffect.RemoveTypes.StatusNameContains)
            {
                comp.StatusName = this.SelectorValue;
            }
            else if (this.CleanseType == RemoveStatusEffect.RemoveTypes.StatusSpecific)
            {
                var status = ResourcesPrefabManager.Instance.GetStatusEffectPrefab(this.SelectorValue);
                comp.StatusEffect = status;
            }
            else if (this.CleanseType == RemoveStatusEffect.RemoveTypes.StatusType)
            {
                var tag = CustomItems.GetTag(this.SelectorValue);
                if (tag != Tag.None)
                {
                    comp.StatusType = new TagSourceSelector(tag);
                }
            }
            else if (this.CleanseType == RemoveStatusEffect.RemoveTypes.StatusFamily)
            {
                var family = StatusEffectFamilyLibrary.Instance.GetStatusEffect(this.SelectorValue);
                if (family != null)
                {
                    comp.StatusFamily = new StatusEffectFamilySelector()
                    {
                        SelectorValue = family.UID,
                    };
                }
            }
        }
        // Token: 0x06000058 RID: 88 RVA: 0x00003EC0 File Offset: 0x000020C0
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Ruthless",
                EffectBehaviour        = EffectBehaviours.OverrideEffects,
                Target_ItemID          = 8205030,
                New_ItemID             = 2502022,
                SLPackName             = "Juggernaut",
                SubfolderName          = "Ruthless",
                Description            = string.Format("{0}: Armor stamina and movement penalties are reduced. Damaging enemies causes confusion among their allies, and may even cause them to stagger in fear.\n\n{1}: While enraged, weapon damage is increased and the attack stamina cost is reduced, but you can't be affected by boons other than Rage.", "Unyielding", "Vengeful"),
                CastType               = Character.SpellCastType.Rage,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = 0f
            };

            return((Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill));
        }
Beispiel #24
0
        // Token: 0x06000017 RID: 23 RVA: 0x00002F38 File Offset: 0x00001138
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Prayer of Healing",
                EffectBehaviour        = EffectBehaviours.OverrideEffects,
                Target_ItemID          = 8200180,
                New_ItemID             = 2502014,
                Description            = "WIP",
                CastType               = Character.SpellCastType.CallElements,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f,
                CastSheatheRequired    = 2,
                EffectTransforms       = new SL_EffectTransform[]
                {
                    new SL_EffectTransform
                    {
                        TransformName = "ActivationEffects",
                        Effects       = new SL_Effect[0]
                    },
                    new SL_EffectTransform
                    {
                        TransformName = "Effects",
                        Effects       = new SL_Effect[0]
                    }
                },
                Cooldown    = 30f,
                ManaCost    = 600f,
                StaminaCost = 0f
            };
            Skill      skill      = (Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill);
            Transform  transform  = skill.transform.Find("Effects");
            HealingAoE healingAoE = transform.gameObject.AddComponent <HealingAoE>();

            healingAoE.RestoredHealth    = 30f;
            healingAoE.Range             = 30f;
            healingAoE.CanRevive         = true;
            healingAoE.AmplificationType = DamageType.Types.Electric;
            UnityEngine.Object.Destroy(skill.gameObject.GetComponentInChildren <AddStatusEffect>());
            return(skill);
        }
Beispiel #25
0
        // Token: 0x06000008 RID: 8 RVA: 0x00002424 File Offset: 0x00000624
        public static Item MakeRecipes()
        {
            string text = "com.ehaugw.runicscrolls." + "RunicScroll".ToLower() + "recipe";

            new SL_Recipe
            {
                StationType = Recipe.CraftingType.Alchemy,
                Results     = new List <SL_Recipe.ItemQty>
                {
                    new SL_Recipe.ItemQty
                    {
                        Quantity = 1,
                        ItemID   = 2501017
                    }
                },
                Ingredients = new List <SL_Recipe.Ingredient>
                {
                    new SL_Recipe.Ingredient
                    {
                        Type = RecipeIngredient.ActionTypes.AddSpecificIngredient,
                        Ingredient_ItemID = 6400130
                    },
                    new SL_Recipe.Ingredient
                    {
                        Type = RecipeIngredient.ActionTypes.AddSpecificIngredient,
                        Ingredient_ItemID = 6500090
                    }
                },
                UID = text
            }.ApplyRecipe();

            SL_RecipeItem sl_RecipeItem = new SL_RecipeItem
            {
                Name            = "Alchemy: Runic Scroll",
                Target_ItemID   = 5700076,
                New_ItemID      = 2501030,
                EffectBehaviour = EffectBehaviours.OverrideEffects,
                RecipeUID       = text
            };

            return(CustomItems.CreateCustomItem(sl_RecipeItem.Target_ItemID, sl_RecipeItem.New_ItemID, sl_RecipeItem.Name, sl_RecipeItem));
        }
        // Token: 0x0600005E RID: 94 RVA: 0x0000412C File Offset: 0x0000232C
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Unyielding",
                EffectBehaviour        = EffectBehaviours.DestroyEffects,
                Target_ItemID          = 8205030,
                New_ItemID             = 2502019,
                SLPackName             = "Juggernaut",
                SubfolderName          = "Unyielding",
                Description            = "Enables you to block incoming attacks sooner after attacking.\n\nBe aware that learning this skill has impact on most other Juggernaut skills!",
                IsUsable               = false,
                CastType               = Character.SpellCastType.NONE,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f,
            };

            return((Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill));
        }
Beispiel #27
0
        // Token: 0x0600005C RID: 92 RVA: 0x00004064 File Offset: 0x00002264
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Vengeful",
                EffectBehaviour        = EffectBehaviours.DestroyEffects,
                Target_ItemID          = 8205030,
                New_ItemID             = 2502020,
                SLPackName             = "Juggernaut",
                SubfolderName          = "Vengeful",
                Description            = "Being damaged causes rage to build up.\n\nBe aware that learning this skill has impact on most other Juggernaut skills!",
                IsUsable               = false,
                CastType               = Character.SpellCastType.NONE,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f
            };

            return((Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill));
        }
Beispiel #28
0
        // Token: 0x0600005A RID: 90 RVA: 0x00003F90 File Offset: 0x00002190
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Fortified",
                EffectBehaviour        = EffectBehaviours.DestroyEffects,
                Target_ItemID          = 8205030,
                New_ItemID             = 2502021,
                SLPackName             = "Juggernaut",
                SubfolderName          = "Fortified",
                Description            = "Gives resistance bonuses equal to your armor protection.",
                IsUsable               = false,
                CastType               = Character.SpellCastType.NONE,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f
            };

            return((Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill));
        }
Beispiel #29
0
        // Token: 0x06000050 RID: 80 RVA: 0x0000396C File Offset: 0x00001B6C
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Bastard",
                EffectBehaviour        = EffectBehaviours.DestroyEffects,
                Target_ItemID          = 8205030,
                New_ItemID             = 2502015,
                SLPackName             = "Juggernaut",
                SubfolderName          = "Bastard",
                Description            = "Increases the speed and damage bonuses from two-handing a bastard sword.",
                IsUsable               = false,
                CastType               = Character.SpellCastType.NONE,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f
            };

            return((Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill));
        }
Beispiel #30
0
        // Token: 0x06000048 RID: 72 RVA: 0x00004BE4 File Offset: 0x00002DE4
        public static Skill Init()
        {
            SL_Skill sl_Skill = new SL_Skill
            {
                Name                   = "Prayer",
                EffectBehaviour        = EffectBehaviours.DestroyEffects,
                Target_ItemID          = 8100120,
                New_ItemID             = 2502012,
                SLPackName             = "Templar",
                SubfolderName          = "Prayer",
                Description            = "Pray to Elatt.\n\nDo not expect him to reply though!",
                CastType               = Character.SpellCastType.EnterInnBed,
                CastModifier           = Character.SpellCastModifier.Immobilized,
                CastLocomotionEnabled  = false,
                MobileCastMovementMult = -1f,
                CastSheatheRequired    = 1,
                EffectTransforms       = new SL_EffectTransform[]
                {
                    new SL_EffectTransform
                    {
                        TransformName = "ActivationEffects",
                        Effects       = new SL_Effect[]
                        {
                            new SL_AddStatusEffectBuildUp
                            {
                                StatusEffect = "Prayer",
                                Buildup      = 100f,
                                Delay        = 0f
                            }
                        }
                    }
                },
                Cooldown    = 1f,
                StaminaCost = 0f,
                ManaCost    = 0f
            };
            Skill skill = (Skill)CustomItems.CreateCustomItem(sl_Skill.Target_ItemID, sl_Skill.New_ItemID, sl_Skill.Name, sl_Skill);

            EmptyOffHandCondition.AddToSkill(skill, true, true);
            return(skill);
        }