public override void RunEffect(int seed = -1, int _duration = -1)
        {
            base.RunEffect(seed, _duration);

            SendEffectToGame("set_seed", seed == -1 ? RandomHandler.Next(9999999).ToString() : seed.ToString());
            SendEffectToGame(type, function, (_duration == -1 ? Duration : _duration), "");
        }
Beispiel #2
0
        public static AbstractEffect GetRandomEffect(bool onlyEnabled = false)
        {
            List <AbstractEffect> effects = (onlyEnabled ? EnabledEffects : Effects);

            if (effects.Count == 0)
            {
                return(null);
            }
            return(effects[RandomHandler.Next(effects.Count)]);
        }
        public override void RunEffect(int seed = -1, int _duration = -1)
        {
            SendEffectToGame("set_seed", seed == -1 ? RandomHandler.Next(9999999).ToString() : seed.ToString());
            SendEffectToGame(type, function, (_duration == -1 ? Duration : _duration), "");

            if (!string.IsNullOrEmpty(GetAudioPath()) && Config.Instance().PlayAudioForEffects)
            {
                AudioPlayer.PlayAudio(GetAudioPath());
            }
        }
        public override void RunEffect()
        {
            int actualID = vehicleID;

            if (actualID == -1)
            {
                actualID = RandomHandler.Next(400, 611);
            }

            string spawnString = $"Spawn {VehicleNames.GetVehicleName(actualID)}";

            SendEffectToGame("spawn_vehicle", actualID.ToString(), -1, spawnString);
        }
Beispiel #5
0
        public override void RunEffect(int seed = -1, int _duration = -1)
        {
            base.RunEffect(seed, _duration);

            int actualID = vehicleID;

            if (actualID == -1)
            {
                actualID = RandomHandler.Next(400, 611);
            }

            string spawnString = $"Spawn {VehicleNames.GetVehicleName(actualID)}";

            SendEffectToGame("spawn_vehicle", actualID.ToString(), (_duration == -1 ? -1 : _duration), spawnString);
        }
Beispiel #6
0
 public override void RunEffect()
 {
     SendEffectToGame("set_seed", RandomHandler.Next(9999999).ToString());
     SendEffectToGame("cryptic_effects", (Config.Instance.CrypticEffects ? 1 : 0).ToString());
     SendEffectToGame(type, function, duration, "", multiplier);
 }
Beispiel #7
0
 private void ButtonTestSeed_Click(object sender, EventArgs e)
 {
     labelTestSeed.Text = $"{RandomHandler.Next(100, 999)}";
 }
Beispiel #8
0
 public override void RunEffect()
 {
     SendEffectToGame("set_seed", RandomHandler.Next(9999999).ToString());
     SendEffectToGame(type, function, duration, "", multiplier);
 }