Exemplo n.º 1
0
 public override  bool FinirQuete(Personnage p)
 {
     if (p.Position.X == zoneATrouver.X  && p.Position.Y == zoneATrouver.Y)
     {
         fini = true;
         return true;
     }
     else
         return false;
 }
Exemplo n.º 2
0
 public override bool FinirQuete(Personnage p)
 {
     if (p.Objets.Contains(objetATrouver))
     {
         fini = true;
         return true;
     }
     
     return false;
 }
Exemplo n.º 3
0
 public override bool Utilisation(Personnage p, Equipe e)
 {
     foreach (Quete qq in e.Quetes)
     {
         if (qq.Type == TypeQuete.TrouverObjetChacun || qq.Type == TypeQuete.TrouverObjetUnique)
         {
             QueteObjet q = (QueteObjet)qq;
             return q.FinirQuete(p);
         }
     }
     return false;
 }
Exemplo n.º 4
0
        //-----------------------------------------------------------------------------
        public string Combattre(Personnage p)
        {
            string res = "";

            if (ComportementCombat != null)
            {
                res += ComportementCombat.Combattre(p);
            }

            if (p.ComportementCombat != null)
            {
                res = res + "/n" + p.ComportementCombat.Combattre(this);
            }

            return(res);
        }
        public void tour(Personnage p)
        {
            try
            {
                if (p.etat == Etat.mort || p.PointsDeVie <= 0)
                {
                    return;
                }

                Application.Current.Dispatcher.BeginInvoke(handler, p.Afficher() + ":");
                Application.Current.Dispatcher.BeginInvoke(handler, "\t" + p.SeDeplacer(game.Plateau));

                string r = Combattre();
                if (!string.IsNullOrEmpty(r))
                {
                    Application.Current.Dispatcher.BeginInvoke(handler, "\t" + r);
                }

                if (p.etat != Etat.mort)
                {
                    if (p.equipe == TypeEquipe.Rouge)
                    {
                        Application.Current.Dispatcher.BeginInvoke(handler, "\t" + p.RamasserObjets(game.Plateau.GetZone(p.Position), game.EquipeRouge.Quetes));
                    }
                    else
                    {
                        Application.Current.Dispatcher.BeginInvoke(handler, "\t" + p.RamasserObjets(game.Plateau.GetZone(p.Position), game.EquipeVerte.Quetes));
                    }
                    r = "";
                    r = UseObjets();

                    if (!string.IsNullOrEmpty(r))
                    {
                        Application.Current.Dispatcher.BeginInvoke(handler, "\t" + r);
                    }

                    Application.Current.Dispatcher.BeginInvoke(handler, " ----------------------");
                }
            }
            catch (Exception) { }
        }
Exemplo n.º 6
0
 public override bool Utilisation(Personnage p, Equipe e)
 {
     p.PointsDeVie = p.PointsDeVie + plusvie;
     return(true);
 }
Exemplo n.º 7
0
 public abstract  bool FinirQuete(Personnage p);
Exemplo n.º 8
0
        public void tour(Personnage p)
        {
            try
            {
                if (p.etat == Etat.mort || p.PointsDeVie <= 0)
                    return;

                Application.Current.Dispatcher.BeginInvoke(handler, p.Afficher() + ":");
                Application.Current.Dispatcher.BeginInvoke(handler, "\t" + p.SeDeplacer(game.Plateau));

                string r = Combattre();
                if (!string.IsNullOrEmpty(r))
                    Application.Current.Dispatcher.BeginInvoke(handler, "\t" + r);

                if (p.etat != Etat.mort)
                {
                    if( p.equipe == TypeEquipe.Rouge)
                        Application.Current.Dispatcher.BeginInvoke(handler, "\t" + p.RamasserObjets(game.Plateau.GetZone(p.Position), game.EquipeRouge.Quetes));
                    else
                        Application.Current.Dispatcher.BeginInvoke(handler, "\t" + p.RamasserObjets(game.Plateau.GetZone(p.Position), game.EquipeVerte.Quetes));
                    r = "";
                    r = UseObjets();

                    if (!string.IsNullOrEmpty(r))
                        Application.Current.Dispatcher.BeginInvoke(handler, "\t" + r);

                    Application.Current.Dispatcher.BeginInvoke(handler, " ----------------------");
                }
            }
            catch (Exception) { }
        }
Exemplo n.º 9
0
        //-----------------------------------------------------------------------------
        public string Combattre(Personnage p)
        {
            string res = "";

            if (ComportementCombat != null)
                res += ComportementCombat.Combattre(p);

            if (p.ComportementCombat != null)
                res = res + "/n" + p.ComportementCombat.Combattre(this);

            return res;
        }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     p = (Personnage) cbType.SelectedItem;
     this.Close();
 }
 //TypeEquipe equipe;
 public PopUpPersonnage(Personnage _p)
 {
     InitializeComponent();
     p=_p;
 }
Exemplo n.º 12
0
 public abstract bool FinirQuete(Personnage p);
Exemplo n.º 13
0
 public override bool Utilisation(Personnage p, Equipe e)
 {
     p.PointsDeVie = p.PointsDeVie + plusvie;
     return true;
 }
Exemplo n.º 14
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     p = (Personnage)cbType.SelectedItem;
     this.Close();
 }
Exemplo n.º 15
0
        //TypeEquipe equipe;

        public PopUpPersonnage(Personnage _p)
        {
            InitializeComponent();
            p = _p;
        }