Exemple #1
0
 public PillRow()
 {
     InitializeComponent();
     Model = new PillRowModel();
     CreateBindings();
 }
        private static void SetPill(PillRowModel pillModel, Item pill, int pillPoolIndex, bool known, bool toGoodPills)
        {
            pillModel.PillImageResource = ResourcesUtil.PillResource(pillPoolIndex);
            if (pill == null)
            {
                pillModel.Label = "Error";
                return;
            }

            var label = pill.I18N;

            if (pill.Id == 1)
            {
                label = toGoodPills ? "Balls of Steel" : "Bad Trip/Full Health";
            }
            else if (pill.Id == 5)
            {
                label = toGoodPills ? "Full Health" : "Bad Trip/Full Health";
            }
            else if (pill.Id == 6 || pill.Id == 7)
            {
                label = toGoodPills ? "Health Up" : "Health Down/Health Up";
            }
            else if (pill.Id == 11 && toGoodPills)
            {
                label = "Range Up";
            }
            else if (pill.Id == 13 && toGoodPills)
            {
                label = "Speed Up";
            }
            else if (pill.Id == 15 && toGoodPills)
            {
                label = "Tears Up";
            }
            else if (pill.Id == 17 && toGoodPills)
            {
                label = "Luck Up";
            }
            else if (pill.Id == 22 && toGoodPills)
            {
                label = "Pheromones";
            }
            else if (pill.Id == 25 && toGoodPills)
            {
                label = "I can see forever!";
            }
            else if (pill.Id == 27 && toGoodPills)
            {
                label = "Power Pill!";
            }
            else if (pill.Id == 29 && toGoodPills)
            {
                label = "Percs!";
            }
            else if (pill.Id == 31 && toGoodPills)
            {
                label = "Telepills";
            }
            else if (pill.Id == 37 && toGoodPills)
            {
                label = "I can see forever!";
            }
            else if (pill.Id == 39 && toGoodPills)
            {
                label = "Something's wrong...";
            }
            pillModel.Label = known ? label : "-";
        }