private void GetSummons(ISlotHolder sh, List <Summon> list) { for (int i = 0; i < sh.Links; i++) { Materia left = sh.Slots[i * 2]; Materia right = sh.Slots[(i * 2) + 1]; if (left is SummonMateria && right is SupportMateria) { Materia temp = left; left = right; right = temp; } if (right is SummonMateria && left is SupportMateria) { bool replace = false; for (int j = 0; j < list.Count; j++) { if (list[j].Name == right.Name) { replace = true; Summon ss = list[j]; ss.AddAbility((SupportMateria)left); list[j] = ss; } } if (!replace) { Summon t = new Summon(right.Name, ((SummonMateria)right)); t.AddAbility((SupportMateria)left); list.Add(t); } } else { if (right is SummonMateria) { list.Add(new Summon(right.Name, ((SummonMateria)right))); } if (left is SummonMateria) { list.Add(new Summon(left.Name, ((SummonMateria)left))); } } } for (int j = sh.Links * 2; j < sh.Slots.Length; j++) { Materia m = sh.Slots[j]; if (m is SummonMateria) { list.Add(new Summon(m.Name, (SummonMateria)m)); } } }
protected override void DrawContents(Gdk.Drawable d) { Cairo.Context g = Gdk.CairoHelper.Create(d); g.SelectFontFace("Lucida Console", FontSlant.Normal, FontWeight.Bold); g.SetFontSize(24); TextExtents te; Summon s = Game.Battle.Commanding.SummonMenu.Selected; int row = 0; if (!String.IsNullOrEmpty(s.ID)) { string cost = s.Spell.Cost.ToString(); Graphics.ShadowedText(g, "MP Req", X + x1, Y + y0); row++; cost = cost + "/"; te = g.TextExtents(cost); Graphics.ShadowedText(g, cost, X + x2 - te.Width, Y + y0 + (row * ys)); string tot = Game.Battle.Commanding.MP.ToString(); te = g.TextExtents(tot); Graphics.ShadowedText(g, tot, X + x3 - te.Width, Y + y0 + (row * ys)); row++; if (s.AddedAbility.Contains(AddedAbility.All)) { string msg = "All x"; msg += s.AllCount.ToString(); Graphics.ShadowedText(g, msg, X + x0, Y + y0 + (row * ys)); row++; } if (s.AddedAbility.Contains(AddedAbility.QuadraMagic)) { string msg = "Q-Magic x"; msg += s.QMagicCount.ToString(); Graphics.ShadowedText(g, msg, X + x0, Y + y0 + (row * ys)); row++; } } ((IDisposable)g.Target).Dispose(); ((IDisposable)g).Dispose(); }
public static int Compare(Summon left, Summon right) { return Spell.Compare(left.Spell, right.Spell); }
public static int Compare(Summon left, Summon right) { return(Spell.Compare(left.Spell, right.Spell)); }