public static Technik CreateMacht(Talent MachtTalent, Fertigkeit Fertigkeit) { Technik t = new Technik(); t.Art = Kategorie.Metamagie; t.Desc = MachtTalent.Desc; t.Flags.Add("Macht"); t.Flags.Add(Fertigkeit.Name); t.Name = "Macht:_" + Fertigkeit.Name; return t; }
private void CreatePaar(Fertigkeit Fertigkeit) { Gelernt++; Button A = new Button(); A.AutoSize = true; A.Text = "Entfernen"; Label B = new Label(); B.AutoSize = true; B.Text = Fertigkeit.SchreibName; B.Font = new System.Drawing.Font("Calibri", 13); ControlPaar cp = new ControlPaar(A, B); Liste.Add(cp); Fertigkeiten.Add(Fertigkeit); A.Click += (sender, e) => { Gelernt--; Liste.Remove(cp); Fertigkeiten.Remove(Fertigkeit); UpdateInfo(); }; }
public Tabular GetTabelle(CharakterMan Charakter) { Abbildung<Attribut, int> w0 = Charakter.Charakter.Super.Attribute.Attribute; Abbildung<Attribut, int> w = Charakter.Statisch.Attribute.FinalWert.Value(); Abbildung<Fertigkeit, int> f0 = Charakter.Charakter.Super.GetGrundwerteFertigkeiten(Charakter.Stufe); Tabular t = new Tabular(9); bool Master = Charakter.Stufe > Universe.CharakterDaten.StufenBachelor; IEnumerable<Fertigkeit> z = Charakter.Charakter.Super.Fertigkeiten.GetGelernteFertigkeiten(Master, Universe.CharakterDaten); Pen p = Pens.Black; int n = 0; int l = 0; int m = 0; Fertigkeit[][] fert = new Fertigkeit[3][]; Attribut[] att = Universe.Attribute.GetElemente("Stärke", "Geschick", "Charisma"); fert.CountMap(i => { IEnumerable<Fertigkeit> y = z.Where(x => x.Attribut == att[i]); n = Math.Max(n, y.Count()); return y.ToArray(); }); t.addRow(n + 1, p); for (int c = 0; c < 3; c++) { t[m, c * 3 + 0] = att[c].SchreibName; t[m, c * 3 + 1] = w0[att[c]] + ""; t[m, c * 3 + 2] = w[att[c]] + ""; } for (m = 1; m < n + 1; m++) for (int c = 0; c < 3; c++) if (m < fert[c].Length) { Fertigkeit f = fert[c][m]; t[m, c * 3 + 0] = f.SchreibName; t[m, c * 3 + 1] = f0[f] + ""; t[m, c * 3 + 2] = Charakter.FertigkeitsWert(f) + ""; } m = n + 1; att = Universe.Attribute.GetElemente("Intelligenz", "Intuition", "Wahrnehmung"); fert.CountMap(i => { IEnumerable<Fertigkeit> y = z.Where(x => x.Attribut == att[i]); l = Math.Max(l, y.Count()); return y.ToArray(); }); t.addRow(l + 1, p); for (int c = 0; c < 3; c++) { t[m, c * 3 + 0] = att[c].SchreibName; t[m, c * 3 + 1] = w[att[c]] + ""; t[m, c * 3 + 2] = w0[att[c]] + ""; } for (m = n + 2; m < n + l + 2; m++) for (int c = 0; c < 3; c++) if (m < fert[c].Length) { Fertigkeit f = fert[c].ElementAt(m); t[m, c * 3 + 0] = f.SchreibName; t[m, c * 3 + 1] = Charakter.FertigkeitsWert(f) + ""; t[m, c * 3 + 2] = f0[f] + ""; } return t; }
public bool FertigkeitValid(Fertigkeit Fertigkeit, int Stufe, CharakterErstellungsDaten Daten) { return FertigkeitsSummen[Stufe - 1][Fertigkeit] <= Daten.GetMaximalerFertigkeitswert(Stufe); }
public bool KannErhohen(Fertigkeit Fertigkeit, int Stufe, CharakterErstellungsDaten Daten) { if (FertigkeitsSummen[Stufe - 1][Fertigkeit] >= Daten.GetMaximalerFertigkeitswert(Stufe)) return false; for (int i = Stufe - 1; i < Stufen; i++) if (!(Fertigkeit.Kosten <= Frei[i])) return false; return true; }
public int GetFertigkeit(Fertigkeit Fertigkeit, int Stufe) { return FertigkeitsSummen[Stufe - 1][Fertigkeit]; }
public void SetFertigkeit(Fertigkeit Fertigkeit, int Stufe, int Wert) { int Alt = FertigkeitsWerte[Stufe - 1][Fertigkeit]; FertigkeitsWerte[Stufe - 1][Fertigkeit] = Wert; int d = Wert - Alt; for (int i = Stufe - 1; i < Stufen; i++) FertigkeitsSummen[i][Fertigkeit] += d; PreKosten[Stufe - 1].Add(Fertigkeit.Kosten * d); CalculateKosten(); }
public bool KannFertigkeit(Fertigkeit Fertigkeit) { return Charakter.Super.Fertigkeiten.GetGelernteFertigkeiten (Stufe > Charakter.Universe.CharakterDaten.StufenBachelor, Charakter.Universe.CharakterDaten) .Contains(Fertigkeit); }
/// <summary> /// Dynamisch /// </summary> /// <param name="Fertigkeit"></param> /// <returns></returns> public int FertigkeitsWert(Fertigkeit Fertigkeit) { return Dynamisch.Fertigkeiten.FinalWert.Value().Get(Fertigkeit); }
public bool HatMasterFertigkeit(Fertigkeit Fertigkeit) { return Klassen.Master != null && Klassen.Master.Fertigkeiten.Contains(Fertigkeit); }
public bool HatBachelorFertigkeit(Fertigkeit Fertigkeit) { return Klassen.Bachelor != null && Klassen.Bachelor.Fertigkeiten.Contains(Fertigkeit); }