public void toBeContinuedTest()
        {
            var t = new ToBeContinued();

            Assert.AreEqual("[1]", Util.ArrayToString(t.toBeContinued(new[] { 1, 1 })));
            Assert.AreEqual("[2]", Util.ArrayToString(t.toBeContinued(new[] { 2, 1 })));
            Assert.AreEqual("[]", Util.ArrayToString(t.toBeContinued(new[] { 0, 0 })));
            Assert.AreEqual("[]", Util.ArrayToString(t.toBeContinued(new[] { 1, 0 })));
            Assert.AreEqual("[0]", Util.ArrayToString(t.toBeContinued(new[] { 0, 1 })));
            Assert.AreEqual("[1,2]", Util.ArrayToString(t.toBeContinued(new[] { 3, 2 })));
            Assert.AreEqual("[2,2]", Util.ArrayToString(t.toBeContinued(new[] { 5, 2 })));
            Assert.AreEqual("[0]", Util.ArrayToString(t.toBeContinued(new[] { 0, 5 })));
            Assert.AreEqual("[]", Util.ArrayToString(t.toBeContinued(new[] { 5, 0 })));
            Assert.AreEqual("[1,1,1,1,1,2]", Util.ArrayToString(t.toBeContinued(new[] { 21, 13 })));
            Assert.AreEqual("[3,1,1,2]", Util.ArrayToString(t.toBeContinued(new[] { 18, 5 })));
            Assert.AreEqual("[0,1,1,32,31]", Util.ArrayToString(t.toBeContinued(new[] { 1024, 2017 })));
            Assert.AreEqual("[0,1,1,1,1,1,1,1,1,2]", Util.ArrayToString(t.toBeContinued(new[] { 55, 89 })));
            Assert.AreEqual("[1,2,1,1,2,5,1,2,1,253,5,2]", Util.ArrayToString(t.toBeContinued(new[] { 1234567, 891011 })));
            Assert.AreEqual("[83,2,3,1,2]", Util.ArrayToString(t.toBeContinued(new[] { 2086, 25 })));
        }
Example #2
0
        public override void Load()
        {
            HamonBarState.hamonBarTexture      = ModContent.GetTexture("JoJoStands/UI/HamonBar");
            ToBeContinued.TBCArrowTexture      = ModContent.GetTexture("JoJoStands/UI/TBCArrow");
            BulletCounter.bulletCounterTexture = ModContent.GetTexture("JoJoStands/UI/BulletCounter");
            Items.SexPistolsFinal.usesound     = GetLegacySoundSlot(SoundType.Custom, "Sounds/sound/Shoot");

            // Registers a new hotkey
            ItemHotKey         = RegisterHotKey("Item Special", "P"); // See https://docs.microsoft.com/en-us/previous-versions/windows/xna/bb197781(v%3dxnagamestudio.41) for special keys
            AccessoryHotKey    = RegisterHotKey("Accessory Special", "k");
            StandControl       = RegisterHotKey("Stand Control", "j");
            StandControlUp     = RegisterHotKey("Stand Control Up", "Up");
            StandControlDown   = RegisterHotKey("Stand Control Down", "Down");
            StandControlLeft   = RegisterHotKey("Stand Control Left", "Left");
            StandControlRight  = RegisterHotKey("Stand Control Right", "Right");
            StandControlAttack = RegisterHotKey("Stand Control Attack", "RightShift");
            PoseHotKey         = RegisterHotKey("Pose", "v");


            //UI Stuff
            if (!Main.dedServ)
            {
                HamonBarInterface = new HamonBarState();
                HamonBarInterface.Activate();
                _hamonbarInterface = new UserInterface();
                _hamonbarInterface.SetState(HamonBarInterface);
                TBCarrow = new ToBeContinued();
                TBCarrow.Activate();
                _tbcarrow = new UserInterface();
                _tbcarrow.SetState(TBCarrow);
                bulletCounter = new BulletCounter();
                bulletCounter.Activate();
                _bulletcounter = new UserInterface();
                _bulletcounter.SetState(bulletCounter);
            }
        }
Example #3
0
        public override void Load()
        {
            JoJoStandsSounds = ModLoader.GetMod("JoJoStandsSounds");        //would just return null if nothing is there
            HamonBarState.hamonBarTexture                  = ModContent.GetTexture("JoJoStands/UI/HamonBar");
            ToBeContinued.TBCArrowTexture                  = ModContent.GetTexture("JoJoStands/UI/TBCArrow");
            BulletCounter.bulletCounterTexture             = ModContent.GetTexture("JoJoStands/UI/BulletCounter");
            AerosmithRadar.aerosmithRadarTexture           = ModContent.GetTexture("JoJoStands/UI/AerosmithRadar");
            GoldenSpinMeter.goldenRectangleTexture         = ModContent.GetTexture("JoJoStands/UI/GoldenSpinMeter");
            GoldenSpinMeter.goldenRectangleSpinLineTexture = ModContent.GetTexture("JoJoStands/UI/GoldenSpinMeterLine");
            MyPlayer.standTier1List.Add(ItemType("AerosmithT1"));
            MyPlayer.standTier1List.Add(ItemType("GoldExperienceT1"));
            MyPlayer.standTier1List.Add(ItemType("HierophantGreenT1"));
            MyPlayer.standTier1List.Add(ItemType("KillerQueenT1"));
            MyPlayer.standTier1List.Add(ItemType("KingCrimsonT1"));
            MyPlayer.standTier1List.Add(ItemType("MagiciansRedT1"));
            MyPlayer.standTier1List.Add(ItemType("SexPistolsT1"));
            MyPlayer.standTier1List.Add(ItemType("StarPlatinumT1"));
            MyPlayer.standTier1List.Add(ItemType("StickyFingersT1"));
            MyPlayer.standTier1List.Add(ItemType("TheWorldT1"));
            MyPlayer.standTier1List.Add(ItemType("TuskAct1"));

            MyPlayer.stopImmune.Add(ProjectileType("TheWorldStandT2"));     //only the timestop capable stands as people shouldn't switch anyway
            MyPlayer.stopImmune.Add(ProjectileType("TheWorldStandT3"));
            MyPlayer.stopImmune.Add(ProjectileType("TheWorldStandFinal"));
            MyPlayer.stopImmune.Add(ProjectileType("StarPlatinumStandFinal"));
            //MyPlayer.stopImmune.Add(ProjectileType("StickyFingersFistExtended"));
            MyPlayer.stopImmune.Add(ProjectileType("RoadRoller"));
            MyPlayer.stopImmune.Add(ProjectileType("HamonPunches"));
            MyPlayer.stopImmune.Add(ProjectileType("Fists"));
            MyPlayer.stopImmune.Add(ProjectileType("GoldExperienceRequiemStand"));
            MyPlayer.stopImmune.Add(ProjectileType("TuskAct4Minion"));


            // Registers a new hotkey
            SpecialHotKey = RegisterHotKey("Special Ability", "P");        // See https://docs.microsoft.com/en-us/previous-versions/windows/xna/bb197781(v%3dxnagamestudio.41) for special keys
            StandOut      = RegisterHotKey("Stand Out", "G");
            PoseHotKey    = RegisterHotKey("Pose", "V");
            StandAutoMode = RegisterHotKey("Stand Auto Mode", "L");

            if (!Main.dedServ)      //Manages resource loading cause the server isn't able to load resources
            {
                //UI Stuff
                HamonBarInterface = new HamonBarState();
                HamonBarInterface.Activate();
                _hamonbarInterface = new UserInterface();
                _hamonbarInterface.SetState(HamonBarInterface);
                TBCarrow = new ToBeContinued();
                TBCarrow.Activate();
                _tbcarrow = new UserInterface();
                _tbcarrow.SetState(TBCarrow);
                bulletCounter = new BulletCounter();
                bulletCounter.Activate();
                _bulletcounter = new UserInterface();
                _bulletcounter.SetState(bulletCounter);
                aerosmithRadar = new AerosmithRadar();
                aerosmithRadar.Activate();
                _aerosmithRadar = new UserInterface();
                _aerosmithRadar.SetState(aerosmithRadar);
                betUI = new BetUI();
                betUI.Activate();
                _betUI = new UserInterface();
                _betUI.SetState(betUI);
                GoldenSpinInterface = new GoldenSpinMeter();
                GoldenSpinInterface.Activate();
                _goldenSpinInterface = new UserInterface();
                _goldenSpinInterface.SetState(GoldenSpinInterface);

                //Shader Stuff
                Ref <Effect> timestopShader = new Ref <Effect>(GetEffect("Effects/TimestopEffect")); // The path to the compiled shader file.
                Filters.Scene["TimestopEffectShader"] = new Filter(new ScreenShaderData(timestopShader, "TimestopEffectShader"), EffectPriority.VeryHigh);
                Filters.Scene["TimestopEffectShader"].Load();
                Ref <Effect> greyscaleShader = new Ref <Effect>(GetEffect("Effects/Greyscale"));
                Filters.Scene["GreyscaleEffect"] = new Filter(new ScreenShaderData(greyscaleShader, "GreyscaleEffect"), EffectPriority.VeryHigh);
                Filters.Scene["GreyscaleEffect"].Load();
                Ref <Effect> greenShader = new Ref <Effect>(GetEffect("Effects/GreenEffect"));
                Filters.Scene["GreenEffect"] = new Filter(new ScreenShaderData(greenShader, "GreenEffect"), EffectPriority.VeryHigh);
                Filters.Scene["GreenEffect"].Load();

                /*MyPlayer.stopImmune.Add(ProjectileType("TheWorldStandT2"));     //only the timestop capable stands as people shouldn't switch anyway
                 * MyPlayer.stopImmune.Add(ProjectileType("TheWorldStandT3"));
                 * MyPlayer.stopImmune.Add(ProjectileType("TheWorldStandFinal"));
                 * MyPlayer.stopImmune.Add(ProjectileType("StarPlatinumStandFinal"));/*/
            }
        }
Example #4
0
        public override void Load()
        {
            JoJoStandsSounds = ModLoader.GetMod("JoJoStandsSounds");        //would just return null if nothing is there
            SoundsLoaded     = JoJoStandsSounds != null;
            FanStandsLoaded  = ModLoader.GetMod("JoJoFanStands") != null;
            HamonBarState.hamonBarTexture                  = ModContent.GetTexture("JoJoStands/UI/HamonBar");
            ToBeContinued.TBCArrowTexture                  = ModContent.GetTexture("JoJoStands/UI/TBCArrow");
            BulletCounter.bulletCounterTexture             = ModContent.GetTexture("JoJoStands/UI/BulletCounter");
            AerosmithRadar.aerosmithRadarTexture           = ModContent.GetTexture("JoJoStands/UI/AerosmithRadar");
            GoldenSpinMeter.goldenRectangleTexture         = ModContent.GetTexture("JoJoStands/UI/GoldenSpinMeter");
            GoldenSpinMeter.goldenRectangleSpinLineTexture = ModContent.GetTexture("JoJoStands/UI/GoldenSpinMeterLine");
            SexPistolsUI.sexPistolsUITexture               = ModContent.GetTexture("JoJoStands/UI/SexPistolsUI");
            VoidBar.VoidBarTexture    = ModContent.GetTexture("JoJoStands/UI/VoidBar");
            VoidBar.VoidBarBarTexture = ModContent.GetTexture("JoJoStands/UI/VoidBarBar");
            MyPlayer.standTier1List.Add(ItemType("AerosmithT1"));
            MyPlayer.standTier1List.Add(ItemType("GoldExperienceT1"));
            MyPlayer.standTier1List.Add(ItemType("HierophantGreenT1"));
            MyPlayer.standTier1List.Add(ItemType("KillerQueenT1"));
            MyPlayer.standTier1List.Add(ItemType("KingCrimsonT1"));
            MyPlayer.standTier1List.Add(ItemType("MagiciansRedT1"));
            MyPlayer.standTier1List.Add(ItemType("SexPistolsT1"));
            MyPlayer.standTier1List.Add(ItemType("StarPlatinumT1"));
            MyPlayer.standTier1List.Add(ItemType("StickyFingersT1"));
            MyPlayer.standTier1List.Add(ItemType("TheWorldT1"));
            MyPlayer.standTier1List.Add(ItemType("TuskAct1"));
            MyPlayer.standTier1List.Add(ItemType("LockT1"));
            MyPlayer.standTier1List.Add(ItemType("GratefulDeadT1"));
            MyPlayer.standTier1List.Add(ItemType("TheHandT1"));
            MyPlayer.standTier1List.Add(ItemType("WhitesnakeT1"));
            MyPlayer.standTier1List.Add(ItemType("DollyDaggerT1"));
            MyPlayer.standTier1List.Add(ItemType("CenturyBoyT1"));
            MyPlayer.standTier1List.Add(ItemType("SilverChariotT1"));
            MyPlayer.standTier1List.Add(ItemType("HermitPurpleT1"));
            MyPlayer.standTier1List.Add(ItemType("BadCompanyT1"));
            MyPlayer.standTier1List.Add(ItemType("CreamT1"));

            MyPlayer.stopImmune.Add(ProjectileType("TheWorldStandT2"));     //only the timestop capable stands as people shouldn't switch anyway
            MyPlayer.stopImmune.Add(ProjectileType("TheWorldStandT3"));
            MyPlayer.stopImmune.Add(ProjectileType("TheWorldStandFinal"));
            MyPlayer.stopImmune.Add(ProjectileType("StarPlatinumStandFinal"));
            //MyPlayer.stopImmune.Add(ProjectileType("StickyFingersFistExtended"));
            MyPlayer.stopImmune.Add(ProjectileType("RoadRoller"));
            MyPlayer.stopImmune.Add(ProjectileType("HamonPunches"));
            MyPlayer.stopImmune.Add(ProjectileType("Fists"));
            MyPlayer.stopImmune.Add(ProjectileType("GoldExperienceRequiemStand"));
            MyPlayer.stopImmune.Add(ProjectileType("TuskAct4Minion"));


            // Registers a new hotkey
            SpecialHotKey       = RegisterHotKey("Special Ability", "P");  // See https://docs.microsoft.com/en-us/previous-versions/windows/xna/bb197781(v%3dxnagamestudio.41) for special keys
            SecondSpecialHotKey = RegisterHotKey("Secondary Special Ability", "H");
            StandOut            = RegisterHotKey("Stand Out", "G");
            PoseHotKey          = RegisterHotKey("Pose", "V");
            StandAutoMode       = RegisterHotKey("Stand Auto Mode", "L");

            if (!Main.dedServ)      //Manages resource loading cause the server isn't able to load resources
            {
                //UI Stuff
                HamonBarInterface = new HamonBarState();
                HamonBarInterface.Activate();
                _hamonbarInterface = new UserInterface();
                _hamonbarInterface.SetState(HamonBarInterface);
                TBCarrow = new ToBeContinued();
                TBCarrow.Activate();
                _tbcarrow = new UserInterface();
                _tbcarrow.SetState(TBCarrow);
                bulletCounter = new BulletCounter();
                bulletCounter.Activate();
                _bulletcounter = new UserInterface();
                _bulletcounter.SetState(bulletCounter);
                aerosmithRadar = new AerosmithRadar();
                aerosmithRadar.Activate();
                _aerosmithRadar = new UserInterface();
                _aerosmithRadar.SetState(aerosmithRadar);
                betUI = new BetUI();
                betUI.Activate();
                _betUI = new UserInterface();
                _betUI.SetState(betUI);
                GoldenSpinInterface = new GoldenSpinMeter();
                GoldenSpinInterface.Activate();
                _goldenSpinInterface = new UserInterface();
                sexPistolsUI         = new SexPistolsUI();
                sexPistolsUI.Activate();
                _sexPistolsUI = new UserInterface();
                _sexPistolsUI.SetState(sexPistolsUI);
                _goldenSpinInterface.SetState(GoldenSpinInterface);
                VoidBarUI = new VoidBar();
                VoidBarUI.Activate();
                _voidbarUI = new UserInterface();
                _voidbarUI.SetState(VoidBarUI);
                HamonSkillTreeUI = new HamonSkillTree();
                HamonSkillTreeUI.Activate();
                _hamonSkillTreeUI = new UserInterface();
                _hamonSkillTreeUI.SetState(HamonSkillTreeUI);
                UnitsUI = new BadCompanyUnitsUI();
                UnitsUI.Activate();
                _unitsUI = new UserInterface();
                _unitsUI.SetState(UnitsUI);

                //Shader Stuff
                Ref <Effect> timestopShader = new Ref <Effect>(GetEffect("Effects/TimestopEffect"));      // The path to the compiled shader file.
                Filters.Scene["TimestopEffectShader"] = new Filter(new ScreenShaderData(timestopShader, "TimestopEffectShader"), EffectPriority.VeryHigh);
                Filters.Scene["TimestopEffectShader"].Load();
                Ref <Effect> greyscaleShader = new Ref <Effect>(GetEffect("Effects/Greyscale"));
                Filters.Scene["GreyscaleEffect"] = new Filter(new ScreenShaderData(greyscaleShader, "GreyscaleEffect"), EffectPriority.VeryHigh);
                Filters.Scene["GreyscaleEffect"].Load();
                Ref <Effect> greenShader = new Ref <Effect>(GetEffect("Effects/GreenEffect"));
                Filters.Scene["GreenEffect"] = new Filter(new ScreenShaderData(greenShader, "GreenEffect"), EffectPriority.VeryHigh);
                Filters.Scene["GreenEffect"].Load();
                Ref <Effect> redShader = new Ref <Effect>(GetEffect("Effects/RedEffect"));
                Filters.Scene["RedEffect"] = new Filter(new ScreenShaderData(redShader, "RedEffect"), EffectPriority.VeryHigh);
                Filters.Scene["RedEffect"].Load();
                Ref <Effect> colorChangeShader = new Ref <Effect>(GetEffect("Effects/ColorChangeEffect"));
                Filters.Scene["ColorChangeEffect"] = new Filter(new ScreenShaderData(colorChangeShader, "ColorChangeEffect"), EffectPriority.VeryHigh);
                Filters.Scene["ColorChangeEffect"].Load();
                Ref <Effect> voidGradientShader = new Ref <Effect>(GetEffect("Effects/VoidBarGradient"));
                GameShaders.Misc["JoJoStandsVoidGradient"] = new MiscShaderData(voidGradientShader, "VoidBarGradient");

                //Misc
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/VMMusic"), ItemType("ViralMusicBox"), TileType("ViralMusicBoxTile"));
            }
        }
 // Use this for initialization
 void Start()
 {
     toBeContinued = FindObjectOfType<ToBeContinued>();
 }