Пример #1
0
        protected override void UnloadBehavior()
        {
            On.RoR2.CharacterBody.OnInventoryChanged           -= On_CBOnInventoryChanged;
            On.RoR2.CharacterMaster.GetDeployableSameSlotLimit -= On_CMGetDeployableSameSlotLimit;

            foreach (var cm in AliveList())
            {
                if (!cm.hasBody)
                {
                    continue;
                }
                HandleScepterSkill(cm.GetBody(), true);
            }

            ArtificerFlamethrower2.UnloadBehavior();
            ArtificerFlyUp2.UnloadBehavior();
            CommandoBarrage2.UnloadBehavior();
            CommandoGrenade2.UnloadBehavior();
            CrocoDisease2.UnloadBehavior();
            HuntressBallista2.UnloadBehavior();
            HuntressRain2.UnloadBehavior();
            LoaderChargeFist2.UnloadBehavior();
            LoaderChargeZapFist2.UnloadBehavior();
            MercEvis2.UnloadBehavior();
            MercEvisProjectile2.UnloadBehavior();
            ToolbotDash2.UnloadBehavior();
            TreebotFlower2_2.UnloadBehavior();
        }
Пример #2
0
        public Scepter()
        {
            ConfigEntryChanged += (sender, args) => {
                switch (args.target.boundProperty.Name)
                {
                case nameof(engiTurretAdjustCooldown):
                    EngiTurret2.myDef.baseRechargeInterval = EngiTurret2.oldDef.baseRechargeInterval * (((bool)args.newValue) ? 2f / 3f : 1f);
                    GlobalUpdateSkillDef(EngiTurret2.myDef);
                    break;

                case nameof(engiWalkerAdjustCooldown):
                    EngiWalker2.myDef.baseRechargeInterval = EngiWalker2.oldDef.baseRechargeInterval / (((bool)args.newValue) ? 2f : 1f);
                    GlobalUpdateSkillDef(EngiWalker2.myDef);
                    break;

                default:
                    break;
                }
            };

            onAttrib += (tokenIdent, namePrefix) => {
                //Language.SetCurrentLanguage(Language.currentLanguage);

                ArtificerFlamethrower2.SetupAttributes();
                ArtificerFlyUp2.SetupAttributes();
                CommandoBarrage2.SetupAttributes();
                CommandoGrenade2.SetupAttributes();
                CrocoDisease2.SetupAttributes();
                EngiTurret2.SetupAttributes();
                EngiWalker2.SetupAttributes();
                HuntressBallista2.SetupAttributes();
                HuntressRain2.SetupAttributes();
                LoaderChargeFist2.SetupAttributes();
                LoaderChargeZapFist2.SetupAttributes();
                MercEvis2.SetupAttributes();
                MercEvisProjectile2.SetupAttributes();
                ToolbotDash2.SetupAttributes();
                TreebotFlower2_2.SetupAttributes();

                RegisterScepterSkill(ArtificerFlamethrower2.myDef, "MageBody", SkillSlot.Special, 0);
                RegisterScepterSkill(ArtificerFlyUp2.myDef, "MageBody", SkillSlot.Special, 1);
                RegisterScepterSkill(CommandoBarrage2.myDef, "CommandoBody", SkillSlot.Special, 0);
                RegisterScepterSkill(CommandoGrenade2.myDef, "CommandoBody", SkillSlot.Special, 1);
                RegisterScepterSkill(CrocoDisease2.myDef, "CrocoBody", SkillSlot.Special, 0);
                RegisterScepterSkill(EngiTurret2.myDef, "EngiBody", SkillSlot.Special, 0);
                RegisterScepterSkill(EngiWalker2.myDef, "EngiBody", SkillSlot.Special, 1);
                RegisterScepterSkill(HuntressRain2.myDef, "HuntressBody", SkillSlot.Special, 0);
                RegisterScepterSkill(HuntressBallista2.myDef, "HuntressBody", SkillSlot.Special, 1);
                RegisterScepterSkill(LoaderChargeFist2.myDef, "LoaderBody", SkillSlot.Utility, 0);
                RegisterScepterSkill(LoaderChargeZapFist2.myDef, "LoaderBody", SkillSlot.Utility, 1);
                RegisterScepterSkill(MercEvis2.myDef, "MercBody", SkillSlot.Special, 0);
                RegisterScepterSkill(MercEvisProjectile2.myDef, "MercBody", SkillSlot.Special, 1);
                RegisterScepterSkill(ToolbotDash2.myDef, "ToolbotBody", SkillSlot.Utility, 0);
                RegisterScepterSkill(TreebotFlower2_2.myDef, "TreebotBody", SkillSlot.Special, 0);
            };
        }
Пример #3
0
        protected override void LoadBehavior()
        {
            On.RoR2.CharacterBody.OnInventoryChanged           += On_CBOnInventoryChanged;
            On.RoR2.CharacterMaster.GetDeployableSameSlotLimit += On_CMGetDeployableSameSlotLimit;

            ArtificerFlamethrower2.LoadBehavior();
            ArtificerFlyUp2.LoadBehavior();
            CommandoBarrage2.LoadBehavior();
            CommandoGrenade2.LoadBehavior();
            CrocoDisease2.LoadBehavior();
            HuntressBallista2.LoadBehavior();
            HuntressRain2.LoadBehavior();
            LoaderChargeFist2.LoadBehavior();
            LoaderChargeZapFist2.LoadBehavior();
            MercEvis2.LoadBehavior();
            MercEvisProjectile2.LoadBehavior();
            ToolbotDash2.LoadBehavior();
            TreebotFlower2_2.LoadBehavior();
        }