Esempio n. 1
0
        public static void BeforePacksLoaded()
        {
            ManaBowTag = CustomTags.CreateTag(ManaBowTagString);

            if (At.GetTypeByName("RaidMode.CharacterEquipment_Update") is Type raidType)
            {
                var raidPatch = raidType.GetMethod("Postfix", BindingFlags.Public | BindingFlags.Static);
                ManaBowPlugin.harmony.Patch(raidPatch, prefix: new HarmonyMethod(typeof(ManaBowManager), nameof(FixRaidModePatch)));
            }
        }
        public void CreateTag()
        {
            if (CustomTags.GetTag(this.TagName, false) != Tag.None)
            {
                SL.LogWarning($"Creating Tag '{this.TagName}', but it already exists!");
                return;
            }
            ;

            var tag = CustomTags.CreateTag(TagName);

            if (!string.IsNullOrEmpty(this.OptionalTagUID))
            {
                At.SetField(tag, "m_uid", new UID(this.OptionalTagUID));
            }
        }
Esempio n. 3
0
 private void SL_BeforePacksLoaded()
 {
     CustomTags.CreateTag("Ring");
 }
Esempio n. 4
0
        private void SL_BeforePacksLoaded()
        {
            CustomTags.CreateTag("Ring");

            var ringItem = new SL_Equipment
            {
                Target_ItemID = 5100500,
                New_ItemID    = TSAR_RING_ITEMID,
                Name          = "Tsar Ring",
                Description   = "An ornately-decorated ring, jeweled with an impressive Tsar.\n\nSome say this ring was summoned by the Creator of Aurai itself.",
                IKType        = Equipment.IKMode.None,
                EquipSlot     = EquipmentSlot.EquipmentSlotIDs.LeftHand,
                Tags          = new List <string> {
                    "Ring"
                },
                StatsHolder = new SL_EquipmentStats
                {
                    BaseValue         = 999,
                    MaxDurability     = -1,
                    RawWeight         = 0.1f,
                    Mana_Use_Modifier = -5f
                },
                EffectBehaviour = EffectBehaviours.DestroyEffects,

                SLPackName             = "TsarRing",
                SubfolderName          = "TsarRing",
                AssetBundleName        = "tsarring",
                ItemVisuals_PrefabName = "mdl_itm_Tsar_Ring_v",

                ItemVisuals_PositionOffset = new Vector3(0.03f, 0.09f, 0.05f),
                ItemVisuals_RotationOffset = new Vector3(180f, 10f, -90f)
            };

            CustomItems.CreateCustomItem(ringItem);

            var ringSkill = new SL_AttackSkill
            {
                Target_ItemID      = 8300251,
                New_ItemID         = 8500999,
                Name               = "Ring Laser",
                Description        = "Requires: Tsar Ring\n\nInvoke the power of the ring, disintegrating anything in it's path.",
                RequiredWeaponTags = new List <string> {
                    "Ring"
                },
                Cooldown              = 10,
                ManaCost              = 10,
                StaminaCost           = 0,
                DurabilityCost        = 0,
                DurabilityCostPercent = 0,
                CastType              = Character.SpellCastType.Flamethrower,
                EffectBehaviour       = EffectBehaviours.OverrideEffects,
                StatsHolder           = null,

                SLPackName    = "TsarRing",
                SubfolderName = "RingLaser",

                EffectTransforms = new List <SL_EffectTransform>
                {
                    new SL_EffectTransform
                    {
                        TransformName = "ActivationEffects",
                        Effects       = new List <SL_Effect>
                        {
                            new SL_PlaySoundEffect
                            {
                                SyncType = Effect.SyncTypes.OwnerSync,
                                Sounds   = new List <GlobalAudioManager.Sounds>
                                {
                                    GlobalAudioManager.Sounds.CS_Mantis_ManaBlast_Whoosh1
                                }
                            }
                        }
                    },
                    new SL_EffectTransform
                    {
                        TransformName = "Effects",
                        Effects       = new List <SL_Effect>
                        {
                            new SL_ShootConeBlast
                            {
                                BaseBlast                 = SL_ShootBlast.BlastPrefabs.EliteImmaculateLaser,
                                CastPosition              = Shooter.CastPositionType.Transform,
                                NoAim                     = true,
                                TargetType                = Shooter.TargetTypes.Enemies,
                                TransformName             = "ShooterTransform",
                                Radius                    = 0.8f,
                                RefreshTime               = 0.1f,
                                BlastLifespan             = 1.0f,
                                InstantiatedAmount        = 1,
                                Interruptible             = true,
                                MaxHitTargetCount         = -1,
                                HitOnShoot                = true,
                                NoTargetForwardMultiplier = 5.0f,
                                ImpactSoundMaterial       = EquipmentSoundMaterials.Fire,
                                EffectBehaviour           = EffectBehaviours.OverrideEffects,
                                BlastEffects              = new List <SL_EffectTransform>
                                {
                                    new SL_EffectTransform
                                    {
                                        TransformName = "Effects",
                                        Effects       = new List <SL_Effect>
                                        {
                                            new SL_PunctualDamage
                                            {
                                                Damage = new List <SL_Damage>
                                                {
                                                    new SL_Damage
                                                    {
                                                        Type   = DamageType.Types.Ethereal,
                                                        Damage = 5.0f,
                                                    }
                                                },
                                                Knockback    = 2f,
                                                HitInventory = true
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
            };

            CustomItems.CreateCustomItem(ringSkill);
        }
 public static void SetupTag()
 {
     ManaBowTag = CustomTags.CreateTag(ManaBowTagString);
 }