public override bool FinirQuete(Personnage p) { if (p.Position.X == zoneATrouver.X && p.Position.Y == zoneATrouver.Y) { fini = true; return true; } else return false; }
public override bool FinirQuete(Personnage p) { if (p.Objets.Contains(objetATrouver)) { fini = true; return true; } return false; }
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; }
//----------------------------------------------------------------------------- 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) { } }
public override bool Utilisation(Personnage p, Equipe e) { p.PointsDeVie = p.PointsDeVie + plusvie; return(true); }
public abstract bool FinirQuete(Personnage p);
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) { } }
//----------------------------------------------------------------------------- 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; }
public override bool Utilisation(Personnage p, Equipe e) { p.PointsDeVie = p.PointsDeVie + plusvie; return true; }
private void Button_Click(object sender, RoutedEventArgs e) { p = (Personnage)cbType.SelectedItem; this.Close(); }
//TypeEquipe equipe; public PopUpPersonnage(Personnage _p) { InitializeComponent(); p = _p; }