Beispiel #1
0
 public Hero(    string name, int hpMax, int mpMax, int attack, 
                 int defense, int agility, bool canAttack, bool canDefend, 
                 bool canUseSkills, Weapon weapon, Armor armor, Jewel jewel,
                 List<Skill> skills, HeroesTeam team)
     : base(name, hpMax, mpMax, attack, defense, agility, canAttack, canDefend, canUseSkills)
 {
     Equip(weapon);
     Equip(armor);
     Equip(jewel);
     Skills = skills;
     JoinTeam(team);
 }
Beispiel #2
0
 public void JoinTeam(HeroesTeam team)
 {
     //à compléter...?
     bool canJoin = team.AddHero(this);
     if(canJoin)
     {
         Team = team;
     }
     else
     {
         //message d'erreur?
         ConsoleView.PrintError(name + " ne peut pas rejoindre l'équipe "
                                     + "car elle est déjà pleine.");
     }
 }