private void KaempfeWennMoeglich(int buttonIndex)
        {
            if (Kampf != null)
            {
                if (Kampf.IstZuende)
                {
                    Kampf?.ContinueWin();
                    Kampf = null;
                }
                else
                {
                    switch (buttonIndex)
                    {
                    case 0:
                        Kampf.Button1Angriff();
                        break;

                    case 1:
                        Kampf.Button2Magie();
                        break;

                    case 2:
                        if (ListBoxInventar.SelectedItem is Item selectedItem)
                        {
                            Kampf.Button3Item(selectedItem);
                        }
                        break;
                    }

                    if (Kampf.IstZuende)
                    {
                        if (AktuellerHeld.Lebenspunkte <= 0)
                        {
                            if (Kampf.ContinueTot != null)
                            {
                                Kampf.ContinueTot();
                            }
                            else
                            {
                                WriteText("Du bist im Kampf gestorben!");
                            }

                            SpielZuende();
                        }
                        else
                        {
                            SetButtonsText("Kampf beenden");
                        }
                    }
                }
            }
        }
Example #2
0
        public static void beginnKampf()
        {
            Schnittstelle st = new Schnittstelle();
            Kampf k = new Kampf(st);

            k.Add(getChara("Andrej Ilitsch Kalinin"), "Spieler");
            k.Add(getChara("Maximilian Koelbe"), "Spieler");
            k.Add(getChara("Claude Delacroix"), "Spieler");
            k.Add(getChara("Brigitte Westerkamp"), "Spieler");

            st.SetKampf(k);

            st.ShowDialog();
        }
Example #3
0
        public MainViewModel()
        {
            WarhammerKampf     = new Kampf();
            this.AddGegCommand = new UserCommand(new Action <object>(AddGegner));

            this.AddCharCommand = new UserCommand(new Action <object>(AddCharakter));

            this.NaechsterCommand = new UserCommand(new Action <object>(Naechster));

            this.AngriffsCommand = new UserCommand(new Action <object>(Angriff));
            this.ButtonWuerfeln  = new UserCommand(new Action <object>(Wuerfeln));

            this.RemoveCommand = new UserCommand(new Action <object>(Remove));
        }
Example #4
0
 public override void Execute(Kampf Kampf)
 {
     Start();
     Kampf.Gui.ZieheFigur(this);
 }
Example #5
0
 public void SetKampf(Kampf Kampf)
 {
     this.Kampf = Kampf;
 }
Example #6
0
 public void SetKampf(Kampf Kampf)
 {
     this.Grafik.SetKampf(Kampf);
 }
Example #7
0
 public Gegner(Kampf kampf, int gegnernummer)
 {
     gegnerKarte = new GegnerKarte(gegnernummer, kampf);
 }
Example #8
0
 public void SetKampf(Kampf Kampf)
 {
     if (this.MyZustand != Zustand.KeinKampf)
         throw new NotImplementedException();
     this.MyZustand = Zustand.Bereit;
     this.Kampf = Kampf;
     this.KampfBild.SetKampf(Kampf);
     this.ShowMenu(StartMenu);
     Timer.Enabled = true;
     UpdateKampf();
 }