Beispiel #1
0
 public void SelectTargetWindows(Kernel_bin.Magic_Data c, int casts = 1, Random random = default)
 {
     Kernel_bin.Target t = c.Target;
     SelectTargetWindows(t, casts, random);
     Command = Kernel_bin.BattleCommands[2];
     Magic   = c;
 }
Beispiel #2
0
        private void addMagic(ref int pos, Kernel_bin.Magic_Data spell, Font.ColorID color = @default)
        {
            if (!Damageable.GetEnemy(out Enemy e))
            {
                e = null;
            }
            bool j = false;

            if (color == @default && e == null && Source != null && Source.Stat_J.ContainsValue(spell.ID))
            {
                //spell is junctioned
                if (!Battle)
                {
                    color = junctioned;
                }
                j = true;
            }
            ((IGMDataItem.Text)ITEM[pos, 0]).Data      = spell.Name;
            ((IGMDataItem.Text)ITEM[pos, 0]).FontColor = color;
            ITEM[pos, 0].Show();
            if (j)
            {
                ITEM[pos, 1].Show();
            }
            else
            {
                ITEM[pos, 1].Hide();
            }
            int count = Source?.Magics[spell.ID] ?? 0;

            ((IGMDataItem.Integer)ITEM[pos, 2]).Data = count;
            if (count <= 0)
            {
                ITEM[pos, 2].Hide();
            }
            else
            {
                ITEM[pos, 2].Show();
            }
            //makes it so you cannot junction a magic to a stat that does nothing.
            BLANKS[pos]   = color == nostat ? true : false;
            Contents[pos] = spell.ID;
            pos++;
        }
Beispiel #3
0
        private void addMagic(ref int pos, Kernel_bin.Magic_Data spell, Font.ColorID color = @default)
        {
            bool j = false;

            if (color == @default && Source.Stat_J.ContainsValue(spell.ID))
            {
                //spell is junctioned
                if (!Battle)
                {
                    color = junctioned;
                }
                j = true;
            }
            ITEM[pos, 0] = new IGMDataItem.Text(spell.Name, SIZE[pos], color);
            ITEM[pos, 1] = j ? new IGMDataItem.Icon(Icons.ID.JunctionSYM, new Rectangle(SIZE[pos].X + SIZE[pos].Width - 75, SIZE[pos].Y, 0, 0)) : null;
            ITEM[pos, 2] = new IGMDataItem.Integer(Source.Magics[spell.ID], new Rectangle(SIZE[pos].X + SIZE[pos].Width - 50, SIZE[pos].Y, 0, 0), spaces: 3);
            //makes it so you cannot junction a magic to a stat that does nothing.
            BLANKS[pos]   = color == nostat ? true : false;
            Contents[pos] = spell.ID;
            pos++;
        }