Exemplo n.º 1
0
    public override void OnSignalRecieved(eObject source, string[] signal)
    {
        base.OnSignalRecieved(source, signal);

        switch (signal[0])
        {
        case "Activate":
            m_activated = true;
            TriggerEvent(this, "cyclone");
            break;

        case "Disable":
            StopAllCoroutines();
            m_activated = false;
            break;

        case "cyclone":
            Cyclone cyc = Instantiate(cycloneObj, transform.position, Quaternion.identity).GetComponent <Cyclone>();
            cyc.velocity = transform.rotation * Vector3.forward * cycloneSpeed;
            TriggerEvent(cyc, "cyclone " + cycloneLenth / cycloneSpeed, 0.1f);
            Destroy(cyc.gameObject, cycloneLenth / cycloneSpeed + 0.5f);

            if (m_activated == true)
            {
                TriggerEvent(this, "cyclone", cycloneGap);
            }
            break;
        }
    }
Exemplo n.º 2
0
    IEnumerator StartWait()
    {
        yield return(StartCoroutine(Wait(1.50F)));

        Spark.SetActive(false);
        Cyclone.SetActive(false);
    }
Exemplo n.º 3
0
        protected override void ValidatingHandler(object sender, System.ComponentModel.CancelEventArgs e)
        {
            Cyclone cyclone = this.CycloneCtrl.Cyclone;
            TextBox tb      = (TextBox)sender;

            if (tb.Text != null)
            {
                if (tb.Text.Trim().Equals(""))
                {
                    if (sender == this.textBoxName)
                    {
                        e.Cancel = true;
                        string message3 = "Please specify a name!";
                        MessageBox.Show(message3, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
                else
                {
                    if (sender == this.textBoxName)
                    {
                        ErrorMessage error = cyclone.SpecifyName(this.textBoxName.Text);
                        if (error != null)
                        {
                            UI.ShowError(error);
                        }
                    }
                }
            }
        }
Exemplo n.º 4
0
 public void InitializeVariableLabels(Cyclone uo)
 {
     this.labelPressureDrop.InitializeVariable(uo.GasPressureDrop);
     this.labelMassFlowRateOfParticleLostToGasOutlet.InitializeVariable(uo.MassFlowRateOfParticleLostToGasOutlet);
     this.labelInletParticleLoading.InitializeVariable(uo.InletParticleLoading);
     this.labelOutletParticleLoading.InitializeVariable(uo.OutletParticleLoading);
     this.labelCollectionEfficiency.InitializeVariable(uo.CollectionEfficiency);
 }
Exemplo n.º 5
0
        public CycloneControl(Flowsheet flowsheet, Point location, Cyclone cyclone) :
            base(flowsheet, location, cyclone)
        {
            InitializeComponent();

            this.Size = new System.Drawing.Size(UI.UNIT_OP_CTRL_H, UI.UNIT_OP_CTRL_H);
            UI.SetStatusColor(this, this.Cyclone.SolveState);
            this.UpdateBackImage();
        }
Exemplo n.º 6
0
        public List <Build> ZergBuilds(Bot bot)
        {
            List <Build> options = new List <Build>();

            if (bot.EnemyRace == Race.Protoss)
            {
                options.Add(new MassZergling()
                {
                    AllowHydraTransition = true
                });
                options.Add(new MacroHydra());
            }
            else if (bot.EnemyRace == Race.Terran)
            {
                if (ProxyDetected.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    Hellion.Get().DetectedPreviously &&
                    Cyclone.Get().DetectedPreviously &&
                    Banshee.Get().DetectedPreviously)
                {
                    options.Add(new Muukzor());
                    return(options);
                }
                if (BattlecruiserRush.Get().DetectedPreviously)
                {
                    options.Add(new MacroHydra());
                    return(options);
                }

                options.Add(new MassZergling()
                {
                    AllowHydraTransition = true
                });
                options.Add(new MacroHydra());
                options.Add(new Muukzor());
            }
            else if (bot.EnemyRace == Race.Zerg)
            {
                options.Add(new RoachRavager());
                options.Add(new MacroHydra());
                options.Add(new RushDefense());
            }
            else
            {
                options.Add(new MassZergling()
                {
                    AllowHydraTransition = true
                });
                options.Add(new MacroHydra());
                options.Add(new RushDefense());
            }

            return(options);
        }
Exemplo n.º 7
0
        public Storm(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.brewmaster_storm_cyclone, x => this.cyclone = new Cyclone(x) },
                { AbilityId.brewmaster_storm_dispel_magic, x => this.dispel = new Dispel(x) },
                { AbilityId.brewmaster_storm_wind_walk, x => this.windWalk = new WindWalk(x) },
                { AbilityId.brewmaster_cinder_brew, x => this.cender = new DebuffAbility(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.brewmaster_storm_wind_walk, _ => this.windWalk);
        }
Exemplo n.º 8
0
        public void InitializeTheUI(Flowsheet flowsheet, Cyclone cyclone)
        {
            this.inConstruction = true;
            this.cyclone        = cyclone;
            CycloneRatingModel cycloneRating = cyclone.CurrentRatingModel;

            this.InitializeVariableTextBoxes(flowsheet, cycloneRating);
            cyclone.SolveComplete += new SolveCompleteEventHandler(cyclone_SolveComplete);
            this.comboBoxInletConfiguration.SelectedIndex = -1;
            this.comboBoxParticleTypeGroup.SelectedIndex  = -1;
            this.inConstruction = false;
            this.SetInletConfiguration(cycloneRating.InletConfiguration);
            this.SetParticleTypeGroup(cycloneRating.ParticleTypeGroup);
        }
Exemplo n.º 9
0
    private GameObject Spark, Cyclone;                       //effects, monsters

    void Start()
    {
        Spark = transform.FindChild("Spark").gameObject;         // effects
        Spark.SetActive(false);
        // effects
        Cyclone = transform.FindChild("Cyclone").gameObject;         // effects
        Cyclone.SetActive(false);


        mTrackableBehaviour = GetComponent <TrackableBehaviour>();
        if (mTrackableBehaviour)
        {
            mTrackableBehaviour.RegisterTrackableEventHandler(this);
        }
    }
Exemplo n.º 10
0
    public void Cyclone(float duration)
    {
        if (m_isPushedUp || m_isDead)
        {
            return;
        }

        //spawn a cyclone underneath enemy lasting a set duration
        var     cyclone   = Instantiate(m_cyclonePrefab, transform.position, m_cyclonePrefab.transform.rotation);
        Cyclone component = cyclone.GetComponent <Cyclone>();

        component.m_cycloneDuration = duration;
        component.m_enemyController = this;
        m_isRotating = true;
    }
Exemplo n.º 11
0
    void OnGUI()
    {
        //	GUI.Label(new Rect (Screen.width - (Screen.width * 0.9f) - 50.0f, Screen.height - Screen.height, 100.0f, 30.0f), "Player 1 Score: " + Player1LifePoints, MyGUIstyle);
        //	GUI.Label(new Rect (Screen.width - (Screen.width * 0.3f) - 50.0f, Screen.height - Screen.height, 100.0f, 30.0f), "Player 1 Score: " + Player2LifePoints, MyGUIstyle);

        if (mShowGUIButton)
        {
            // draw the GUI button
            if (GUI.Button(attackButton, "ATK/3000"))
            {
                Debug.Log("Attack!");
                Cyclone.SetActive(false);
                Spark.SetActive(true);
                StartCoroutine(StartWait());
                // do something on button click
            }
            if (GUI.Button(defenseButton, "DEF/2500"))
            {
                Debug.Log("Defense!");
                Cyclone.SetActive(true);
                //Spark.SetActive(false);
            }
        }
    }
Exemplo n.º 12
0
    void OnGUI()
    {
        if (mShowGUIButton)
        {
            // draw the GUI button
            if (GUI.Button(attackButton2, "ATK/300"))
            {
                Debug.Log("Attack!");
                Cyclone.SetActive(false);
                Spark.SetActive(true);
                Blast.SetActive(true);
                StartCoroutine(StartWait());


                // do something on button click
            }
            if (GUI.Button(defenseButton2, "DEF/200"))
            {
                Debug.Log("Defense!");
                Cyclone.SetActive(true);
                //Spark.SetActive(false);
            }
        }
    }
Exemplo n.º 13
0
        private void UpdateStreamsUI()
        {
            // clear the streams boxes and start again
            this.groupBoxMixtureFluid.Controls.Clear();
            this.groupBoxParticle.Controls.Clear();

            Cyclone cyclone        = this.CycloneCtrl.Cyclone;
            bool    hasGasIn       = false;
            bool    hasGasOut      = false;
            bool    hasParticleOut = false;

            ProcessStreamBase mixtureIn = cyclone.GasInlet;

            hasGasIn = mixtureIn != null;

            ProcessStreamBase fluidOut = cyclone.GasOutlet;

            hasGasOut = fluidOut != null;

            ProcessStreamBase particleOut = cyclone.ParticleOutlet;

            if (particleOut != null)
            {
                hasParticleOut = true;
            }

            if (hasGasIn || hasGasOut)
            {
                ProcessStreamBase labelsStream = hasGasIn ? mixtureIn : fluidOut;

                UserControl ctrl = null;
                //UserControl ctrl = new ProcessVarLabelsControl(labelsStream.VarList);
                if (labelsStream is DryingGasStream)
                {
                    ctrl = new GasStreamLabelsControl((DryingGasStream)labelsStream);
                }
                this.groupBoxMixtureFluid.Controls.Add(ctrl);
                ctrl.Location = new Point(4, 12 + 20 + 2);
            }

            if (hasGasIn)
            {
                ProcessStreamBaseControl gasInCtrl = this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.GasInlet.Name);
                //UserControl ctrl = new ProcessVarValuesControl(gasInCtrl);
                UserControl ctrl = new GasStreamValuesControl((GasStreamControl)gasInCtrl);

                this.groupBoxMixtureFluid.Controls.Add(ctrl);
                ctrl.Location = new Point(196, 12 + 20 + 2);

                this.textBoxGasInName.SetSolvable(cyclone.GasInlet);
                this.groupBoxMixtureFluid.Controls.Add(this.textBoxGasInName);
                this.textBoxGasInName.Text = cyclone.GasInlet.Name;
                UI.SetStatusColor(this.textBoxGasInName, cyclone.GasInlet.SolveState);
            }

            if (hasGasOut)
            {
                ProcessStreamBaseControl gasOutCtrl = this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.GasOutlet.Name);
                //UserControl ctrl = new ProcessVarValuesControl(gasOutCtrl);
                UserControl ctrl = new GasStreamValuesControl((GasStreamControl)gasOutCtrl);

                this.groupBoxMixtureFluid.Controls.Add(ctrl);
                ctrl.Location = new Point(276, 12 + 20 + 2);

                this.textBoxGasOutName.SetSolvable(cyclone.GasOutlet);
                this.groupBoxMixtureFluid.Controls.Add(this.textBoxGasOutName);
                this.textBoxGasOutName.Text = cyclone.GasOutlet.Name;
                UI.SetStatusColor(this.textBoxGasOutName, cyclone.GasOutlet.SolveState);
            }

            if (hasParticleOut)
            {
                // add the labels
                UserControl ctrl = null;
                if (particleOut is DryingMaterialStream)
                {
                    ctrl = new MaterialStreamLabelsControl((DryingMaterialStream)particleOut);
                    //ctrl = new ProcessVarLabelsControl(particleOut.VarList);
                }
                this.groupBoxParticle.Controls.Add(ctrl);
                ctrl.Location = new Point(4, 12 + 20 + 2);

                // add the values
                ProcessStreamBaseControl matOutCtrl = this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.ParticleOutlet.Name);
                if (particleOut is DryingMaterialStream)
                {
                    //ctrl = new ProcessVarValuesControl(matOutCtrl);
                    ctrl = new MaterialStreamValuesControl((MaterialStreamControl)matOutCtrl);
                }

                this.groupBoxParticle.Controls.Add(ctrl);
                ctrl.Location = new Point(196, 12 + 20 + 2);

                this.textBoxParticleOutName.SetSolvable(cyclone.ParticleOutlet);
                this.groupBoxParticle.Controls.Add(this.textBoxParticleOutName);
                this.textBoxParticleOutName.Text = cyclone.ParticleOutlet.Name;
                UI.SetStatusColor(this.textBoxParticleOutName, cyclone.ParticleOutlet.SolveState);
            }
        }
Exemplo n.º 14
0
        public List <Build> ProtossBuilds(Bot bot)
        {
            List <Build> options = new List <Build>();

            if (Bot.Debug)
            {
                foreach (Strategy strategy in bot.EnemyStrategyAnalyzer.Strategies)
                {
                    if (strategy.DetectedPreviously)
                    {
                        System.Console.WriteLine("Detected previous strategy: " + strategy.Name());
                    }
                }
            }

            if (bot.EnemyRace == Race.Terran)
            {
                if (Marine.Get().DetectedPreviously &&
                    !Reaper.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Cyclone.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously &&
                    !SiegeTank.Get().DetectedPreviously &&
                    !Medivac.Get().DetectedPreviously &&
                    !Viking.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously &&
                    !Battlecruiser.Get().DetectedPreviously &&
                    !WidowMine.Get().DetectedPreviously &&
                    !Hellion.Get().DetectedPreviously &&
                    !Thor.Get().DetectedPreviously &&
                    !Liberator.Get().DetectedPreviously)
                {
                    // ValinMarineBot
                    options.Add(new NinjaTurtles());
                    return(options);
                }
                if (BattlecruiserRush.Get().DetectedPreviously &&
                    Thor.Get().DetectedPreviously &&
                    WidowMine.Get().DetectedPreviously)
                {
                    // BenBotBC
                    options.Add(new OneBaseStalkerImmortal());
                    return(options);
                }
                if (Battlecruiser.Get().DetectedPreviously &&
                    !BattlecruiserRush.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously &&
                    !Reaper.Get().DetectedPreviously &&
                    !Cyclone.Get().DetectedPreviously &&
                    !Medivac.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously)
                {
                    options.Add(new MassVoidray()
                    {
                        SkipDefenses = true
                    });
                    return(options);
                }

                /*
                 * if (ProxyDetected.Get().DetectedPreviously
                 *  && !Marauder.Get().DetectedPreviously
                 *  && Banshee.Get().DetectedPreviously)
                 * {
                 *  options.Add(new AntiMicro());
                 *  return options;
                 * }
                 */
                if (ProxyDetected.Get().DetectedPreviously &&
                    Marauder.Get().DetectedPreviously &&
                    Banshee.Get().DetectedPreviously)
                {
                    // MicroMachine
                    options.Add(new AntiMicro()
                    {
                        HuntProxies = true, CounterProxyMarauder = false
                    });
                    //options.Add(new NinjaTurtles() { Expand = true });
                    //options.Add(new OneBaseTempest() { DefendingStalker = true });
                    return(options);
                }
                if (ProxyDetected.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    // Strelok
                    //options.Add(new PvTStalkerImmortal() { BuildReaperWall = true, ProxyPylon = false, DelayObserver = true, SendScout = true, MassTanksDetected = MassTank.Get().DetectedPreviously });
                    options.Add(new OneBaseStalkerImmortal()
                    {
                        UseSentry = true
                    });
                    options.Add(new OneBaseTempest());
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    Raven.Get().DetectedPreviously &&
                    !Cyclone.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    options.Add(new OneBaseStalkerImmortal());
                    //options.Add(new PvTStalkerImmortal() { BuildReaperWall = false, ProxyPylon = false, DelayObserver = true, SendScout = false, MassTanksDetected = true });
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously &&
                    Marauder.Get().DetectedPreviously &&
                    Liberator.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    // Jensiiibot
                    //options.Add(new PvTStalkerTempest());
                    //options.Add(new Builds.Protoss.WorkerRush() { CounterJensiii = true, BuildStalkers = true });
                    //options.Add(new PvTStalkerImmortal() { BuildReaperWall = true, ProxyPylon = false, DelayObserver = true, MassTanksDetected = MassTank.Get().DetectedPreviously, UseColosus = false });
                    options.Add(new PvTZealotImmortal());
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    Cyclone.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Liberator.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    // Rusty
                    options.Add(new OneBaseStalkerImmortal());
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously &&
                    Cyclone.Get().DetectedPreviously &&
                    Marauder.Get().DetectedPreviously &&
                    !Liberator.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously &&
                    Thor.Get().DetectedPreviously &&
                    SiegeTank.Get().DetectedPreviously &&
                    MassTank.Get().DetectedPreviously &&
                    Hellbat.Get().DetectedPreviously)
                {
                    // MechSweep
                    options.Add(new OneBaseTempest()
                    {
                        RequiredSize = 3
                    });
                    return(options);
                }

                options.Add(new PvTStalkerImmortal()
                {
                    BuildReaperWall = true, ProxyPylon = false, DelayObserver = true, MassTanksDetected = MassTank.Get().DetectedPreviously, UseColosus = false
                });
            }
            else if (bot.EnemyRace == Race.Zerg)
            {
                if (Bot.Main.OpponentID == "eed44128-f488-4e31-b457-8e55f8a95628")
                {
                    options.Add(new PvZHjax()
                    {
                        CounterRoaches = false, DefendNydus = false
                    });
                    return(options);
                }
                options.Add(new PvZHjax());
                return(options);

                /*
                 * if (Lurker.Get().DetectedPreviously)
                 * {
                 *  //Kagamine
                 *  //options.Add(new PvZAdeptIntoVoidray());
                 *  //options.Add(new WorkerRush());
                 *  options.Add(new PvZHjax());
                 *  return options;
                 * }
                 * if (Mutalisk.Get().DetectedPreviously
                 *  && !Lurker.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseStalkerImmortal() { StartZealots = true });
                 *  return options;
                 * }
                 * if (Hydralisk.Get().DetectedPreviously && StrategyAnalysis.ZerglingRush.Get().DetectedPreviously)
                 * {
                 *  options.Add(new ZealotRush());
                 *  return options;
                 * }
                 * if (RoachRush.Get().DetectedPreviously || StrategyAnalysis.ZerglingRush.Get().DetectedPreviously)
                 * {
                 *  options.Add(new PvZRushDefense());
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (Roach.Get().DetectedPreviously
                 *  && Zergling.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously)
                 * {
                 *  options.Add(new PvZRushDefense());
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (Queen.Get().DetectedPreviously
                 *  && Zergling.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously
                 *  && !Roach.Get().DetectedPreviously)
                 * {
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (bot.PreviousEnemyStrategies.MassHydra
                 *  && MassRoach.Get().DetectedPreviously
                 *  && !Lurker.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (!Zergling.Get().DetectedPreviously
                 *  && !Roach.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously
                 *  && !Queen.Get().DetectedPreviously
                 *  && !Mutalisk.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (!Zergling.Get().DetectedPreviously
                 *  && Roach.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously
                 *  && Queen.Get().DetectedPreviously
                 *  && !Mutalisk.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * options.Add(new OneBaseStalkerImmortal() { StartZealots = true });
                 */
            }
            else if (bot.EnemyRace == Race.Protoss)
            {
                if (Zealot.Get().DetectedPreviously &&
                    VoidRay.Get().DetectedPreviously &&
                    !Carrier.Get().DetectedPreviously &&
                    !Tempest.Get().DetectedPreviously &&
                    !Stalker.Get().DetectedPreviously &&
                    !Adept.Get().DetectedPreviously &&
                    !Immortal.Get().DetectedPreviously &&
                    !StrategyAnalysis.CannonRush.Get().DetectedPreviously)
                {
                    // MavBot3
                    options.Add(new ZealotRush());
                    return(options);
                }
                if (SkippedNatural.Get().DetectedPreviously &&
                    !AdeptHarass.Get().DetectedPreviously &&
                    VoidRay.Get().DetectedPreviously &&
                    Immortal.Get().DetectedPreviously)
                {
                    // AdditionalPylons
                    options.Add(new DoubleRoboProxy());
                    return(options);
                }
                if (Oracle.Get().DetectedPreviously &&
                    ThreeGate.Get().DetectedPreviously &&
                    Zealot.Get().DetectedPreviously &&
                    !Stalker.Get().DetectedPreviously &&
                    !VoidRay.Get().DetectedPreviously &&
                    !Immortal.Get().DetectedPreviously)
                {
                    // LuckyBot
                    options.Add(new OneBaseTempest());
                    return(options);
                }
                if (Carrier.Get().DetectedPreviously &&
                    Collosus.Get().DetectedPreviously &&
                    SkyToss.Get().DetectedPreviously &&
                    Tempest.Get().DetectedPreviously &&
                    !Archon.Get().DetectedPreviously &&
                    !HighTemplar.Get().DetectedPreviously)
                {
                    // TheGoldenArmada
                    options.Add(new OneBaseTempest());
                    return(options);
                }
                options.Add(new OneBaseStalkerImmortal()
                {
                    DoubleRobo = true, EarlySentry = true, AggressiveMicro = true
                });
                return(options);

                /*
                 * if (AdeptHarass.Get().DetectedPreviously
                 *  && SkyToss.Get().DetectedPreviously
                 *  && Carrier.Get().DetectedPreviously
                 *  && HighTemplar.Get().DetectedPreviously
                 *  && VoidRay.Get().DetectedPreviously
                 *  && !StrategyAnalysis.CannonRush.Get().DetectedPreviously)
                 * {
                 *  options.Add(new ZealotRush());
                 *  options.Add(new OneBaseStalkerImmortal());
                 *  return options;
                 * }
                 * if (AdeptHarass.Get().DetectedPreviously)
                 * {
                 *  // SharpenedEdge
                 *  options.Add(new OneBaseTempest());
                 *  options.Add(new Dishwasher());
                 *  return options;
                 * }
                 * if (StrategyAnalysis.CannonRush.Get().DetectedPreviously
                 *  && Tempest.Get().DetectedPreviously)
                 * {
                 *  // ThreeWayLover
                 *  //options.Add(new MassVoidray() { SkipDefenses = true });
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (Sentry.Get().DetectedPreviously
                 *  && Archon.Get().DetectedPreviously
                 *  && !Stalker.Get().DetectedPreviously
                 *  && !Zealot.Get().DetectedPreviously)
                 * {
                 *  options.Add(new TempestProxy());
                 *  return options;
                 * }
                 * if (Zealot.Get().DetectedPreviously
                 *  && StrategyAnalysis.CannonRush.Get().DetectedPreviously
                 *  && Oracle.Get().DetectedPreviously
                 *  && Phoenix.Get().DetectedPreviously
                 *  && Stalker.Get().DetectedPreviously
                 *  && !Immortal.Get().DetectedPreviously)
                 * {
                 *  //Gumby
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (Oracle.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (!Stalker.Get().DetectedPreviously
                 *  && !Zealot.Get().DetectedPreviously
                 *  && !Sentry.Get().DetectedPreviously)
                 * {
                 *  options.Add(new ZealotRush());
                 *  return options;
                 * }
                 * if (Zealot.Get().DetectedPreviously
                 *  && !Stalker.Get().DetectedPreviously)
                 * {
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 *
                 * options.Add(new NinjaTurtles());
                 * options.Add(new PvPMothershipSiege());
                 */
            }

            return(options);
        }
Exemplo n.º 15
0
 public CycloneControl(Flowsheet flowsheet, Point location, Cyclone cyclone)
     : base(flowsheet, location, cyclone)
 {
 }
Exemplo n.º 16
0
 public CycloneLabelsControl(Cyclone uo) : this()
 {
     this.InitializeVariableLabels(uo);
 }
Exemplo n.º 17
0
        private Flowsheet SetFlowsheetContent(NewProcessSettings newProcessSettings, ApplicationPreferences appPrefs, ArrayList items, string flowsheetName)
        {
            Flowsheet   flowsheet = null;
            IEnumerator e         = items.GetEnumerator();

            while (e.MoveNext())
            {
                object obj = e.Current;

                if (obj is EvaporationAndDryingSystem)
                {
                    EvaporationAndDryingSystem persisted = (EvaporationAndDryingSystem)obj;
                    persisted.SetSystemFileName(flowsheetName); // call this before SetObjectData()
                    persisted.SetObjectData();
                    flowsheet = new Flowsheet(newProcessSettings, appPrefs, persisted);
                }

                else if (obj is GasStreamControl)
                {
                    GasStreamControl persistedCtrl = (GasStreamControl)obj;
                    string           solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    DryingGasStream  stream        = flowsheet.EvaporationAndDryingSystem.GetGasStream(solvableName);
                    GasStreamControl newCtrl       = new GasStreamControl(flowsheet, new Point(0, 0), stream);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is MaterialStreamControl)
                {
                    MaterialStreamControl persistedCtrl = (MaterialStreamControl)obj;
                    string solvableName           = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    DryingMaterialStream  stream  = flowsheet.EvaporationAndDryingSystem.GetMaterialStream(solvableName);
                    MaterialStreamControl newCtrl = new MaterialStreamControl(flowsheet, new Point(0, 0), stream);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is DryerControl)
                {
                    DryerControl persistedCtrl = (DryerControl)obj;
                    string       solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Dryer        uo            = flowsheet.EvaporationAndDryingSystem.GetDryer(solvableName);
                    DryerControl newCtrl       = new DryerControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is HeatExchangerControl)
                {
                    HeatExchangerControl persistedCtrl = (HeatExchangerControl)obj;
                    string               solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    HeatExchanger        uo            = flowsheet.EvaporationAndDryingSystem.GetHeatExchanger(solvableName);
                    HeatExchangerControl newCtrl       = new HeatExchangerControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is CycloneControl)
                {
                    CycloneControl persistedCtrl = (CycloneControl)obj;
                    string         solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Cyclone        uo            = flowsheet.EvaporationAndDryingSystem.GetCyclone(solvableName);
                    CycloneControl newCtrl       = new CycloneControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is EjectorControl)
                {
                    EjectorControl persistedCtrl = (EjectorControl)obj;
                    string         solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Ejector        uo            = flowsheet.EvaporationAndDryingSystem.GetEjector(solvableName);
                    EjectorControl newCtrl       = new EjectorControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is WetScrubberControl)
                {
                    WetScrubberControl persistedCtrl = (WetScrubberControl)obj;
                    string             solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    WetScrubber        uo            = flowsheet.EvaporationAndDryingSystem.GetWetScrubber(solvableName);
                    WetScrubberControl newCtrl       = new WetScrubberControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is ScrubberCondenserControl)
                {
                    ScrubberCondenserControl persistedCtrl = (ScrubberCondenserControl)obj;
                    string                   solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    ScrubberCondenser        uo            = flowsheet.EvaporationAndDryingSystem.GetScrubberCondenser(solvableName);
                    ScrubberCondenserControl newCtrl       = new ScrubberCondenserControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is MixerControl)
                {
                    MixerControl persistedCtrl = (MixerControl)obj;
                    string       solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Mixer        uo            = flowsheet.EvaporationAndDryingSystem.GetMixer(solvableName);
                    MixerControl newCtrl       = new MixerControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is TeeControl)
                {
                    TeeControl persistedCtrl = (TeeControl)obj;
                    string     solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Tee        uo            = flowsheet.EvaporationAndDryingSystem.GetTee(solvableName);
                    TeeControl newCtrl       = new TeeControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is FlashTankControl)
                {
                    FlashTankControl persistedCtrl = (FlashTankControl)obj;
                    string           solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    FlashTank        uo            = flowsheet.EvaporationAndDryingSystem.GetFlashTank(solvableName);
                    FlashTankControl newCtrl       = new FlashTankControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is FanControl)
                {
                    FanControl persistedCtrl = (FanControl)obj;
                    string     solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Fan        uo            = flowsheet.EvaporationAndDryingSystem.GetFan(solvableName);
                    FanControl newCtrl       = new FanControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is ValveControl)
                {
                    ValveControl persistedCtrl = (ValveControl)obj;
                    string       solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Valve        uo            = flowsheet.EvaporationAndDryingSystem.GetValve(solvableName);
                    ValveControl newCtrl       = new ValveControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is BagFilterControl)
                {
                    BagFilterControl persistedCtrl = (BagFilterControl)obj;
                    string           solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    BagFilter        uo            = flowsheet.EvaporationAndDryingSystem.GetBagFilter(solvableName);
                    BagFilterControl newCtrl       = new BagFilterControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is AirFilterControl)
                {
                    AirFilterControl persistedCtrl = (AirFilterControl)obj;
                    string           solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    AirFilter        uo            = flowsheet.EvaporationAndDryingSystem.GetAirFilter(solvableName);
                    AirFilterControl newCtrl       = new AirFilterControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is CompressorControl)
                {
                    CompressorControl persistedCtrl = (CompressorControl)obj;
                    string            solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Compressor        uo            = flowsheet.EvaporationAndDryingSystem.GetCompressor(solvableName);
                    CompressorControl newCtrl       = new CompressorControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is HeaterControl)
                {
                    HeaterControl persistedCtrl = (HeaterControl)obj;
                    string        solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Heater        uo            = flowsheet.EvaporationAndDryingSystem.GetHeater(solvableName);
                    HeaterControl newCtrl       = new HeaterControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is CoolerControl)
                {
                    CoolerControl persistedCtrl = (CoolerControl)obj;
                    string        solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Cooler        uo            = flowsheet.EvaporationAndDryingSystem.GetCooler(solvableName);
                    CoolerControl newCtrl       = new CoolerControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is ElectrostaticPrecipitatorControl)
                {
                    ElectrostaticPrecipitatorControl persistedCtrl = (ElectrostaticPrecipitatorControl)obj;
                    string solvableName = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    ElectrostaticPrecipitator        uo      = flowsheet.EvaporationAndDryingSystem.GetElectrostaticPrecipitator(solvableName);
                    ElectrostaticPrecipitatorControl newCtrl = new ElectrostaticPrecipitatorControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is PumpControl)
                {
                    PumpControl persistedCtrl = (PumpControl)obj;
                    string      solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Pump        uo            = flowsheet.EvaporationAndDryingSystem.GetPump(solvableName);
                    PumpControl newCtrl       = new PumpControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is RecycleControl)
                {
                    RecycleControl persistedCtrl = (RecycleControl)obj;
                    string         solvableName  = (string)persistedCtrl.SerializationInfo.GetValue("SolvableName", typeof(string));
                    Recycle        uo            = flowsheet.EvaporationAndDryingSystem.GetRecycle(solvableName);
                    RecycleControl newCtrl       = new RecycleControl(flowsheet, new Point(0, 0), uo);
                    newCtrl.SetObjectData(persistedCtrl.SerializationInfo, persistedCtrl.StreamingContext);
                    flowsheet.Controls.Add(newCtrl);
                }
                else if (obj is SolvableConnection)
                {
                    SolvableConnection persistedDc = (SolvableConnection)obj;
                    SolvableConnection dc          = new SolvableConnection(flowsheet);
                    dc.SetObjectData(persistedDc.SerializationInfo, persistedDc.StreamingContext);
                    flowsheet.ConnectionManager.Connections.Add(dc);
                }
                else if (obj is FlowsheetPreferences)
                {
                    FlowsheetPreferences flowsheetPrefs = obj as FlowsheetPreferences;
                    flowsheetPrefs.SetObjectData(flowsheetPrefs.SerializationInfo, flowsheetPrefs.StreamingContext);
                    flowsheet.BackColor = flowsheetPrefs.BackColor;
                }
                else if (obj is ProsimoUI.CustomEditor.CustomEditor)
                {
                    ProsimoUI.CustomEditor.CustomEditor persistedEditor = (ProsimoUI.CustomEditor.CustomEditor)obj;
                    flowsheet.CustomEditor.SetObjectData(persistedEditor.SerializationInfo, persistedEditor.StreamingContext);
                }
            }

            if (this.CheckFlowsheetVersion(items, flowsheet))
            {
                flowsheet.IsDirty = false;
            }
            else
            {
                flowsheet = null;
            }

            return(flowsheet);
        }
Exemplo n.º 18
0
        public CycloneEditor(CycloneControl cycloneCtrl)
            : base(cycloneCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.inConstruction = true;
            Cyclone cyclone = this.CycloneCtrl.Cyclone;

            this.Text = "Cyclone: " + cyclone.Name;

            this.UpdateStreamsUI();

            this.groupBoxCyclone          = new System.Windows.Forms.GroupBox();
            this.groupBoxCyclone.Location = new System.Drawing.Point(644, 24);
            this.groupBoxCyclone.Name     = "groupBoxCyclone";
            this.groupBoxCyclone.Text     = "Cyclone";
            this.groupBoxCyclone.Size     = new System.Drawing.Size(280, 160);
            this.groupBoxCyclone.TabIndex = 127;
            this.groupBoxCyclone.TabStop  = false;
            this.panel.Controls.Add(this.groupBoxCyclone);

            if (cyclone.ParticleOutlet is DryingGasStream)
            {
                this.groupBoxParticle.Size = new System.Drawing.Size(280, 300);
                this.panel.Size            = new System.Drawing.Size(930, 329);
                this.ClientSize            = new System.Drawing.Size(930, 351);
            }
            else if (cyclone.ParticleOutlet is DryingMaterialStream)
            {
                this.groupBoxParticle.Size = new System.Drawing.Size(280, 300);
                this.panel.Size            = new System.Drawing.Size(930, 329);
                this.ClientSize            = new System.Drawing.Size(930, 351);
            }

            //ProcessVarLabelsControl cycloneLabelsCtrl = new ProcessVarLabelsControl(this.CycloneCtrl.Cyclone.VarList);
            CycloneLabelsControl cycloneLabelsCtrl = new CycloneLabelsControl(this.CycloneCtrl.Cyclone);

            this.groupBoxCyclone.Controls.Add(cycloneLabelsCtrl);
            cycloneLabelsCtrl.Location = new Point(4, 12 + 20 + 2);

            //ProcessVarValuesControl cycloneValuesCtrl = new ProcessVarValuesControl(this.CycloneCtrl);
            CycloneValuesControl cycloneValuesCtrl = new CycloneValuesControl(this.CycloneCtrl);

            this.groupBoxCyclone.Controls.Add(cycloneValuesCtrl);
            cycloneValuesCtrl.Location = new Point(196, 12 + 20 + 2);

            cycloneCtrl.Cyclone.StreamAttached += new StreamAttachedEventHandler(Cyclone_StreamAttached);
            cycloneCtrl.Cyclone.StreamDetached += new StreamDetachedEventHandler(Cyclone_StreamDetached);

            this.menuItemRating        = new MenuItem();
            this.menuItemRating.Index  = this.menuItemReport.Index + 1;
            this.menuItemRating.Text   = "Rating";
            this.menuItemRating.Click += new EventHandler(menuItemRating_Click);
            this.mainMenu.MenuItems.Add(this.menuItemRating);

            this.labelCalculationType    = new System.Windows.Forms.Label();
            this.comboBoxCalculationType = new System.Windows.Forms.ComboBox();

            // labelCalculationType
            this.labelCalculationType.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.labelCalculationType.Location    = new System.Drawing.Point(300, 0);
            this.labelCalculationType.Name        = "labelCalculationType";
            this.labelCalculationType.BackColor   = Color.DarkGray;
            this.labelCalculationType.Size        = new System.Drawing.Size(192, 20);
            this.labelCalculationType.TabIndex    = 5;
            this.labelCalculationType.Text        = "Calculation Type:";
            this.labelCalculationType.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;

            // comboBoxCalculationType
            this.comboBoxCalculationType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboBoxCalculationType.Items.AddRange(new object[] {
                "Balance",
                "Rating"
            });
            this.comboBoxCalculationType.Location              = new System.Drawing.Point(492, 0);
            this.comboBoxCalculationType.Name                  = "comboBoxCalculationType";
            this.comboBoxCalculationType.Size                  = new System.Drawing.Size(80, 21);
            this.comboBoxCalculationType.TabIndex              = 7;
            this.comboBoxCalculationType.SelectedIndexChanged += new EventHandler(comboBoxCalculationType_SelectedIndexChanged);

            this.panel.Controls.Add(this.labelCalculationType);
            this.panel.Controls.Add(this.comboBoxCalculationType);

            this.comboBoxCalculationType.SelectedIndex = -1;
            this.inConstruction = false;
            this.SetCalculationType(this.CycloneCtrl.Cyclone.CalculationType);
            this.comboBoxCalculationType.Enabled = true;
        }
Exemplo n.º 19
0
        public GargishOutcast()
            : base(AIType.AI_Mystic, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Race  = Race.Gargoyle;
            Title = "the Gargish Outcast";

            SetStr(150);
            SetInt(150);
            SetDex(150);

            SetHits(1000, 1200);
            SetMana(450, 600);

            SetDamage(15, 19);

            if (Utility.RandomBool())
            {
                Name   = NameList.RandomName("Gargoyle Male");
                Female = false;
                Body   = 666;
            }
            else
            {
                Name   = NameList.RandomName("Gargoyle Female");
                Female = true;
                Body   = 667;
            }

            Utility.AssignRandomHair(this, true);
            if (!Female)
            {
                Utility.AssignRandomFacialHair(this, true);
            }

            this.Hue = Race.RandomSkinHue();

            BaseWeapon wep;

            switch (Utility.Random(3))
            {
            default:
            case 0: wep = new Cyclone(); break;

            case 1: wep = new SoulGlaive(); break;

            case 2: wep = new Boomerang(); break;
            }

            wep.Attributes.SpellChanneling = 1;
            AddImmovableItem(wep);
            AddImmovableItem(new GargishClothChest(Utility.RandomNeutralHue()));
            AddImmovableItem(new GargishClothArms(Utility.RandomNeutralHue()));
            AddImmovableItem(new GargishClothLegs(Utility.RandomNeutralHue()));
            AddImmovableItem(new GargishClothKilt(Utility.RandomNeutralHue()));

            if (Utility.RandomBool())
            {
                AddImmovableItem(new GargishRobe());
            }

            this.SetDamageType(ResistanceType.Physical, 100);

            this.SetResistance(ResistanceType.Physical, 10, 25);
            this.SetResistance(ResistanceType.Fire, 40, 65);
            this.SetResistance(ResistanceType.Cold, 40, 65);
            this.SetResistance(ResistanceType.Poison, 40, 65);
            this.SetResistance(ResistanceType.Energy, 40, 65);

            this.SetSkill(SkillName.MagicResist, 120.0);
            this.SetSkill(SkillName.Tactics, 50.1, 60.0);
            this.SetSkill(SkillName.Throwing, 120.0);
            this.SetSkill(SkillName.Anatomy, 0.0, 10.0);
            this.SetSkill(SkillName.Magery, 50.0, 80.0);
            this.SetSkill(SkillName.EvalInt, 50.0, 80.0);
            this.SetSkill(SkillName.Meditation, 120);

            this.Fame  = 12000;
            this.Karma = -12000;

            if (.5 > Utility.RandomDouble())
            {
                ChangeAIType(AIType.AI_Mage);

                this.SetSkill(SkillName.Necromancy, 90, 105);
                this.SetSkill(SkillName.SpiritSpeak, 90, 105);
            }
            else
            {
                this.SetSkill(SkillName.Mysticism, 90, 105);
                this.SetSkill(SkillName.Focus, 90, 105);
            }

            m_NextSummon = DateTime.UtcNow;
        }
Exemplo n.º 20
0
        private void UpdateStreamsUI()
        {
            // clear the streams boxes and start again
            //this.groupBoxMixtureFluid.Controls.Clear();
            //this.groupBoxParticle.Controls.Clear();

            Cyclone cyclone        = this.CycloneCtrl.Cyclone;
            bool    hasGasIn       = false;
            bool    hasGasOut      = false;
            bool    hasParticleOut = false;

            ProcessStreamBase mixtureIn = cyclone.GasInlet;

            if (mixtureIn != null)
            {
                hasGasIn = true;
            }

            ProcessStreamBase fluidOut = cyclone.GasOutlet;

            if (fluidOut != null)
            {
                hasGasOut = true;
            }

            ProcessStreamBase particleOut = cyclone.ParticleOutlet;

            if (particleOut != null)
            {
                hasParticleOut = true;
            }

            //if (hasGasIn || hasGasOut)
            //{
            //   ProcessStreamBase labelsStream = null;
            //   if (hasGasIn)
            //      labelsStream = mixtureIn;
            //   else if (hasGasOut)
            //      labelsStream = fluidOut;

            //   UserControl ctrl = null;
            //   if (labelsStream is ProcessStream)
            //   {
            //      ctrl = new ProcessStreamLabelsControl((ProcessStream)labelsStream);
            //   }
            //   else if (labelsStream is DryingGasStream)
            //   {
            //      ctrl = new GasStreamLabelsControl((DryingGasStream)labelsStream);
            //   }
            //   this.groupBoxMixtureFluid.Controls.Add(ctrl);
            //   ctrl.Location = new Point(4, 12 + 20 + 2);
            //}

            if (hasGasIn)
            {
                ProcessStreamBaseControl processInCtrl = (ProcessStreamBaseControl)this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.GasInlet.Name);
                initializeGrid(processInCtrl, columnIndex, false, "Gas Inlet/Outlet");
                columnIndex += 2;
                // UserControl ctrl = null;
                //if (mixtureIn is ProcessStream)
                //{
                //   ProcessStreamControl processInCtrl = (ProcessStreamControl)this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.GasInlet.Name);
                //   ctrl = new ProcessStreamValuesControl(processInCtrl);
                //}
                //else if (mixtureIn is DryingGasStream)
                //{
                //   GasStreamControl gasInCtrl = (GasStreamControl)this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.GasInlet.Name);
                //   ctrl = new GasStreamValuesControl(gasInCtrl);
                //}
                //this.groupBoxMixtureFluid.Controls.Add(ctrl);
                //ctrl.Location = new Point(196, 12 + 20 + 2);

                //this.textBoxGasInName.SetSolvable(cyclone.GasInlet);
                //this.groupBoxMixtureFluid.Controls.Add(this.textBoxGasInName);
                //this.textBoxGasInName.Text = cyclone.GasInlet.Name;
                //UI.SetStatusColor(this.textBoxGasInName, cyclone.GasInlet.SolveState);
            }

            if (hasGasOut)
            {
                ProcessStreamBaseControl processOutCtrl = (ProcessStreamBaseControl)this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.GasOutlet.Name);
                initializeGrid(processOutCtrl, columnIndex, true, "Gas Inlet/Outlet");
                columnIndex++;
                //UserControl ctrl = null;
                //if (fluidOut is ProcessStream)
                //{
                //   ProcessStreamControl processOutCtrl = (ProcessStreamControl)this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.GasOutlet.Name);
                //   ctrl = new ProcessStreamValuesControl(processOutCtrl);
                //}
                //else if (fluidOut is DryingGasStream)
                //{
                //   GasStreamControl gasOutCtrl = (GasStreamControl)this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.GasOutlet.Name);
                //   ctrl = new GasStreamValuesControl(gasOutCtrl);
                //}
                //this.groupBoxMixtureFluid.Controls.Add(ctrl);
                //ctrl.Location = new Point(276, 12 + 20 + 2);

                //this.textBoxGasOutName.SetSolvable(cyclone.GasOutlet);
                //this.groupBoxMixtureFluid.Controls.Add(this.textBoxGasOutName);
                //this.textBoxGasOutName.Text = cyclone.GasOutlet.Name;
                //UI.SetStatusColor(this.textBoxGasOutName, cyclone.GasOutlet.SolveState);
            }

            if (hasParticleOut)
            {
                ProcessStreamBaseControl particalOutCtrl = (ProcessStreamBaseControl)this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.ParticleOutlet.Name);
                initializeGrid(particalOutCtrl, columnIndex, false, "Particle Outlet");
                columnIndex += 2;
                //// add the labels
                //UserControl ctrl = null;
                //if (particleOut is ProcessStream)
                //{
                //   ctrl = new ProcessStreamLabelsControl((ProcessStream)particleOut);
                //}
                //else if (particleOut is DryingMaterialStream)
                //{
                //   ctrl = new MaterialStreamLabelsControl((DryingMaterialStream)particleOut);
                //}
                //this.groupBoxParticle.Controls.Add(ctrl);
                //ctrl.Location = new Point(4, 12 + 20 + 2);

                //// add the values
                //ctrl = null;
                //if (particleOut is ProcessStream)
                //{
                //   ProcessStreamControl processOutCtrl = (ProcessStreamControl)this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.ParticleOutlet.Name);
                //   ctrl = new ProcessStreamValuesControl(processOutCtrl);
                //}
                //else if (particleOut is DryingMaterialStream)
                //{
                //   MaterialStreamControl matOutCtrl = (MaterialStreamControl)this.CycloneCtrl.Flowsheet.StreamManager.GetProcessStreamBaseControl(this.CycloneCtrl.Cyclone.ParticleOutlet.Name);
                //   ctrl = new MaterialStreamValuesControl(matOutCtrl);
                //}
                //this.groupBoxParticle.Controls.Add(ctrl);
                //ctrl.Location = new Point(196, 12 + 20 + 2);

                //this.textBoxParticleOutName.SetSolvable(cyclone.ParticleOutlet);
                //this.groupBoxParticle.Controls.Add(this.textBoxParticleOutName);
                //this.textBoxParticleOutName.Text = cyclone.ParticleOutlet.Name;
                //UI.SetStatusColor(this.textBoxParticleOutName, cyclone.ParticleOutlet.SolveState);
            }
        }