public static AttaqueChoisie TypeAttaquePersonnage(Personnage perso) { var attType = new ClasseTypeAttaque { AttaqueArme = 60, AttaqueSort = 40, Item = 10 }; switch (perso.Race) { case PersonnageRace.Humain: attType = TypeAttSwitchClasse(perso.Classe, attType); break; case PersonnageRace.Nain: attType = TypeAttSwitchClasse(perso.Classe, attType); break; case PersonnageRace.Elfe: attType = TypeAttSwitchClasse(perso.Classe, attType); break; } attType.RandomType(); return(attType.Choix); }
public static ClasseTypeAttaque TypeAttSwitchClasse(PersonnageClasse perso, ClasseTypeAttaque chances) { switch (perso) { case PersonnageClasse.Barbare: break; case PersonnageClasse.Guerrier: break; case PersonnageClasse.Magicien: break; } return(chances); }