// Token: 0x06000030 RID: 48 RVA: 0x00004188 File Offset: 0x00002388
        public static StatusEffect MakeBurstOfDivinityPrefab()
        {
            StatusEffect statusEffect = TinyEffectManager.MakeStatusEffectPrefab("Burst of Divinity", "Burst of Divinity", "Reduces the mana cost of spells, but stacks are expended when a spell is casted.", 30f, -1f, StatusEffectFamily.StackBehaviors.StackAll, "Mana Ratio Recovery 3", false, null, null, "com.ehaugw.templarclass");

            statusEffect.OverrideIcon = CustomTextures.CreateSprite(SL.Packs["Templar"].Texture2D["burstOfDivinityIcon"], 0);
            return(statusEffect);
        }
        // Token: 0x0600002F RID: 47 RVA: 0x00004114 File Offset: 0x00002314
        public static StatusEffect MakeSurgeOfDivinityPrefab()
        {
            StatusEffect statusEffect = TinyEffectManager.MakeStatusEffectPrefab("Surge of Divinity", "Surge of Divinity", "Greatly increases Burst of Divinity buildup.", 90f, -1f, StatusEffectFamily.StackBehaviors.Override, "Mana Ratio Recovery 3", false, null, null, "com.ehaugw.templarclass");

            statusEffect.OverrideIcon = CustomTextures.CreateSprite(SL.Packs["Templar"].Texture2D["surgeOfDivinityIcon"], 0);
            return(statusEffect);
        }
        // Token: 0x06000031 RID: 49 RVA: 0x000041FC File Offset: 0x000023FC
        public static StatusEffect MakeRadiatingPrefab()
        {
            StatusEffect    statusEffect          = TinyEffectManager.MakeStatusEffectPrefab("Radiating", "Radiating", "Damages you and your nearby allies.", 15f, 1f, StatusEffectFamily.StackBehaviors.Override, "Doom", true, 134.ToString(), null, "com.ehaugw.templarclass");
            EffectSignature statusEffectSignature = statusEffect.StatusEffectSignature;
            Radiating       radiating             = TinyEffectManager.MakeFreshObject("Effects", true, true, statusEffectSignature.transform).AddComponent <Radiating>();

            radiating.UseOnce             = false;
            statusEffectSignature.Effects = new List <Effect>
            {
                radiating
            };
            statusEffect.OverrideIcon = CustomTextures.CreateSprite(SL.Packs["Templar"].Texture2D["radiatingIcon"], 0);
            return(statusEffect);
        }
示例#4
0
        private static Item NewHellstone(int baseItemID, int newItemId, String name, String desc)
        {
            int totalWeight = CurrencyEffects.ALL[newItemId].Sum(x => x.GetWeight());

            desc += "\n";

            CurrencyEffects.ALL[newItemId].ForEach(x =>
            {
                float chance = (float)x.GetWeight() / (float)totalWeight * 100;

                desc += "\n" + chance + "% to: " + x.Get().GetDescription() + "\n";
            });

            desc += "\n Use when your desired gear is in your pouch (and no other gear there).";

            if (HELLSTONE_OF_ARCANA_ID != newItemId) // this hellstone is used on non magical items, unlike others
            {
                desc += "\n Only works on Magical items.";
            }
            else
            {
                desc += "\n Only works on Non Magical items.";
            }

            var template = new SL_Item()
            {
                Name          = name,
                Description   = desc,
                Target_ItemID = baseItemID,
                New_ItemID    = newItemId,
                Tags          = new string[]

                {
                    TagSourceManager.Valuable.TagName
                },
                IsUsable = true
            };

            var item = CustomItems.CreateCustomItem(template);

            var effects = item.transform.Find("Effects");

            if (effects == null)
            {
                // If the item doesn't have "Effects", just add it.
                effects = new GameObject("Effects").transform;
                effects.transform.parent = item.transform;
                // If you didn't use CreateCustomItem, you'd need to call DontDestroyOnLoad(gaberries.gameObject);
            }
            CurrencyEffectComponent eff = effects.gameObject.AddComponent <CurrencyEffectComponent>();

            UnityEngine.Object.DontDestroyOnLoad(eff);

            var png    = CustomTextures.LoadTexture(@"BepInEx\plugins\Grindward\Icons\" + newItemId + ".png", false, false);
            var sprite = CustomTextures.CreateSprite(png, CustomTextures.SpriteBorderTypes.ItemIcon);

            CustomItemVisuals.SetSpriteLink(item, sprite);

            At.SetValue(sprite, typeof(Item), item, "m_itemIcon");

            return(item);
        }