Exemplo n.º 1
0
 // this constructor is intended to be called from within scripts that wish to define custom attack configurations
 // by passing it a list of SpecialAttacks
 public XmlCustomAttacks(SpecialAttacks [] attacklist)
 {
     if(attacklist != null)
     {
         foreach(SpecialAttacks sid in attacklist)
         {
             AddSpecial(sid);
         }
     }
 }
Exemplo n.º 2
0
 internal override bool HasSpecialAttack(SpecialAttacks specAtt)
 {
     return _specialAttacks[(int)specAtt];
 }
Exemplo n.º 3
0
 public XmlCustomAttacks(SpecialAttacks attack)
 {
     AddSpecial(attack);
 }
Exemplo n.º 4
0
            public int StrReq; // str requirements for this attack

            #endregion Fields

            #region Constructors

            public SpecialAttack( string name, string description, SpecialAttacks id, int icon, IconTypes itype, TimeSpan duration,
            int mana, int stam, int hits, int karma, int minstr, int mindex, int minint,
            SkillName [] skills, int [] minlevel, Type [] reagents, int [] quantity)
            {
                Name = name;
                Description = description;
                AttackID = id;
                ChainTime = duration;
                Icon = icon;
                IconType = itype;
                ManaReq = mana;
                StamReq = stam;
                HitsReq = hits;
                KarmaReq = karma;
                StrReq = minstr;
                DexReq = mindex;
                IntReq = minint;
                Reagents = reagents;
                Quantity = quantity;
                Skills = skills;
                MinSkillLevel = minlevel;
            }
Exemplo n.º 5
0
 public ComboAttack( string name, ComboAttacks id, SpecialAttacks [] sequence)
 {
     Name = name;
     AttackID = id;
     AttackSequence = sequence;
 }
Exemplo n.º 6
0
 private static void AddSpecialAttack( string name, string description, SpecialAttacks id, int icon, IconTypes itype, TimeSpan duration,
 int mana, int stam, int hits, int karma, int minstr, int mindex, int minint,
 SkillName [] skills, int [] minlevel, Type [] reagents, int [] quantity)
 {
     AllSpecials.Add(id, new SpecialAttack( name, description, id, icon, itype,
     duration, mana, stam, hits, karma,
     minstr, mindex, minint, skills, minlevel, reagents, quantity) );
 }
Exemplo n.º 7
0
 private static SpecialAttack GetSpecialAttack( SpecialAttacks id )
 {
     return((SpecialAttack)AllSpecials[id]);
 }
Exemplo n.º 8
0
        public void AddSpecial( SpecialAttacks id )
        {
            SpecialAttack s = GetSpecialAttack(id);

            if(s != null)
                Specials.Add(s);
        }
Exemplo n.º 9
0
 private static void AddComboAttack( string name, ComboAttacks id, SpecialAttacks [] sequence)
 {
     AllCombos.Add(id, new ComboAttack( name, id,sequence) );
 }
Exemplo n.º 10
0
        public static void AddAttack(object target, SpecialAttacks attack)
        {
            // is there an existing custom attacks attachment to add to?
            XmlCustomAttacks a = (XmlCustomAttacks)XmlAttach.FindAttachment(target, typeof(XmlCustomAttacks));

            if(a == null)
            {
                // add a new custom attacks attachment
                XmlAttach.AttachTo(target, new XmlCustomAttacks(attack));
            } else
            {
                // add the new attack to existing attack list
                a.AddSpecial(attack);
            }
        }
Exemplo n.º 11
0
        public void SetSpecialAttack(SpecialAttacks atk,bool set)
        {
            Action<string> action;
            if (set)
            {
                action = SetAttack;
            }
            else
            {
                action = RemoveAttack;
            }

            switch (atk)
            {
                case SpecialAttacks.Enrage:
                    action("E");
                    break;
                case SpecialAttacks.Flurry:
                    action("F");
                    break;
                case SpecialAttacks.Rampage:
                    action("R");
                    break;
                case SpecialAttacks.AreaRampage:
                    action("r");
                    break;
                case SpecialAttacks.Summon:
                    action("S");
                    break;
                case SpecialAttacks.Triple:
                    action("T");
                    break;
                case SpecialAttacks.Quad:
                    action("Q");
                    break;
                case SpecialAttacks.Bane:
                    action("b");
                    break;
                case SpecialAttacks.Magical:
                    action("m");
                    break;
                case SpecialAttacks.SlowImmune:
                    action("u");
                    break;
                case SpecialAttacks.MezImmune:
                    action("M");
                    break;
                case SpecialAttacks.CharmImmune:
                    action("C");
                    break;
                case SpecialAttacks.StunImmune:
                    action("N");
                    break;
                case SpecialAttacks.SnareImmune:
                    action("I");
                    break;
                case SpecialAttacks.FearImmune:
                    action("D");
                    break;
                case SpecialAttacks.MeleeImmune:
                    action("A");
                    break;
                case SpecialAttacks.FleeImmune:
                    action("f");
                    break;
                case SpecialAttacks.BaneMeleeOnly:
                    action("O");
                    break;
                case SpecialAttacks.MeleeNonMagicImmune:
                    action("W");
                    break;
                case SpecialAttacks.AggroImmune:
                    action("H");
                    break;
                case SpecialAttacks.AggroOnImmune:
                    action("G");
                    break;
                case SpecialAttacks.FeignDeathImmune:
                    action("d");
                    break;
                case SpecialAttacks.RangedAttack:
                    action("Y");
                    break;
                case SpecialAttacks.InnateDualWield:
                    action("L");
                    break;
                case SpecialAttacks.TunnelVision:
                    action("t");
                    break;
                case SpecialAttacks.NoBuffHealFriends:
                    action("n");
                    break;
                case SpecialAttacks.PacifyImmune:
                    action("p");
                    break;
                case SpecialAttacks.Leash:
                    action("J");
                    break;
                case SpecialAttacks.Tether:
                    action("j");
                    break;
                case SpecialAttacks.Destructible:
                    action("o");
                    break;
                case SpecialAttacks.NoHarmFromClient:
                    action("Z");
                    break;
            }
        }
Exemplo n.º 12
0
        public bool IsAttackSet(SpecialAttacks atk)
        {
            Func<string, bool> action = IsAttackSet;

            switch (atk)
            {
                case SpecialAttacks.Enrage:
                    return action("E");
                case SpecialAttacks.Flurry:
                    return action("F");
                case SpecialAttacks.Rampage:
                    return action("R");
                case SpecialAttacks.AreaRampage:
                    return action("r");
                case SpecialAttacks.Summon:
                    return action("S");
                case SpecialAttacks.Triple:
                    return action("T");
                case SpecialAttacks.Quad:
                    return action("Q");
                case SpecialAttacks.Bane:
                    return action("b");
                case SpecialAttacks.Magical:
                    return action("m");
                case SpecialAttacks.SlowImmune:
                    return action("u");
                case SpecialAttacks.MezImmune:
                    return action("M");
                case SpecialAttacks.CharmImmune:
                    return action("C");
                case SpecialAttacks.StunImmune:
                    return action("N");
                case SpecialAttacks.SnareImmune:
                    return action("I");
                case SpecialAttacks.FearImmune:
                    return action("D");
                case SpecialAttacks.MeleeImmune:
                    return action("A");
                case SpecialAttacks.FleeImmune:
                    return action("f");
                case SpecialAttacks.BaneMeleeOnly:
                    return action("O");
                case SpecialAttacks.MeleeNonMagicImmune:
                    return action("W");
                case SpecialAttacks.AggroImmune:
                    return action("H");
                case SpecialAttacks.AggroOnImmune:
                    return action("G");
                case SpecialAttacks.FeignDeathImmune:
                    return action("d");
                case SpecialAttacks.RangedAttack:
                    return action("Y");
                case SpecialAttacks.InnateDualWield:
                    return action("L");
                case SpecialAttacks.TunnelVision:
                    return action("t");
                case SpecialAttacks.NoBuffHealFriends:
                    return action("n");
                case SpecialAttacks.PacifyImmune:
                    return action("p");
                case SpecialAttacks.Leash:
                    return action("J");
                case SpecialAttacks.Tether:
                    return action("j");
                case SpecialAttacks.Destructible:
                    return action("o");
                case SpecialAttacks.NoHarmFromClient:
                    return action("Z");
                default:
                    return false;
            }
        }
Exemplo n.º 13
0
 internal virtual bool HasSpecialAttack(SpecialAttacks specAtt)
 {
     return false;   // TODO: implement
 }
Exemplo n.º 14
0
 public int[] MinSkillLevel;// minimum skill levels
 public SpecialAttack(string name, string description, SpecialAttacks id, int icon, IconTypes itype, TimeSpan duration,
     int mana, int stam, int hits, int karma, int minstr, int mindex, int minint,
     SkillName[] skills, int[] minlevel, Type[] reagents, int[] quantity)
 {
     this.Name = name;
     this.Description = description;
     this.AttackID = id;
     this.ChainTime = duration;
     this.Icon = icon;
     this.IconType = itype;
     this.ManaReq = mana;
     this.StamReq = stam;
     this.HitsReq = hits;
     this.KarmaReq = karma;
     this.StrReq = minstr;
     this.DexReq = mindex;
     this.IntReq = minint;
     this.Reagents = reagents;
     this.Quantity = quantity;
     this.Skills = skills;
     this.MinSkillLevel = minlevel;
 }