public float this[ATTRIBUTE name] { get { return myStats[name]; } }
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; }
public void AddAttribute(ATTRIBUTE a) { Attributes.Add(new FGLScreenRecordAttributes(a)); }
public void addDelegate(ATTRIBUTE n, StatContainer.varChange d) { myStats[n, false] = d; }