public BattleState() { _clock = new ScaledClock(Globals.BattleSpeed); _allies = new Ally[3]; if (Globals.Party[0] != null) { _allies[0] = new Ally(Globals.Party[0], 550, 100, 2000); } if (Globals.Party[1] != null) { _allies[1] = new Ally(Globals.Party[1], 580, 200, 2500); } if (Globals.Party[2] != null) { _allies[2] = new Ally(Globals.Party[2], 610, 300, 2300); } if (_allies[0] == null && _allies[1] == null && _allies[2] == null) { throw new GamedataException("Must have at least one ally in battle."); } int numberOfEnemies = 1;//Game.Random.Next(1, 3); //_enemies = new List<Enemy>(numberOfEnemies); //for (int i = 0; i < numberOfEnemies; i++) // _enemies.Add(Enemy.GetRandomEnemy(Game.Random.Next(100, 250), Game.Random.Next(100, 300))); _enemies = new List <Enemy>(); _enemies.Add(new Enemy("mothslasher")); _turnQueue = new Queue <Ally>(); _abilityQueue = new Queue <AbilityState>(); _abilityMutex = new Mutex(); _gainedItems = new List <IItem>(); }
public void StealItem(Ally thief) { int diff = 40 + Level - thief.Level; int stealMod = 512 * diff / 100; foreach (EnemyItem item in _steal) { int chance = item.Chance * stealMod / 256; int r = Game.Random.Next(64); if (r <= chance) { Inventory.AddToInventory(item.Item); _steal.Clear(); return; } } //if (_steal.Count == 0) // ; // Nothing to steal //else ; // Couldn't steal anything }
public BattleMenu(Ally a) : base( Globals.WIDTH / 4, Globals.HEIGHT * 7 / 10 + 10, Globals.WIDTH / 5, Globals.HEIGHT * 5 / 20 - 6) { Visible = false; // Always an option #region Item Menu foreach (Materia m in a.Materia) { if (m != null && m.Name == "W-Item") { _witem = true; } } #endregion Item Menu // iterate through options int o = 0; #region Attack foreach (Materia m in a.Materia) { if (m != null) { if (m.ID == "doublecut") { if (m.Level == 0) { _doubleCutOption2 = o; _doubleCutOption4 = -1; } else { _doubleCutOption4 = o; _doubleCutOption2 = -1; } _slashAllOption = -1; _flashOption = -1; } else if (m.ID == "slashall") { if (m.Level == 0) { _slashAllOption = o; _flashOption = -1; } else { _flashOption = o; _slashAllOption = -1; } _doubleCutOption2 = -1; _doubleCutOption4 = -1; } } } if (_doubleCutOption2 == -1 && _doubleCutOption4 == -1 && _slashAllOption == -1 && _flashOption == -1) { _attackOption = o; } o++; #endregion Attack // put this after every one in order to skip the Item option if (o == 3) { o++; } #region Magic Menu int c = 0; foreach (MagicSpell s in a.MagicSpells) { c++; } if (c > 0) { _magicMenuOption = o; o++; foreach (Materia m in a.Materia) { if (m != null && m.Name == "W-Magic") { _wmagic = true; } } } #endregion Magic Menu // put this after every one in order to skip the Item option if (o == 3) { o++; } #region Summon Menu c = 0; foreach (Summon s in a.Summons) { c++; } if (c > 0) { _summonMenuOption = o; o++; foreach (Materia m in a.Materia) { if (m != null && m.Name == "W-Summon") { _wsummon = true; } } } #endregion Summon Menu // put this after every one in order to skip the Item option if (o == 3) { o++; } #region Sense foreach (Materia m in a.Materia) { if (m != null && m.Name == "Sense") { _senseOption = o; o++; } } #endregion // put this after every one in order to skip the Item option if (o == 3) { o++; } #region Enemy Skill foreach (Materia m in a.Materia) { if (m != null && m.ID == "enemyskill") { _enemySkillMenuOption = o; o++; } } #endregion // put this after every one in order to skip the Item option if (o == 3) { o++; } #region Mime foreach (Materia m in a.Materia) { if (m != null && m.ID == "mime") { _mimeOption = o; o++; } } #endregion // put this after every one in order to skip the Item option if (o == 3) { o++; } #region Deathblow foreach (Materia m in a.Materia) { if (m != null && m.ID == "deathblow") { _deathblowOption = o; o++; } } #endregion // put this after every one in order to skip the Item option if (o == 3) { o++; } #region Steal foreach (Materia m in a.Materia) { if (m != null && m.ID == "steal") { if (m.Level == 0) { _stealOption = o; _mugOption = -1; } else { _mugOption = o; _stealOption = -1; } } } if (_mugOption != -1 || _stealOption != -1) { o++; } #endregion // put this after every one in order to skip the Item option if (o == 3) { o++; } _columns = (o - 1) / _rows + 1; if (_columns != 1) { Width = W * _columns; } }
public void ActOnSelection() { ICombatant target; Ally performer = Game.Battle.Commanding; #region Attack if (_option == _attackOption) { target = TargetSelector.Instance.Selected[0]; int bd = Formula.PhysicalBase(Game.Battle.Commanding); int dam = Formula.PhysicalDamage(bd, 16, target); AbilityState state = Game.Battle.Commanding.Ability; state.LongRange = performer.LongRange; state.QuadraMagic = false; state.Type = AttackType.Physical; state.Performer = performer; state.Target = TargetSelector.Instance.Selected; state.Action += delegate() { target.AcceptDamage(Game.Battle.ActiveAbility.Performer, dam); }; } #endregion Attack #region 2x-Cut else if (_option == _doubleCutOption2) { target = TargetSelector.Instance.Selected[0]; int bd = Formula.PhysicalBase(Game.Battle.Commanding); int dam = Formula.PhysicalDamage(bd, 16, target); AbilityState state = Game.Battle.Commanding.Ability; state.LongRange = performer.LongRange; state.QuadraMagic = false; state.Type = AttackType.Physical; state.Performer = performer; state.Target = TargetSelector.Instance.Selected; state.Action += delegate() { target.AcceptDamage(Game.Battle.ActiveAbility.Performer, dam); }; Game.Battle.EnqueueAction((AbilityState)state.Clone()); Game.Battle.EnqueueAction((AbilityState)state.Clone()); // Here we must disable the action hook, because we do not the second state // to be attached to Ally.Ability. If it were, when the first one is disposed of // it will reset the second one. See BattleState.CheckAbilityQueue() Selector.DisableActionHook(true); } #endregion 2x-Cut #region 4x-Cut else if (_option == _doubleCutOption4) { target = TargetSelector.Instance.Selected[0]; int bd = Formula.PhysicalBase(Game.Battle.Commanding); int dam = Formula.PhysicalDamage(bd, 16, target); AbilityState state = Game.Battle.Commanding.Ability; state.LongRange = performer.LongRange; state.QuadraMagic = false; state.Type = AttackType.Physical; state.Performer = performer; state.Target = TargetSelector.Instance.Selected; state.Action += delegate() { target.AcceptDamage(Game.Battle.ActiveAbility.Performer, dam); }; Game.Battle.EnqueueAction((AbilityState)state.Clone()); Game.Battle.EnqueueAction((AbilityState)state.Clone()); Game.Battle.EnqueueAction((AbilityState)state.Clone()); Game.Battle.EnqueueAction((AbilityState)state.Clone()); // Here we must disable the action hook, because we do not the first three states // to be attached to Ally.Ability. If it were, when the first one is disposed of // it will reset the others. See BattleState.CheckAbilityQueue() Selector.DisableActionHook(true); } #endregion 4x-Cut #region Sense else if (_option == _senseOption) { target = TargetSelector.Instance.Selected[0]; AbilityState state = Game.Battle.Commanding.Ability; state.Performer = performer; state.Target = new ICombatant[1]; state.Target[0] = target; state.Action += delegate() { target.Sense(); }; } #endregion Sense #region Mime else if (_option == _mimeOption) { if (Game.Battle.LastPartyAbility == null) { Selector.DisableActionHook(true); Game.Battle.Commanding.TurnTimer.Reset(); } else { Game.Battle.Commanding.Ability = Game.Battle.LastPartyAbility; try { Game.Battle.Commanding.Ability.Performer = performer; } catch (Exception e) { } } } #endregion Mime #region Deathblow else if (_option == _deathblowOption) { target = TargetSelector.Instance.Selected[0]; int bd = Formula.PhysicalBase(Game.Battle.Commanding); int dam = Formula.PhysicalDamage(bd, 16, target) * 2; AbilityState state = Game.Battle.Commanding.Ability; state.LongRange = performer.LongRange; state.QuadraMagic = false; state.Type = AttackType.Physical; state.Performer = performer; state.Target = TargetSelector.Instance.Selected; state.Action += delegate() { target.AcceptDamage(Game.Battle.ActiveAbility.Performer, dam); }; } #endregion Deathblow #region Steal else if (_option == _stealOption) { target = TargetSelector.Instance.Selected[0]; AbilityState state = Game.Battle.Commanding.Ability; state.Type = AttackType.Physical; state.Performer = performer; state.Target = TargetSelector.Instance.Selected; state.Action += delegate() { ((Enemy)target).StealItem(performer); }; } #endregion Steal #region Mug else if (_option == _mugOption) { target = TargetSelector.Instance.Selected[0]; int bd = Formula.PhysicalBase(Game.Battle.Commanding); int dam = Formula.PhysicalDamage(bd, 16, target); AbilityState state = Game.Battle.Commanding.Ability; state.Type = AttackType.Physical; state.Performer = performer; state.Target = TargetSelector.Instance.Selected; state.Action += delegate() { target.AcceptDamage(Game.Battle.ActiveAbility.Performer, dam); ((Enemy)target).StealItem(performer); }; } #endregion Mug }
protected override void DrawContents(Gdk.Drawable d) { Gdk.GC gc = new Gdk.GC(d); Cairo.Context g = Gdk.CairoHelper.Create(d); g.SelectFontFace("Lucida Console", FontSlant.Normal, FontWeight.Bold); g.SetFontSize(24); TextExtents te; #region Left string str, vit, dex, mag, spi, lck; int atk, atkp, def, defp, mat, mdf, mdfp; str = Selected.Strength.ToString(); vit = Selected.Vitality.ToString(); dex = Selected.Dexterity.ToString(); mag = Selected.Magic.ToString(); spi = Selected.Spirit.ToString(); lck = Selected.Luck.ToString(); atk = Ally.Attack(Selected); atkp = Ally.AttackPercent(Selected); def = Ally.Defense(Selected); defp = Ally.DefensePercent(Selected); mat = Ally.MagicAttack(Selected); mdf = Ally.MagicDefense(Selected); mdfp = Ally.MagicDefensePercent(Selected); Cairo.Color greenish = new Color(.3, .8, .8); Graphics.ShadowedText(g, greenish, "Attack", X + x0, Y + yr + (line * 0)); Graphics.ShadowedText(g, greenish, "Attack %", X + x0, Y + yr + (line * 1)); Graphics.ShadowedText(g, greenish, "Defense", X + x0, Y + yr + (line * 2)); Graphics.ShadowedText(g, greenish, "Defense %", X + x0, Y + yr + (line * 3)); Graphics.ShadowedText(g, greenish, "Magic", X + x0, Y + yr + (line * 4)); Graphics.ShadowedText(g, greenish, "Magic def", X + x0, Y + yr + (line * 5)); Graphics.ShadowedText(g, greenish, "Magic def %", X + x0, Y + yr + (line * 6)); te = g.TextExtents(atk.ToString()); Graphics.ShadowedText(g, atk.ToString(), X + x1 - te.Width, Y + yr + (line * 0)); te = g.TextExtents(atkp.ToString()); Graphics.ShadowedText(g, atkp.ToString(), X + x1 - te.Width, Y + yr + (line * 1)); te = g.TextExtents(def.ToString()); Graphics.ShadowedText(g, def.ToString(), X + x1 - te.Width, Y + yr + (line * 2)); te = g.TextExtents(defp.ToString()); Graphics.ShadowedText(g, defp.ToString(), X + x1 - te.Width, Y + yr + (line * 3)); te = g.TextExtents(mat.ToString()); Graphics.ShadowedText(g, mat.ToString(), X + x1 - te.Width, Y + yr + (line * 4)); te = g.TextExtents(mdf.ToString()); Graphics.ShadowedText(g, mdf.ToString(), X + x1 - te.Width, Y + yr + (line * 5)); te = g.TextExtents(mdfp.ToString()); Graphics.ShadowedText(g, mdfp.ToString(), X + x1 - te.Width, Y + yr + (line * 6)); if (EquipList.Instance.IsControl) { int t_atk, t_atkp, t_def, t_defp, t_mat, t_mdf, t_mdfp; IItem temp; switch (EquipTop.Instance.Option) { case 0: temp = Selected.Weapon; Selected.Weapon = (Weapon)EquipList.Instance.Selection; break; case 1: temp = Selected.Armor; Selected.Armor = (Armor)EquipList.Instance.Selection; break; case 2: temp = Selected.Accessory; Selected.Accessory = (Accessory)EquipList.Instance.Selection; break; default: temp = Selected.Weapon; break; } t_atk = Ally.Attack(Selected); t_atkp = Ally.AttackPercent(Selected); t_def = Ally.Defense(Selected); t_defp = Ally.DefensePercent(Selected); t_mat = Ally.MagicAttack(Selected); t_mdf = Ally.MagicDefense(Selected); t_mdfp = Ally.MagicDefensePercent(Selected); switch (EquipTop.Instance.Option) { case 0: Selected.Weapon = (Weapon)temp; break; case 1: Selected.Armor = (Armor)temp; break; case 2: Selected.Accessory = (Accessory)temp; break; default: break; } Color c; Color yellow = new Color(.8, .8, 0); Color red = new Color(0.8, 0, 0); Color white = new Color(1, 1, 1); Graphics.ShadowedText(g, white, ">", X + x2, Y + yr + (line * 0)); Graphics.ShadowedText(g, white, ">", X + x2, Y + yr + (line * 1)); Graphics.ShadowedText(g, white, ">", X + x2, Y + yr + (line * 2)); Graphics.ShadowedText(g, white, ">", X + x2, Y + yr + (line * 3)); Graphics.ShadowedText(g, white, ">", X + x2, Y + yr + (line * 4)); Graphics.ShadowedText(g, white, ">", X + x2, Y + yr + (line * 5)); Graphics.ShadowedText(g, white, ">", X + x2, Y + yr + (line * 6)); te = g.TextExtents(t_atk.ToString()); if (t_atk < atk) { c = red; } else if (t_atk > atk) { c = yellow; } else { c = white; } Graphics.ShadowedText(g, c, t_atk.ToString(), X + x3 - te.Width, Y + yr + (line * 0)); te = g.TextExtents(t_atkp.ToString()); if (t_atkp < atkp) { c = red; } else if (t_atkp > atkp) { c = yellow; } else { c = white; } Graphics.ShadowedText(g, c, t_atkp.ToString(), X + x3 - te.Width, Y + yr + (line * 1)); te = g.TextExtents(t_def.ToString()); if (t_def < def) { c = red; } else if (t_def > def) { c = yellow; } else { c = white; } Graphics.ShadowedText(g, c, t_def.ToString(), X + x3 - te.Width, Y + yr + (line * 2)); te = g.TextExtents(t_defp.ToString()); if (t_defp < defp) { c = red; } else if (t_defp > defp) { c = yellow; } else { c = white; } Graphics.ShadowedText(g, c, t_defp.ToString(), X + x3 - te.Width, Y + yr + (line * 3)); te = g.TextExtents(t_mat.ToString()); if (t_mat < mat) { c = red; } else if (t_mat > mat) { c = yellow; } else { c = white; } Graphics.ShadowedText(g, c, t_mat.ToString(), X + x3 - te.Width, Y + yr + (line * 4)); te = g.TextExtents(t_mdf.ToString()); if (t_mdf < mdf) { c = red; } else if (t_mdf > mdf) { c = yellow; } else { c = white; } Graphics.ShadowedText(g, c, t_mdf.ToString(), X + x3 - te.Width, Y + yr + (line * 5)); te = g.TextExtents(t_mdfp.ToString()); if (t_mdfp < mdfp) { c = red; } else if (t_mdfp > mdfp) { c = yellow; } else { c = white; } Graphics.ShadowedText(g, c, t_mdfp.ToString(), X + x3 - te.Width, Y + yr + (line * 6)); } #endregion Left ((IDisposable)g.Target).Dispose(); ((IDisposable)g).Dispose(); }
public void ClearControl() { _control = null; Screen.ClearControl(); }
protected override void DrawContents(Gdk.Drawable d) { Gdk.GC gc = new Gdk.GC(d); Cairo.Context g = Gdk.CairoHelper.Create(d); g.SelectFontFace("Lucida Console", FontSlant.Normal, FontWeight.Bold); g.SetFontSize(24); TextExtents te; string lvl, hp, hpm, mp, mpm, exp, next, llvl; #region Top Row d.DrawPixbuf(gc, Graphics.GetProfile(Selected.Name), 0, 0, X + xpic, Y + ypic, Graphics.PROFILE_WIDTH, Graphics.PROFILE_HEIGHT, Gdk.RgbDither.None, 0, 0); g.Color = new Color(.3, .8, .8); g.MoveTo(X + x3, Y + ya); g.ShowText("LV"); g.MoveTo(X + x3, Y + yb); g.ShowText("HP"); g.MoveTo(X + x3, Y + yc); g.ShowText("MP"); g.Color = new Color(1, 1, 1); Graphics.ShadowedText(g, Selected.Name, X + x3, Y + y); lvl = Selected.Level.ToString(); hp = Selected.HP.ToString() + "/"; hpm = Selected.MaxHP.ToString(); mp = Selected.MP.ToString() + "/"; mpm = Selected.MaxMP.ToString(); exp = Selected.Exp.ToString(); next = Selected.ToNextLevel.ToString(); llvl = Selected.LimitLevel.ToString(); te = g.TextExtents(lvl); Graphics.ShadowedText(g, lvl, X + x4 - te.Width, Y + ya); te = g.TextExtents(hp); Graphics.ShadowedText(g, hp, X + x5 - te.Width, Y + yb); te = g.TextExtents(hpm); Graphics.ShadowedText(g, hpm, X + x6 - te.Width, Y + yb); te = g.TextExtents(mp); Graphics.ShadowedText(g, mp, X + x5 - te.Width, Y + yc); te = g.TextExtents(mpm); Graphics.ShadowedText(g, mpm, X + x6 - te.Width, Y + yc); Graphics.ShadowedText(g, "Exp:", X + x8, Y + ya); Graphics.ShadowedText(g, "Next lvl:", X + x8, Y + yb); Graphics.ShadowedText(g, "Limit lvl:", X + x8, Y + yc); te = g.TextExtents(exp); Graphics.ShadowedText(g, exp, X + x12 - te.Width, Y + ya); te = g.TextExtents(next); Graphics.ShadowedText(g, next, X + x12 - te.Width, Y + yb); te = g.TextExtents(llvl); Graphics.ShadowedText(g, llvl, X + x11 - te.Width, Y + yc); #endregion Top #region Left string str, vit, dex, mag, spi, lck; string atk, atkp, def, defp, mat, mdf, mdfp; str = Selected.Strength.ToString(); vit = Selected.Vitality.ToString(); dex = Selected.Dexterity.ToString(); mag = Selected.Magic.ToString(); spi = Selected.Spirit.ToString(); lck = Selected.Luck.ToString(); atk = Ally.Attack(Selected).ToString(); atkp = Ally.AttackPercent(Selected).ToString(); def = Ally.Defense(Selected).ToString(); defp = Ally.DefensePercent(Selected).ToString(); mat = Ally.MagicAttack(Selected).ToString(); mdf = Ally.MagicDefense(Selected).ToString(); mdfp = Ally.MagicDefensePercent(Selected).ToString(); Cairo.Color greenish = new Color(.3, .8, .8); Graphics.ShadowedText(g, greenish, "Strength", X + x0, Y + yq + (line * 0)); Graphics.ShadowedText(g, greenish, "Vitality", X + x0, Y + yq + (line * 1)); Graphics.ShadowedText(g, greenish, "Dexterity", X + x0, Y + yq + (line * 2)); Graphics.ShadowedText(g, greenish, "Magic", X + x0, Y + yq + (line * 3)); Graphics.ShadowedText(g, greenish, "Spirit", X + x0, Y + yq + (line * 4)); Graphics.ShadowedText(g, greenish, "Luck", X + x0, Y + yq + (line * 5)); Graphics.ShadowedText(g, greenish, "Attack", X + x0, Y + yr + (line * 0)); Graphics.ShadowedText(g, greenish, "Attack %", X + x0, Y + yr + (line * 1)); Graphics.ShadowedText(g, greenish, "Defense", X + x0, Y + yr + (line * 2)); Graphics.ShadowedText(g, greenish, "Defense %", X + x0, Y + yr + (line * 3)); Graphics.ShadowedText(g, greenish, "Magic", X + x0, Y + yr + (line * 4)); Graphics.ShadowedText(g, greenish, "Magic def", X + x0, Y + yr + (line * 5)); Graphics.ShadowedText(g, greenish, "Magic def %", X + x0, Y + yr + (line * 6)); te = g.TextExtents(str); Graphics.ShadowedText(g, str, X + x1 - te.Width, Y + yq + (line * 0)); te = g.TextExtents(vit); Graphics.ShadowedText(g, vit, X + x1 - te.Width, Y + yq + (line * 1)); te = g.TextExtents(dex); Graphics.ShadowedText(g, dex, X + x1 - te.Width, Y + yq + (line * 2)); te = g.TextExtents(mag); Graphics.ShadowedText(g, mag, X + x1 - te.Width, Y + yq + (line * 3)); te = g.TextExtents(spi); Graphics.ShadowedText(g, spi, X + x1 - te.Width, Y + yq + (line * 4)); te = g.TextExtents(lck); Graphics.ShadowedText(g, lck, X + x1 - te.Width, Y + yq + (line * 5)); te = g.TextExtents(atk); Graphics.ShadowedText(g, atk, X + x1 - te.Width, Y + yr + (line * 0)); te = g.TextExtents(atkp); Graphics.ShadowedText(g, atkp, X + x1 - te.Width, Y + yr + (line * 1)); te = g.TextExtents(def); Graphics.ShadowedText(g, def, X + x1 - te.Width, Y + yr + (line * 2)); te = g.TextExtents(defp); Graphics.ShadowedText(g, defp, X + x1 - te.Width, Y + yr + (line * 3)); te = g.TextExtents(mat); Graphics.ShadowedText(g, mat, X + x1 - te.Width, Y + yr + (line * 4)); te = g.TextExtents(mdf); Graphics.ShadowedText(g, mdf, X + x1 - te.Width, Y + yr + (line * 5)); te = g.TextExtents(mdfp); Graphics.ShadowedText(g, mdfp, X + x1 - te.Width, Y + yr + (line * 6)); #endregion Left #region Right g.Color = new Color(.1, .1, .2); g.Rectangle(x9, yi, 8 * xs, yj - yi); g.Fill(); g.Rectangle(x9, yk, 8 * xs, yl - yk); g.Fill(); Cairo.Color gray1 = new Color(.2, .2, .2); Cairo.Color gray2 = new Color(.7, .7, .8); int links, slots; slots = Selected.Weapon.Slots.Length; links = Selected.Weapon.Links; for (int j = 0; j < links; j++) { Graphics.RenderLine(g, gray2, 3, X + x9 + (xs / 2) + (j * 2 * xs), Y + yi - ys - zs, X + x9 + (xs / 2) + ((j * 2 + 1) * xs), Y + yi - ys - zs); Graphics.RenderLine(g, gray2, 3, X + x9 + (xs / 2) + (j * 2 * xs), Y + yi - ys, X + x9 + (xs / 2) + ((j * 2 + 1) * xs), Y + yi - ys); Graphics.RenderLine(g, gray2, 3, X + x9 + (xs / 2) + (j * 2 * xs), Y + yi - ys + zs, X + x9 + (xs / 2) + ((j * 2 + 1) * xs), Y + yi - ys + zs); } for (int i = 0; i < slots; i++) { Graphics.RenderCircle(g, gray2, 14, X + x9 + (i * xs) + (xs / 2), Y + yi - ys); if (Selected.Weapon.Slots[i] == null) { Graphics.RenderCircle(g, gray1, 10, X + x9 + (i * xs) + (xs / 2), Y + yi - ys); } else { Graphics.RenderCircle(g, Selected.Weapon.Slots[i].Color, 10, X + x9 + (i * xs) + (xs / 2), Y + yi - ys); } } slots = Selected.Armor.Slots.Length; links = Selected.Armor.Links; for (int j = 0; j < links; j++) { Graphics.RenderLine(g, gray2, 3, X + x9 + (xs / 2) + (j * 2 * xs), Y + yk - ys - zs, X + x9 + (xs / 2) + ((j * 2 + 1) * xs), Y + yk - ys - zs); Graphics.RenderLine(g, gray2, 3, X + x9 + (xs / 2) + (j * 2 * xs), Y + yk - ys, X + x9 + (xs / 2) + ((j * 2 + 1) * xs), Y + yk - ys); Graphics.RenderLine(g, gray2, 3, X + x9 + (xs / 2) + (j * 2 * xs), Y + yk - ys + zs, X + x9 + (xs / 2) + ((j * 2 + 1) * xs), Y + yk - ys + zs); } for (int i = 0; i < slots; i++) { Graphics.RenderCircle(g, gray2, 14, X + x9 + (i * xs) + (xs / 2), Y + yk - ys); if (Selected.Armor.Slots[i] == null) { Graphics.RenderCircle(g, gray1, 10, X + x9 + (i * xs) + (xs / 2), Y + yk - ys); } else { Graphics.RenderCircle(g, Selected.Armor.Slots[i].Color, 10, X + x9 + (i * xs) + (xs / 2), Y + yk - ys); } } g.Color = new Color(.3, .8, .8); g.MoveTo(X + x7, Y + yh); g.ShowText("Wpn."); g.MoveTo(X + x7, Y + yj); g.ShowText("Arm."); g.MoveTo(X + x7, Y + yl); g.ShowText("Acc."); g.Color = new Color(1, 1, 1); Graphics.ShadowedText(g, Selected.Weapon.Name, X + x8, Y + yh); Graphics.ShadowedText(g, Selected.Armor.Name, X + x8, Y + yj); Graphics.ShadowedText(g, Selected.Accessory.Name, X + x8, Y + yl); #endregion Right ((IDisposable)g.Target).Dispose(); ((IDisposable)g).Dispose(); }