Ejemplo n.º 1
0
 public float this[ATTRIBUTE name]
 {
     get
     {
         return myStats[name];
     }
 }
Ejemplo n.º 2
0
        public void SetAttribute(ATTRIBUTE attribute, bool setLogic = true)
        {
            if (setLogic)
            {
                //Card is Monster
                if (this.IsMonster())
                {
                    if (attribute == ATTRIBUTE.SPELL || attribute == ATTRIBUTE.TRAP)
                    {
                        ScaleLeft  = ScaleRight = ATK = DEF = Level = Rank = -1;
                        IsPendulum = false;
                        Frame      = (attribute == ATTRIBUTE.SPELL) ? FRAME.Spell : FRAME.Trap;
                        Abilities.Clear();
                        Property = PROPERTY.Normal;
                        Type     = TYPE.NONE;
                    }
                }
                //Card is Spell/Trap
                else
                {
                    //From Trap To Spell
                    if (attribute == ATTRIBUTE.SPELL)
                    {
                        Frame = FRAME.Spell;
                        if (Property.IsTrapPropertyOnly())
                        {
                            Property = PROPERTY.Normal;
                        }
                    }
                    //From Spell To Trap
                    else if (attribute == ATTRIBUTE.TRAP)
                    {
                        Frame = FRAME.Trap;
                        if (Property.IsSpellPropertyOnly())
                        {
                            Property = PROPERTY.Normal;
                        }
                    }
                    //To Monster
                    else
                    {
                        ScaleLeft = ScaleRight = ATK = DEF = double.NaN;
                        Frame     = DefaultFrame;
                        Property  = PROPERTY.NONE;
                        Level     = 4; //Default Level
                        Type      = TYPE.NONE;
                    }
                }
            }

            this.Attribute = attribute;
        }
Ejemplo n.º 3
0
 public void AddAttribute(ATTRIBUTE a)
 {
     Attributes.Add(new FGLScreenRecordAttributes(a));
 }
Ejemplo n.º 4
0
 public void addDelegate(ATTRIBUTE n, StatContainer.varChange d)
 {
     myStats[n, false] = d;
 }