private void SetCurAndTradeoffForEquipable(InventoryItems selectedItem) { CurSelectStrLabel.Text = "Strength: " + selectedItem.GetProperty(StatsType.Strength).Magnitude; CurSelectAgiLabel.Text = "Agility: " + selectedItem.GetProperty(StatsType.Agility).Magnitude; CurSelectIntLabel.Text = "Intelligence: " + selectedItem.GetProperty(StatsType.Intelegence).Magnitude; CurSelectDefLabel.Text = "Defense: " + selectedItem.GetProperty(StatsType.Defense).Magnitude; CurSelectMHPLabel.Text = "Bonus HP: " + selectedItem.GetProperty(StatsType.MaxHp).Magnitude; CurSelectMMPLabel.Text = "Bonus MP: " + selectedItem.GetProperty(StatsType.MaxResources).Magnitude; EnumGearSlot selectedType = ((Equipable)selectedItem).Slot; int tStr = (selectedItem.GetProperty(StatsType.Strength).Magnitude) - (equiped[selectedType].GetProperty(StatsType.Strength).Magnitude); int tAgi = (selectedItem.GetProperty(StatsType.Agility).Magnitude) - (equiped[selectedType].GetProperty(StatsType.Agility).Magnitude); int tInt = (selectedItem.GetProperty(StatsType.Intelegence).Magnitude) - (equiped[selectedType].GetProperty(StatsType.Intelegence).Magnitude); int tDef = (selectedItem.GetProperty(StatsType.Defense).Magnitude) - (equiped[selectedType].GetProperty(StatsType.Defense).Magnitude); int tMHP = (selectedItem.GetProperty(StatsType.MaxHp).Magnitude) - (equiped[selectedType].GetProperty(StatsType.MaxHp).Magnitude); int tMMP = (selectedItem.GetProperty(StatsType.MaxResources).Magnitude) - (equiped[selectedType].GetProperty(StatsType.MaxResources).Magnitude); // tradeoff adjustments TradeoffStrLabel.Text = "Strength: " + tStr; TradeoffAgiLabel.Text = "Agility: " + tAgi; TradeoffIntLabel.Text = "Intelligence: " + tInt; TradeoffDefLabel.Text = "Defense: " + tDef; TradeoffMHPLabel.Text = "Bonus HP: " + tMHP; TradeoffMMPLabel.Text = "Bonus MP: " + tMMP; SetTradeoffColors(tStr, tAgi, tInt, tDef, tMHP, tMMP); this.Equip.Text = "Equip"; }
private void SetCurAndTradeoffForConsumable(InventoryItems selectedItem) { Consumable potion = (Consumable)selectedItem; int stat = -1; // DEFAULT VALUE foreach (EffectInformation effect in potion.Properties) { if (effect.Magnitude > 0) stat = (int)effect.Stat; } CurSelectStrLabel.Text = potion.GetDescription() + ": " + selectedItem.GetProperty((StatsType)stat).Magnitude; CurSelectAgiLabel.Text = "Duration: " + selectedItem.GetProperty((StatsType)stat).Duration; CurSelectIntLabel.Text = ""; CurSelectDefLabel.Text = ""; CurSelectMHPLabel.Text = ""; CurSelectMMPLabel.Text = ""; TradeoffStrLabel.Text = ""; TradeoffAgiLabel.Text = ""; TradeoffIntLabel.Text = ""; TradeoffDefLabel.Text = ""; TradeoffMHPLabel.Text = ""; TradeoffMMPLabel.Text = ""; this.Equip.Text = "Drink"; }