Exemple #1
0
        public NetzwerkspielStarten()
        {
            InitializeComponent();

            label1.Font = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());
            txb_namenEingeben.Focus();
        }
Exemple #2
0
        public RohstoffpreiseForm(int sid, int lev)
        {
            InitializeComponent();

            lbl_ueberschrift.Font = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());
            level = lev;

            GlobalAktiveStadt = sid;

            lbl_ueberschrift.Text = "Rohstoffpreise in " + SW.Dynamisch.GetStadtwithID(GlobalAktiveStadt).GetGebietsName();
            lbl_ueberschrift.Left = (this.Width - lbl_ueberschrift.Width) / 2;

            for (int i = 1; i < SW.Statisch.GetMaxRohID(); i++)
            {
                // Bild laden
                if (Grafik.GetRohstoffIcons80px().Count >= i)
                {
                    this.Controls["btn_" + i.ToString()].BackgroundImage = Grafik.GetRohstoffIcons80px()[i];
                    ttRohstoffe.SetToolTip(this.Controls["btn_" + i.ToString()], SW.Dynamisch.GetRohstoffwithID(i).GetRohName());
                }

                // Preis laden
                this.Controls["lbl_" + i.ToString()].Text = SW.Dynamisch.GetStadtwithID(GlobalAktiveStadt).GetRohstoffPreisVonIDX(i).ToString();
                this.Controls["lbl_" + i.ToString()].Left = this.Controls["btn_" + i.ToString()].Left + (this.Controls["btn_" + i.ToString()].Width - this.Controls["lbl_" + i.ToString()].Width) / 2;
            }
        }
Exemple #3
0
        public KontrahentenForm(int modus)
        {
            InitializeComponent();

            lbl_mittelland.Font = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());

            _modus = modus;

            btn_1.BackgroundImage  = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);
            btn_2.BackgroundImage  = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);
            btn_3.BackgroundImage  = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);
            btn_4.BackgroundImage  = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);
            btn_5.BackgroundImage  = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);
            btn_6.BackgroundImage  = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);
            btn_7.BackgroundImage  = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);
            btn_8.BackgroundImage  = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);
            btn_9.BackgroundImage  = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);
            btn_10.BackgroundImage = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);

            btn_w.BackgroundImage  = new Bitmap(Conspiratio.Properties.Resources.SymbPfeilR1);
            btn_w5.BackgroundImage = new Bitmap(Conspiratio.Properties.Resources.SymbPfeilR2);
            btn_z.BackgroundImage  = new Bitmap(Conspiratio.Properties.Resources.SymbPfeilL1);
            btn_z5.BackgroundImage = new Bitmap(Conspiratio.Properties.Resources.SymbPfeilL2);

            btn_w.Left  = this.Width / 2 + 30;
            btn_w5.Left = btn_w.Left + btn_w.Width + 5;
            btn_z.Left  = this.Width / 2 - 30 - btn_z.Width;
            btn_z5.Left = btn_z.Left - 5 - btn_z5.Width;

            //Liste anfertigen
            _liste             = new int[SW.Statisch.GetMaxKIID()];
            _eintraegeProSeite = 10;
            _counter           = 0;


            //Menschliche Kontrahenten reinspeichern
            for (int i = 1; i <= SW.Dynamisch.GetAktivSpielerAnzahl(); i++)
            {
                if (i != SW.Dynamisch.GetAktiverSpieler()) //Der Spieler, der das Buch öffnet soll natürlich nicht selbst darin aufscheinen
                {
                    _liste[_counter] = i;
                    _mcounter++;
                    _counter++;
                }
            }

            //KI Kontrahenten reinspeichern
            for (int i = SW.Statisch.GetMinKIID(); i < SW.Statisch.GetMaxKIID(); i++)
            {
                _liste[_counter] = i;
                _counter++;
            }

            _maxSeite = (_counter - 1) / _eintraegeProSeite;


            EintraegeAktualisieren();
        }
Exemple #4
0
        public UntergebenenOptionen(int ID)
        {
            InitializeComponent();

            Ueberschrift.Font      = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());
            btn_d1.BackgroundImage = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);
            btn_d2.BackgroundImage = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);
            btn_d3.BackgroundImage = new Bitmap(Conspiratio.Properties.Resources.SymbUnchecked);

            OpferID       = ID;
            lbl_text.Text = "Was wollt Ihr " + SW.Dynamisch.GetSpWithID(ID).GetName() + " antun?";
        }
Exemple #5
0
        public UntergebeneForm()
        {
            InitializeComponent();

            Ueberschrift.Font      = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());
            btn_d1.BackgroundImage = new Bitmap(Properties.Resources.SymbUnchecked);
            btn_d2.BackgroundImage = new Bitmap(Properties.Resources.SymbUnchecked);
            btn_d3.BackgroundImage = new Bitmap(Properties.Resources.SymbUnchecked);
            btn_d4.BackgroundImage = new Bitmap(Properties.Resources.SymbUnchecked);
            btn_d5.BackgroundImage = new Bitmap(Properties.Resources.SymbUnchecked);
            btn_d6.BackgroundImage = new Bitmap(Properties.Resources.SymbUnchecked);
        }
Exemple #6
0
        public GesetzeAnzeigen()
        {
            InitializeComponent();

            this.Width         += 100;
            lbl_mittelland.Font = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());
            ControlZentrieren(lbl_mittelland, null, null);

            lbl_g1.Font      = Grafik.GetStandardFont(Grafik.GetSchriftgKlein());
            lbl_g2.Font      = Grafik.GetStandardFont(Grafik.GetSchriftgKlein());
            lbl_g3.Font      = Grafik.GetStandardFont(Grafik.GetSchriftgKlein());
            lbl_g4.Font      = Grafik.GetStandardFont(Grafik.GetSchriftgKlein());
            lbl_g5.Font      = Grafik.GetStandardFont(Grafik.GetSchriftgKlein());
            lbl_g6.Font      = Grafik.GetStandardFont(Grafik.GetSchriftgKlein());
            lbl_g7.Font      = Grafik.GetStandardFont(Grafik.GetSchriftgKlein());
            lbl_g8.Font      = Grafik.GetStandardFont(Grafik.GetSchriftgKlein());
            lbl_g9.Font      = Grafik.GetStandardFont(Grafik.GetSchriftgKlein());
            lbl_g10.Font     = Grafik.GetStandardFont(Grafik.GetSchriftgKlein());
            lbl_g1.AutoSize  = true;
            lbl_g2.AutoSize  = true;
            lbl_g3.AutoSize  = true;
            lbl_g4.AutoSize  = true;
            lbl_g5.AutoSize  = true;
            lbl_g6.AutoSize  = true;
            lbl_g7.AutoSize  = true;
            lbl_g8.AutoSize  = true;
            lbl_g9.AutoSize  = true;
            lbl_g10.AutoSize = true;

            btn_finanzen.BackgroundImage = new Bitmap(Properties.Resources.SymbFinanzen);
            btn_justiz.BackgroundImage   = new Bitmap(Properties.Resources.SymbJustiz);
            btn_kirche.BackgroundImage   = new Bitmap(Properties.Resources.SymbKirche);

            ControlZentrieren(btn_justiz, null, null);
            ControlZentrieren(btn_finanzen, null, btn_justiz);
            ControlZentrieren(btn_kirche, btn_justiz, null);

            _gesetzesebene = 0;

            _allgBewertung    = new string[5];
            _allgBewertung[0] = "sehr locker";
            _allgBewertung[1] = "locker";
            _allgBewertung[2] = "neutral";
            _allgBewertung[3] = "repressiv";
            _allgBewertung[4] = "sehr repressiv";

            EbenePositionieren(_gesetzesebene);
        }
Exemple #7
0
        public Transport(int sid)
        {
            InitializeComponent();

            lbl_text.Font            = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());
            btn_bild.BackgroundImage = new Bitmap(Properties.Resources.HintKaravane);

            txt_frage.Text = "Welche Karawane wollt Ihr mit \nEurem Transport beauftragen?";
            lbl_text.Left  = (this.Width - lbl_text.Width) / 2;

            _stadtID = sid;

            _aktuelleKaraID = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetKarawaneInStadtX(_stadtID);

            aktualisieren();
        }
Exemple #8
0
        public NeuesSpiel()
        {
            InitializeComponent();

            label1.Font = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());

            setAnzSpieler(1);

            btn_c_aus.ForeColor = Color.Red;
            cheaten             = false;

            btn_tf_aus.ForeColor = Color.Red;
            todesfaelle          = false;

            btn_tm_aus.ForeColor = Color.Red;
            testmodus            = false;
        }
Exemple #9
0
        public TitelVerleihForm()
        {
            InitializeComponent();
            this.TransparencyKey = Color.White;

            lbl_ueberschrift.Font = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());
            lbl_ueberschrift.Left = this.Width / 2 - lbl_ueberschrift.Width / 2;
            lbl_text.Left         = this.Width / 2 - lbl_text.Width / 2;
            int    verltitelid = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetBekamTitelX();
            string text        = "Wir, " + SW.Dynamisch.GetSpWithID(SW.Dynamisch.GetReichWithID(1).GetRegent()).GetKompletterName() + ", verfügen hiermit, dass Ihr, " + SW.Dynamisch.GetSpWithID(SW.Dynamisch.GetAktiverSpieler()).GetName() + ", Euch fortan\n\n\"" + SW.Statisch.GetTitelX(verltitelid).GetName(SW.Dynamisch.GetSpWithID(SW.Dynamisch.GetAktiverSpieler()).GetMaennlich()) + "\"\n\nnennen dürft.\n\n" + SW.Dynamisch.GetSpWithID(SW.Dynamisch.GetReichWithID(1).GetRegent()).GetKompletterName();

            lbl_text.Text = text;
            SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).SetTitel(verltitelid);

            C_Musik musik = new C_Musik();

            musik.PlaySound(Properties.Resources.fanfare);
        }
Exemple #10
0
        public KontrahentDetails(int spielerID)
        {
            InitializeComponent();

            lbl_name.Font = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());
            label2.Font   = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());
            _spielerID    = spielerID;

            lbl_name.Text = SW.Dynamisch.GetSpWithID(_spielerID).GetName();
            lbl_name.Left = (this.Width - lbl_name.Width) / 2;

            lbl_titel.Text = SW.Dynamisch.GetSpWithID(_spielerID).GetTitelGegendert();
            lbl_alter.Text = SW.Dynamisch.GetSpWithID(_spielerID).GetAlter().ToString();
            lbl_amt.Text   = SW.Dynamisch.GetSpWithID(_spielerID).GetAmtNameUndOrt();

            if (SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetAktiveSpionage(_spielerID).GetKosten() > 0 && SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetAktiveSpionage(_spielerID).GetDauer() > 1)
            {
                lbl_vermoe.Text   = SW.Dynamisch.GetSpWithID(_spielerID).GetGesamtVermoegen(_spielerID).ToString();
                lbl_ges.Text      = SW.Dynamisch.GetSpWithID(_spielerID).BeurteileGesundheitString();
                lbl_delikte.Text  = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetAktiveSpionage(_spielerID).GetDelikte().ToString();
                lbl_stand.Text    = "Stand " + SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetAktiveSpionage(_spielerID).GetJahr().ToString();
                lbl_stand.Visible = true;
            }
        }
Exemple #11
0
        public Handelszertifikat(int rohid)
        {
            InitializeComponent();

            lbl_ueberschrift.Font = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());

            string text = "";

            if (rohid < 8)
            {
                // Entweder die Stadt in der der Spieler das Amt innehat
                if (SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetAmtID() != 0 && SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetAmtID() < SW.Statisch.GetMaxAmtStadtID())
                {
                    text = " der Rat der Stadt " + SW.Dynamisch.GetStadtwithID(SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetAmtGebiet()).GetGebietsName();
                }
                // oder die Stadt, in der er eine Niederlassung besitzt
                else
                {
                    for (int i = SW.Statisch.GetMinStadtID(); i < SW.Statisch.GetMaxStadtID(); i++)
                    {
                        if (SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetSpielerHatHausVonStadtAnArraystelle(i).GetHausID() != 0)
                        {
                            text = " der Rat der Stadt " + SW.Dynamisch.GetStadtwithID(i).GetGebietsName();
                        }
                    }
                }
            }
            else if (rohid < 15)
            {
                for (int i = 1; i < SW.Statisch.GetMaxLandID(); i++)
                {
                    int LandStaedte = SW.Dynamisch.GetLandWithID(i).GetAnzahlStaedte();
                    int hauscounter = 0;

                    for (int j = 0; j < LandStaedte; j++)
                    {
                        if (SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetSpielerHatHausVonStadtAnArraystelle(SW.Dynamisch.GetLandWithID(i).GetStadtX(j)).GetHausID() != 0)
                        {
                            hauscounter++;
                        }
                    }

                    if (hauscounter >= 2)
                    {
                        text = " der Rat des Landes " + SW.Dynamisch.GetLandWithID(i).GetGebietsName();
                        break;
                    }
                }

                if (string.IsNullOrEmpty(text))
                {
                    text = " der Rat des Reichs " + SW.Dynamisch.GetReichWithID(1).GetGebietsName();
                }
            }
            else
            {
                text = " der Rat des Reichs " + SW.Dynamisch.GetReichWithID(1).GetGebietsName();
            }

            lbl_text.Text = "Aufgrund Eurer besonderen\nHandelserfolge wird Euch,\n" + SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetName() + ",\n ab heute gestattet, auch mit\n" + SW.Dynamisch.GetRohstoffwithID(rohid).GetRohName() + " zu handeln.\n \n" + text;

            C_Musik musik = new C_Musik();

            musik.PlaySound(Properties.Resources.fanfare);
        }
Exemple #12
0
        public StadtInformationen(int stadtid)
        {
            InitializeComponent();



            lbl_ueberschrift.Font = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());

            pct_c_1.BackgroundImage = Conspiratio.Properties.Resources.SymbCrime;
            pct_c_2.BackgroundImage = Conspiratio.Properties.Resources.SymbCrime;
            pct_c_3.BackgroundImage = Conspiratio.Properties.Resources.SymbCrime;
            pct_c_4.BackgroundImage = Conspiratio.Properties.Resources.SymbCrime;
            pct_c_5.BackgroundImage = Conspiratio.Properties.Resources.SymbCrime;

            pct_r_1.BackgroundImage  = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_2.BackgroundImage  = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_3.BackgroundImage  = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_4.BackgroundImage  = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_5.BackgroundImage  = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_6.BackgroundImage  = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_7.BackgroundImage  = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_8.BackgroundImage  = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_9.BackgroundImage  = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_10.BackgroundImage = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_11.BackgroundImage = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_12.BackgroundImage = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_13.BackgroundImage = Conspiratio.Properties.Resources.SymbReichtum;
            pct_r_14.BackgroundImage = Conspiratio.Properties.Resources.SymbReichtum;

            // Überschrift
            lbl_ueberschrift.Text = SW.Dynamisch.GetStadtwithID(stadtid).GetGebietsName();
            lbl_ueberschrift.Left = (this.Width - lbl_ueberschrift.Width) / 2;

            // Einwohner
            lbl_einwohner.Text = SW.Dynamisch.GetStadtwithID(stadtid).GetEinwohner().ToString();

            // Umsatzsteuer
            lbl_umsatz.Text = (SW.Dynamisch.GetStadtwithID(stadtid).GetUmsatzsteuer() * 100).ToString() + "%";

            // Kriminalität
            int counter = SW.Dynamisch.GetStadtwithID(stadtid).GetKriminalitaet();

            for (int i = 1; i <= counter; i++)
            {
                this.Controls["pct_c_" + i.ToString()].Visible = true;
            }

            // Hauptproduktion
            int[] produktion = SW.Dynamisch.GetStadtwithID(stadtid).GetHauptproduktion(6);

            for (int i = 1; i <= 3; i++)
            {
                if (Grafik.GetRohstoffIcons46px().Count >= produktion[i - 1])
                {
                    this.Controls["pct_hp_" + i.ToString()].BackgroundImage = Grafik.GetRohstoffIcons46px()[produktion[i - 1]];
                    ttRohstoffe.SetToolTip(this.Controls["pct_hp_" + i.ToString()], SW.Dynamisch.GetRohstoffwithID(produktion[i - 1]).GetRohName());
                }
            }

            // Nebenproduktion
            for (int i = 3; i < 6; i++)
            {
                if (Grafik.GetRohstoffIcons46px().Count >= produktion[i])
                {
                    this.Controls["pct_nebenproduktion_" + (i - 2).ToString()].BackgroundImage = Grafik.GetRohstoffIcons46px()[produktion[i]];
                    ttRohstoffe.SetToolTip(this.Controls["pct_nebenproduktion_" + (i - 2).ToString()], SW.Dynamisch.GetRohstoffwithID(produktion[i]).GetRohName());
                }
            }

            // Bedarf
            int[] np = SW.Dynamisch.GetStadtwithID(stadtid).GetBedarf(stadtid);

            for (int i = 1; i <= 3; i++)
            {
                if (Grafik.GetRohstoffIcons46px().Count >= np[i - 1])
                {
                    this.Controls["pct_np_" + i.ToString()].BackgroundImage = Grafik.GetRohstoffIcons46px()[np[i - 1]];
                    ttRohstoffe.SetToolTip(this.Controls["pct_np_" + i.ToString()], SW.Dynamisch.GetRohstoffwithID(np[i - 1]).GetRohName());
                }
            }

            // Werkstätten für (Rohstoffe, die in der Stadt produziert werden können)
            int[] werkstaetten = SW.Dynamisch.GetStadtwithID(stadtid).GetRohstoffe();

            for (int i = 1; i <= SW.Statisch.GetMaxWerkstaettenProStadt(); i++)
            {
                if (Grafik.GetRohstoffIcons46px().Count >= werkstaetten[i])
                {
                    this.Controls["pct_werkstatt_" + i.ToString()].BackgroundImage = Grafik.GetRohstoffIcons46px()[werkstaetten[i]];
                    ttRohstoffe.SetToolTip(this.Controls["pct_werkstatt_" + i.ToString()], SW.Dynamisch.GetRohstoffwithID(werkstaetten[i]).GetRohName());
                }
            }

            // Lagerstand
            int[] lagerstand = SW.Dynamisch.BerechneAnteilRohstoffvorratImLand(stadtid);

            for (int i = 1; i < SW.Statisch.GetMaxRohID(); i++)
            {
                if (Grafik.GetRohstoffIcons46px().Count >= i)
                {
                    ((PictureBox)this.Controls["pct_lagerstand_" + i.ToString()]).Image   = Grafik.GetRohstoffIcons46px()[i];
                    ((PictureBox)this.Controls["pct_lagerstand_" + i.ToString()]).Padding = new Padding(3);

                    if (lagerstand[i] <= 33)
                    {
                        this.Controls["pct_lagerstand_" + i.ToString()].BackColor = System.Drawing.Color.DarkRed;
                        ttRohstoffe.SetToolTip(this.Controls["pct_lagerstand_" + i.ToString()], SW.Dynamisch.GetRohstoffwithID(i).GetRohName() + " (niedrig)");
                    }
                    else if (lagerstand[i] <= 66)
                    {
                        this.Controls["pct_lagerstand_" + i.ToString()].BackColor = System.Drawing.Color.Orange;
                        ttRohstoffe.SetToolTip(this.Controls["pct_lagerstand_" + i.ToString()], SW.Dynamisch.GetRohstoffwithID(i).GetRohName() + " (normal)");
                    }
                    else
                    {
                        this.Controls["pct_lagerstand_" + i.ToString()].BackColor = System.Drawing.Color.DarkGreen;
                        ttRohstoffe.SetToolTip(this.Controls["pct_lagerstand_" + i.ToString()], SW.Dynamisch.GetRohstoffwithID(i).GetRohName() + " (hoch)");
                    }
                }
            }

            ////Katastrohpen
            //int[] ks = SW.Dynamisch.getStadtwithID(stadtid).getKatastrophen();

            //int k_count = 0;
            //for (int i = 0; i < SW.Dynamisch.getMaxKatastrohpen(); i++)
            //{
            //    if (ks[i] != 0)
            //    {
            //        SwitchKatastrophen("pct_kat_" + k_count.ToString(), i + 1);
            //        //this.Controls["pct_kat_" + k_count.ToString()].Visible = true;
            //        k_count++;
            //    }
            //}

            // Reichtum
            int reich = SW.Dynamisch.GetStadtwithID(stadtid).GetReichtum();

            for (int i = 1; i <= reich; i++)
            {
                this.Controls["pct_r_" + i.ToString()].Visible = true;

                if (reich <= 7)
                {
                    this.Controls["pct_r_" + i.ToString()].Top += 13;
                }
            }
        }
Exemple #13
0
        public Cheatbox()
        {
            InitializeComponent();

            foreach (Control C in this.Controls)
            {
                try
                {
                    C.Font = Grafik.GetStandardFont(Grafik.GetSchriftgKlein());
                }
                catch { }
            }
            lbl_header_28.Font = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());
            lbl_header_28.Left = (this.Width - lbl_header_28.Width) / 2;

            txt_goldd.Text = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetTaler().ToString();
            txt_ans.Text   = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetPermaAnsehen().ToString();

            for (int i = 1; i < SW.Statisch.GetMaxRohID(); i++)
            {
                groupBox_1_16.Controls["ckb" + i.ToString()].Text = SW.Dynamisch.GetRohstoffwithID(i).GetRohName();

                if (SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetRohstoffrechteX(i) == true)
                {
                    switch (i)
                    {
                    case 1:
                        ckb1.Checked = true;
                        break;

                    case 2:
                        ckb2.Checked = true;
                        break;

                    case 3:
                        ckb3.Checked = true;
                        break;

                    case 4:
                        ckb4.Checked = true;
                        break;

                    case 5:
                        ckb5.Checked = true;
                        break;

                    case 6:
                        ckb6.Checked = true;
                        break;

                    case 7:
                        ckb7.Checked = true;
                        break;

                    case 8:
                        ckb8.Checked = true;
                        break;

                    case 9:
                        ckb9.Checked = true;
                        break;

                    case 10:
                        ckb10.Checked = true;
                        break;

                    case 11:
                        ckb11.Checked = true;
                        break;

                    case 12:
                        ckb12.Checked = true;
                        break;

                    case 13:
                        ckb13.Checked = true;
                        break;

                    case 14:
                        ckb14.Checked = true;
                        break;

                    case 15:
                        ckb15.Checked = true;
                        break;

                    case 16:
                        ckb16.Checked = true;
                        break;

                    case 17:
                        ckb17.Checked = true;
                        break;

                    case 18:
                        ckb18.Checked = true;
                        break;

                    case 19:
                        ckb19.Checked = true;
                        break;

                    case 20:
                        ckb20.Checked = true;
                        break;

                    case 21:
                        ckb21.Checked = true;
                        break;
                    }

                    groupBox_1_16.Controls["ckb" + i.ToString()].Enabled = false;
                }
            }

            //Amt übernehmen: Stufe
            for (int i = 0; i < 3; i++)
            {
                comboBox1.Items.Add((SW.Statisch.GetStufenNameX(i).ToString()));
            }

            //Haus bauen: Stadt
            for (int i = 1; i < SW.Statisch.GetMaxStadtID(); i++)
            {
                comboBox6.Items.Add(SW.Dynamisch.GetStadtwithID(i).GetGebietsName());
            }
        }
Exemple #14
0
        public Abrechnung(ref Label lblgold)
        {
            InitializeComponent();


            label1.Font = Grafik.GetStandardFont(Grafik.GetSchriftgRiesig());

            _lblTaler = lblgold;
            int Gesamtkosten = 0;

            #region Arbeiter-, Betriebs- und Transportkosten
            int Arbeiterkosten  = 0;
            int Betriebskosten  = 0;
            int Transportkosten = 0;

            //Von jeder Stadt
            for (int i = 1; i < SW.Statisch.GetMaxStadtID(); i++)
            {
                //und jedem Slot berechnen
                for (int j = 0; j < SW.Statisch.GetMaxProdSlots(); j++)
                {
                    if (SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetTaetigkeit() == 1)
                    {
                        int rohid    = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetProduktionRohstoff();
                        int a_preis  = SW.Dynamisch.GetRohstoffwithID(rohid).GetWSArbeiterpreis();
                        int a_kosten = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetProduktionArbeiter() * a_preis;
                        Arbeiterkosten += a_kosten;
                        a_kosten        = 0;
                        a_preis         = 0;

                        int p_preis  = SW.Dynamisch.GetRohstoffwithID(rohid).GetWSEinzelpreis();
                        int p_kosten = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetProduktionStaetten() * p_preis;
                        Betriebskosten += p_kosten;
                        p_preis         = 0;
                        p_kosten        = 0;
                    }

                    if (SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetTaetigkeit() == 2 || SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetTaetigkeit() == 3)
                    {
                        int anz_exp = 0;
                        int kara_id = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetKarawaneInStadtX(i);
                        int karaPreisPro100Stueck = SW.Statisch.GetKarawane(kara_id).PreisProStueck;
                        int karaGrundPreis        = SW.Statisch.GetKarawane(kara_id).Fixpreis;

                        anz_exp = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetVerkaufAnzahl();


                        if (anz_exp != 0)
                        {
                            double d_bruch    = (anz_exp - 1) / SW.Statisch.GetKarawane(kara_id).Kapazitaet; //anz_exp-1 weil: Damit bei 400 Waren noch 4 Karren und nicht 5 genommen werden
                            double anz_fuhren = Convert.ToInt32(d_bruch) + 1;                                //Da immer abgerundet wird

                            Transportkosten += Convert.ToInt32(karaGrundPreis + karaPreisPro100Stueck * anz_fuhren);
                        }
                    }
                }
            }

            Gesamtkosten        += Arbeiterkosten;
            lbl_k_arbeiter.Text  = Arbeiterkosten.ToStringGeld(false);
            Gesamtkosten        += Betriebskosten;
            lbl_k_betriebs.Text  = Betriebskosten.ToStringGeld(false);
            Gesamtkosten        += Transportkosten;
            lbl_k_transport.Text = Transportkosten.ToStringGeld(false);
            #endregion

            #region Verkaufssteuern
            int verkaufssteuern = 0;

            for (int i = 1; i < SW.Statisch.GetMaxStadtID(); i++)
            {
                double umsatzsteuerInStadtI = SW.Dynamisch.GetStadtwithID(i).GetUmsatzsteuer();
                int    umsatzInStadtI       = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetUmsatzInStadtX(i);

                verkaufssteuern += Convert.ToInt32(umsatzsteuerInStadtI * umsatzInStadtI);
            }

            double steuerhinterziehung = 0;
            if (SW.Dynamisch.GetAktHum().CheckPrivilegX(27) == true)
            {
                steuerhinterziehung = 0.2;
            }
            if (SW.Dynamisch.GetAktHum().CheckPrivilegX(28) == true)
            {
                steuerhinterziehung = 0.4;
            }
            if (SW.Dynamisch.GetAktHum().CheckPrivilegX(29) == true)
            {
                steuerhinterziehung = 0.6;
            }

            Gesamtkosten += Convert.ToInt32(verkaufssteuern * (1 - steuerhinterziehung));
            lbl_k_verkaufssteuern.Text = verkaufssteuern.ToStringGeld(false);
            #endregion

            #region Informanten
            int Informantenkosten = 0;

            for (int i = 1; i < SW.Statisch.GetMaxKIID(); i++)
            {
                Informantenkosten += SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetAktiveSpionage(i).GetKosten();
            }

            Gesamtkosten          += Informantenkosten;
            lbl_k_Informanten.Text = Informantenkosten.ToStringGeld(false);
            #endregion

            #region Saboteure
            int Saboteurekosten = 0;

            for (int i = 1; i < SW.Statisch.GetMaxKIID(); i++)
            {
                Saboteurekosten += SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetAktiveSabotage(i).GetKosten();
            }

            Gesamtkosten        += Saboteurekosten;
            lbl_k_Saboteure.Text = Saboteurekosten.ToStringGeld(false);
            #endregion

            #region Kreditzinsen
            int Kreditzinsenkosten = 0;

            for (int i = 0; i < SW.Statisch.GetMaxKredite(); i++)
            {
                if (SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetKreditMitID(i).GetTaler() != 0)
                {
                    int    goldstke = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetKreditMitID(i).GetTaler();
                    double zins     = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetKreditMitID(i).GetZinsen();
                    zins = zins / 100;
                    double tsum = goldstke * zins;
                    Kreditzinsenkosten += Convert.ToInt32(tsum);
                }
            }

            lbl_k_kreditzinsen.Text = Kreditzinsenkosten.ToStringGeld(false);
            Gesamtkosten           += Kreditzinsenkosten;
            #endregion

            #region Kirchenzehnt

            int Kirchenzehntkosten = 0;

            int GesamtUmsatz = 0;
            if (SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).CheckPrivilegX(16) == false)
            {
                for (int i = 1; i < SW.Statisch.GetMaxStadtID(); i++)
                {
                    GesamtUmsatz += SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetUmsatzInStadtX(i);
                }
            }
            Kirchenzehntkosten      = Convert.ToInt32(SW.Statisch.GetKirchenzehnt() * GesamtUmsatz);
            lbl_k_kirchenzehnt.Text = Kirchenzehntkosten.ToStringGeld(false);
            Gesamtkosten           += Kirchenzehntkosten;
            #endregion

            #region Zoelle
            int zollkosten = 0;

            for (int j = 0; j < SW.Statisch.GetMaxProdSlots(); j++)
            {
                for (int i = 1; i < SW.Statisch.GetMaxStadtID(); i++)
                {
                    //Überprüfen ob Exportieren eingestellt ist
                    if (SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetTaetigkeit() == 2 || SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetTaetigkeit() == 3)
                    {
                        //Exportierter Rohstoff in Stadt i
                        int rohNr = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetVerkaufRohstoff();

                        //Rohstoff mit rohNr wurde exportiert
                        int anzahl    = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetVerkaufAnzahl();
                        int zielstadt = SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).GetProduktionsslot(i, j).GetVerkaufStadt();

                        //Zollkosten berechnen
                        int startland     = SW.Dynamisch.GetStadtwithID(i).GetLandID();
                        int zielland      = SW.Dynamisch.GetStadtwithID(zielstadt).GetLandID();
                        int rohgrundpreis = SW.Dynamisch.GetRohstoffwithID(rohNr).GetPreisStd();
                        int grundumsatz   = rohgrundpreis * anzahl;

                        //Dann wird mindestens eine Grenze überschritten
                        if (startland != zielland)
                        {
                            double zollsatz1 = SW.Dynamisch.GetZollburgWithIDx(SW.Dynamisch.GetLandWithID(startland).GetZollburgIndex()).Zoll;
                            double zollsatz2 = SW.Dynamisch.GetZollburgWithIDx(SW.Dynamisch.GetLandWithID(zielland).GetZollburgIndex()).Zoll;

                            if (SW.Dynamisch.GetZollburgWithIDx(SW.Dynamisch.GetLandWithID(startland).GetZollburgIndex()).Besitzer == SW.Dynamisch.GetAktiverSpieler())
                            {
                                zollsatz1 = 0;
                            }
                            else
                            {
                                SW.Dynamisch.GetSpWithID(SW.Dynamisch.GetZollburgWithIDx(SW.Dynamisch.GetLandWithID(startland).GetZollburgIndex()).Besitzer).ErhoeheTaler(Convert.ToInt32(zollsatz1 * grundumsatz));
                            }

                            if (SW.Dynamisch.GetZollburgWithIDx(SW.Dynamisch.GetLandWithID(zielland).GetZollburgIndex()).Besitzer == SW.Dynamisch.GetAktiverSpieler())
                            {
                                zollsatz2 = 0;
                            }
                            else
                            {
                                SW.Dynamisch.GetSpWithID(SW.Dynamisch.GetZollburgWithIDx(SW.Dynamisch.GetLandWithID(zielland).GetZollburgIndex()).Besitzer).ErhoeheTaler(Convert.ToInt32(zollsatz2 * grundumsatz));
                            }

                            double geszollsatz = zollsatz1 + zollsatz2;
                            zollkosten += Convert.ToInt32(geszollsatz * grundumsatz);
                        }
                    }
                }
            }

            //Privilegien
            if (SW.Dynamisch.GetAktHum().CheckPrivilegX(23) == true)
            {
                zollkosten = 0;
            }
            if (SW.Dynamisch.GetAktHum().CheckPrivilegX(31) == true)
            {
                if (SW.Statisch.Rnd.Next(0, 2) == 0)
                {
                    zollkosten = 0;
                }
            }

            Gesamtkosten += zollkosten;

            lbl_k_zoelle.Text = zollkosten.ToStringGeld(false);

            for (int i = 1; i < SW.Statisch.GetMaxStadtID(); i++)
            {
                SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).SetUmsatzInStadtX(0, i);
            }
            #endregion

            #region Sold

            int Sold = 0;

            foreach (Stuetzpunkt oStuetzpunkt in SW.Dynamisch.GetStuetzpunkte())
            {
                if (oStuetzpunkt.Besitzer == SW.Dynamisch.GetAktiverSpieler())
                {
                    foreach (Einheit oEinheit in oStuetzpunkt.Einheiten)
                    {
                        Sold += oEinheit.Basispreis;
                    }
                }
            }

            lbl_k_sold.Text = Sold.ToStringGeld(false);
            Gesamtkosten   += Sold;
            #endregion

            #region Gesamtkosten
            lbl_k_gesamt.Text = Gesamtkosten.ToStringGeld(false);
            UI.TalerAendern(-Gesamtkosten, ref lblgold);
            #endregion

            #region Umsaetze des Spielers wieder auf 0 setzen
            for (int i = 1; i < SW.Statisch.GetMaxStadtID(); i++)
            {
                SW.Dynamisch.GetHumWithID(SW.Dynamisch.GetAktiverSpieler()).SetUmsatzInStadtX(0, i);
            }
            #endregion
        }