Exemplo n.º 1
0
        public override void SetupAttributes()
        {
            if (ItemBodyModelPrefab == null)
            {
                ItemBodyModelPrefab = MainAssets.LoadAsset <GameObject>("HolyInsuranceTracker.prefab");
                ItemFollowerPrefab  = modelResource;
                displayRules        = GenerateItemDisplayRules();
            }
            base.SetupAttributes();

            //T1 Coverage
            InsuranceDictionary.Add("BeetleMonster", new Range(0, 1));
            InsuranceDictionary.Add("BeetleGuardMonster", new Range(0, 1));
            //T2 Coverage
            InsuranceDictionary.Add("LemurianMonster", new Range(1, 2));
            InsuranceDictionary.Add("LemurianBruiserMonster", new Range(1, 2));
            //T3 Coverage
            InsuranceDictionary.Add("Wisp1Monster", new Range(2, 3));
            InsuranceDictionary.Add("GreaterWispMonster", new Range(2, 3));
            //T4 Coverage
            InsuranceDictionary.Add("MagmaWorm", new Range(3, 4));
            //T5 Coverage
            InsuranceDictionary.Add("BrotherMonster", new Range(4, 5));
            //T6 Coverage (Not an actual tier, just an catch-all for money past T5)
            InsuranceDictionary.Add("FullyCovered", new Range(5, uint.MaxValue));
        }
Exemplo n.º 2
0
        public void CreateProjectiles()
        {
            //needs to be declared first
            GameObject sporeGrenadeDotZonePrefab = Resources.Load <GameObject>("prefabs/projectiles/SporeGrenadeProjectileDotZone");

            MolotovDotZonePrefab = sporeGrenadeDotZonePrefab.InstantiateClone("Bulletstorm_MolotovDotZone", true);
            MolotovDotZonePrefab.GetComponent <ProjectileDamage>().damageType = DamageType.IgniteOnHit;
            ProjectileDotZone projectileDotZone = MolotovDotZonePrefab.GetComponent <ProjectileDotZone>();

            projectileDotZone.damageCoefficient = PercentDamagePerTick;
            projectileDotZone.resetFrequency    = Mathf.Clamp(FrequencyOfTicks, 0f, 60f);
            projectileDotZone.lifetime          = DurationAoE;
            //projectileDotZone.impactEffect = GlassBreakEffect;

            GameObject sporeGrenadePrefab = Resources.Load <GameObject>("prefabs/projectiles/SporeGrenadeProjectile");

            MolotovPrefab = sporeGrenadePrefab.InstantiateClone("Bulletstorm_Molotov", true);
            MolotovPrefab.GetComponent <ProjectileDamage>().damageColorIndex = DamageColorIndex.Item;

            var PIE = MolotovPrefab.GetComponent <ProjectileImpactExplosion>();

            if (DurationAoE > 0)
            {
                PIE.childrenProjectilePrefab = MolotovDotZonePrefab;
            }
            else
            {
                Object.Destroy(PIE);
            }
            MolotovPrefab.GetComponent <ProjectileSimple>().desiredForwardSpeed = 35; //50

            ApplyTorqueOnStart applyTorque = MolotovPrefab.AddComponent <ApplyTorqueOnStart>();

            applyTorque.randomize   = true;
            applyTorque.localTorque = new Vector3(400f, 10f, 400f);

            GameObject model = MainAssets.LoadAsset <GameObject>(ProjectileModelPath);

            model.AddComponent <NetworkIdentity>();
            model.AddComponent <ProjectileGhostController>();
            model.transform.localScale = new Vector3(0.25f, 0.25f, 0.25f);

            var controller = MolotovPrefab.GetComponent <ProjectileController>();

            controller.ghostPrefab = model;

            ProjectileAPI.Add(MolotovPrefab);
            ProjectileAPI.Add(MolotovDotZonePrefab);

            if (MolotovPrefab)
            {
                PrefabAPI.RegisterNetworkPrefab(MolotovPrefab);
            }
            if (MolotovDotZonePrefab)
            {
                PrefabAPI.RegisterNetworkPrefab(MolotovDotZonePrefab);
            }
        }
Exemplo n.º 3
0
        public static void SetupMortarProjectile()
        {
            GameObject paladinRocket = Resources.Load <GameObject>("prefabs/projectiles/PaladinRocket");

            mortarPrefab = paladinRocket.InstantiateClone("MortarProjectile");
            mortarPrefab.AddComponent <MortarGravity>();
            var model = MainAssets.LoadAsset <GameObject>("MortarMissile.prefab");

            model.AddComponent <NetworkIdentity>();
            model.AddComponent <RoR2.Projectile.ProjectileGhostController>();
            var controller = mortarPrefab.GetComponent <RoR2.Projectile.ProjectileController>();

            controller.ghostPrefab = model;
            ProjectileAPI.Add(mortarPrefab);
        }
Exemplo n.º 4
0
        public override void SetupAttributes()
        {
            if (ItemBodyModelPrefab == null)
            {
                ItemBodyModelPrefab = modelResource;
                displayRules        = GenerateItemDisplayRules();
            }

            base.SetupAttributes();

            BFBuff            = ScriptableObject.CreateInstance <BuffDef>();
            BFBuff.name       = "SupplyDrop BF Buff";
            BFBuff.canStack   = true;
            BFBuff.isDebuff   = false;
            BFBuff.iconSprite = MainAssets.LoadAsset <Sprite>("BoneBuffIcon");
            BuffAPI.Add(new CustomBuff(BFBuff));
        }
Exemplo n.º 5
0
        public override void SetupAttributes()
        {
            if (ItemBodyModelPrefab == null)
            {
                ItemBodyModelPrefab = modelResource;
                var meshes = ItemBodyModelPrefab.GetComponentsInChildren <MeshRenderer>();
                meshes[1].gameObject.AddComponent <Spin>();
                displayRules = GenerateItemDisplayRules();
            }

            base.SetupAttributes();

            ShieldGateCooldown            = ScriptableObject.CreateInstance <BuffDef>();
            ShieldGateCooldown.name       = "SupplyDrop QSS Cooldown Debuff";
            ShieldGateCooldown.canStack   = false;
            ShieldGateCooldown.isDebuff   = true;
            ShieldGateCooldown.iconSprite = MainAssets.LoadAsset <Sprite>("ShieldGateCooldownIcon");
            BuffAPI.Add(new CustomBuff(ShieldGateCooldown));
        }
Exemplo n.º 6
0
        //static internal BuffDef ThalliumBuff;



        private void CreateBuff()
        {
            ThalliumBuff      = ScriptableObject.CreateInstance <BuffDef>();
            ThalliumBuff.name = "Thallium Poisoning";
            //ThalliumBuff.buffColor = Color.blue;
            ThalliumBuff.canStack   = false;
            ThalliumBuff.isDebuff   = true;
            ThalliumBuff.iconSprite = MainAssets.LoadAsset <Sprite>("Thallium.png");



            CustomBuff thalliumBuff = new CustomBuff(ThalliumBuff);

            BuffAPI.Add(new CustomBuff(ThalliumBuff));

            DotController.DotDef thalliumDotDef = new DotController.DotDef
            {
                interval          = 0.5f,
                damageCoefficient = 1,
                damageColorIndex  = DamageColorIndex.DeathMark,
                associatedBuff    = ThalliumBuff
            };
            poisonDot = DotAPI.RegisterDotDef(thalliumDotDef, (dotController, dotStack) =>
            {
                CharacterBody attackerBody = dotStack.attackerObject.GetComponent <CharacterBody>();
                if (attackerBody)
                {
                    float damageMultiplier = dmgCoefficient + dmgStack * (GetCount(attackerBody) - 1);
                    float poisonDamage     = 0f;
                    if (dotController.victimBody)
                    {
                        poisonDamage += dotController.victimBody.damage;
                    }
                    dotStack.damage = poisonDamage * damageMultiplier;
                }
            });
        }
Exemplo n.º 7
0
        public override void SetupAttributes()
        {
            if (ItemBodyModelPrefab == null)
            {
                ItemBodyModelPrefab = modelResource;
                displayRules        = GenerateItemDisplayRules();
            }

            base.SetupAttributes();

            SecondWindBuff            = ScriptableObject.CreateInstance <BuffDef>();
            SecondWindBuff.name       = "SupplyDrop Tie Speed Buff";
            SecondWindBuff.canStack   = false;
            SecondWindBuff.isDebuff   = false;
            SecondWindBuff.iconSprite = MainAssets.LoadAsset <Sprite>("SecondWindBuffIcon");
            BuffAPI.Add(new CustomBuff(SecondWindBuff));

            WindedDebuff            = ScriptableObject.CreateInstance <BuffDef>();
            WindedDebuff.name       = "SupplyDrop Tie Cooldown Debuff";
            WindedDebuff.canStack   = false;
            WindedDebuff.isDebuff   = true;
            WindedDebuff.iconSprite = MainAssets.LoadAsset <Sprite>("WindedDebuffIcon.png");
            BuffAPI.Add(new CustomBuff(WindedDebuff));
        }
Exemplo n.º 8
0
 public HardenedBoneFragments()
 {
     modelResource = MainAssets.LoadAsset <GameObject>("Bone.prefab");
     iconResource  = MainAssets.LoadAsset <Sprite>("BoneIcon");
 }
Exemplo n.º 9
0
 public PlagueMask()
 {
     modelResource = MainAssets.LoadAsset <GameObject>("PlagueMask.prefab");
     iconResource  = MainAssets.LoadAsset <Sprite>("PlagueMaskIcon");
 }
 /// <summary>
 /// An example targeting indicator implementation. We clone the woodsprite's indicator, but we edit it to our liking. We'll use this in our activate equipment.
 /// We shouldn't need to network this as this only shows for the player with the Equipment.
 /// </summary>
 private void CreateTargetingIndicator()
 {
     TargetingIndicatorPrefabBase = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("Prefabs/WoodSpriteIndicator"), "ExampleIndicator", false);
     TargetingIndicatorPrefabBase.GetComponentInChildren <SpriteRenderer>().sprite             = MainAssets.LoadAsset <Sprite>("ExampleReticuleIcon.png");
     TargetingIndicatorPrefabBase.GetComponentInChildren <SpriteRenderer>().color              = Color.white;
     TargetingIndicatorPrefabBase.GetComponentInChildren <SpriteRenderer>().transform.rotation = Quaternion.identity;
     TargetingIndicatorPrefabBase.GetComponentInChildren <TMPro.TextMeshPro>().color           = new Color(0.423f, 1, 0.749f);
 }
Exemplo n.º 11
0
 public QSGen()
 {
     modelResource = MainAssets.LoadAsset <GameObject>("QSGen.prefab");
     iconResource  = MainAssets.LoadAsset <Sprite>("QSGenIcon");
 }
Exemplo n.º 12
0
 public ShellPlating()
 {
     modelResource = MainAssets.LoadAsset <GameObject>("Shell.prefab");
     iconResource  = MainAssets.LoadAsset <Sprite>("ShellIcon");
 }
Exemplo n.º 13
0
        public override void SetupAttributes()
        {
            if (ItemBodyModelPrefab == null)
            {
                ItemBodyModelPrefab = MainAssets.LoadAsset <GameObject>("BloodBookTracker.prefab");
                ItemFollowerPrefab  = modelResource;
                displayRules        = GenerateItemDisplayRules();
            }
            base.SetupAttributes();

            PatheticBloodBuff            = ScriptableObject.CreateInstance <BuffDef>();
            PatheticBloodBuff.name       = "SupplyDrop Blood Book Buff 1";
            PatheticBloodBuff.canStack   = false;
            PatheticBloodBuff.isDebuff   = false;
            PatheticBloodBuff.iconSprite = MainAssets.LoadAsset <Sprite>("BloodBookBuffIcon1");
            BuffAPI.Add(new CustomBuff(PatheticBloodBuff));

            WeakBloodBuff            = ScriptableObject.CreateInstance <BuffDef>();
            WeakBloodBuff.name       = "SupplyDrop Blood Book Buff 2";
            WeakBloodBuff.canStack   = false;
            WeakBloodBuff.isDebuff   = false;
            WeakBloodBuff.iconSprite = MainAssets.LoadAsset <Sprite>("BloodBookBuffIcon2");
            BuffAPI.Add(new CustomBuff(WeakBloodBuff));

            AverageBloodBuff            = ScriptableObject.CreateInstance <BuffDef>();
            AverageBloodBuff.name       = "SupplyDrop Blood Book Buff 3";
            AverageBloodBuff.canStack   = false;
            AverageBloodBuff.isDebuff   = false;
            AverageBloodBuff.iconSprite = MainAssets.LoadAsset <Sprite>("BloodBookBuffIcon3");
            BuffAPI.Add(new CustomBuff(AverageBloodBuff));

            StrongBloodBuff            = ScriptableObject.CreateInstance <BuffDef>();
            StrongBloodBuff.name       = "SupplyDrop Blood Book Buff 4";
            StrongBloodBuff.canStack   = false;
            StrongBloodBuff.isDebuff   = false;
            StrongBloodBuff.iconSprite = MainAssets.LoadAsset <Sprite>("BloodBookBuffIcon4");
            BuffAPI.Add(new CustomBuff(StrongBloodBuff));

            InsaneBloodBuff            = ScriptableObject.CreateInstance <BuffDef>();
            InsaneBloodBuff.name       = "SupplyDrop Blood Book Buff 5";
            InsaneBloodBuff.canStack   = false;
            InsaneBloodBuff.isDebuff   = false;
            InsaneBloodBuff.iconSprite = MainAssets.LoadAsset <Sprite>("BloodBookBuffIcon5");
            BuffAPI.Add(new CustomBuff(InsaneBloodBuff));

            DevotedBloodBuff            = ScriptableObject.CreateInstance <BuffDef>();
            DevotedBloodBuff.name       = "SupplyDrop Blood Book Buff 6";
            DevotedBloodBuff.canStack   = false;
            DevotedBloodBuff.isDebuff   = false;
            DevotedBloodBuff.iconSprite = MainAssets.LoadAsset <Sprite>("BloodBookBuffIcon6");
            BuffAPI.Add(new CustomBuff(DevotedBloodBuff));

            ranges = new Range[]
            {
                new Range(0, 10, PatheticBloodBuff, 4),
                new Range(10, 20, WeakBloodBuff, 6),
                new Range(20, 30, AverageBloodBuff, 8),
                new Range(30, 40, StrongBloodBuff, 10),
                new Range(40, 50, InsaneBloodBuff, 12),
                new Range(50, double.PositiveInfinity, DevotedBloodBuff, 14)
            };
        }
Exemplo n.º 14
0
 public ElectroPlankton()
 {
     modelResource = MainAssets.LoadAsset <GameObject>("Plankton.prefab");
     iconResource  = MainAssets.LoadAsset <Sprite>("PlanktonIcon");
 }
Exemplo n.º 15
0
 public UnassumingTie()
 {
     modelResource = MainAssets.LoadAsset <GameObject>("Tie.prefab");
     iconResource  = MainAssets.LoadAsset <Sprite>("TieIcon");
 }
Exemplo n.º 16
0
 public SalvagedWires()
 {
     modelResource = MainAssets.LoadAsset <GameObject>("WireBundle.prefab");
     iconResource  = MainAssets.LoadAsset <Sprite>("SalvagedWiresIcon");
 }
Exemplo n.º 17
0
 public BloodBook()
 {
     modelResource = MainAssets.LoadAsset <GameObject>("BloodBook.prefab");
     iconResource  = MainAssets.LoadAsset <Sprite>("BloodBookIcon");
 }
Exemplo n.º 18
0
        //Navigation customNav = new Navigation();

        public HolyInsurance()
        {
            //Don't forget to change these, currently using test model/icon
            modelResource = MainAssets.LoadAsset <GameObject>("TestModel.prefab");
            iconResource  = MainAssets.LoadAsset <Sprite>("TestIcon");
        }
Exemplo n.º 19
0
 public NumbingBerries()
 {
     modelResource = MainAssets.LoadAsset <GameObject>("Berry.prefab");
     iconResource  = MainAssets.LoadAsset <Sprite>("BerryIcon");
 }