예제 #1
0
파일: Weapon.cs 프로젝트: quajak/StartGame
 /// <summary>
 /// If the weapon is ranged, use RangedWeapon
 /// </summary>
 /// <param name="AttackDamage"></param>
 /// <param name="Type"></param>
 /// <param name="damageType"></param>
 /// <param name="Range"></param>
 /// <param name="Name"></param>
 /// <param name="Attacks"></param>
 /// <param name="Discardeable"></param>
 /// <param name="AttackCost"></param>
 public Weapon(int AttackDamage, BaseAttackType Type, BaseDamageType damageType, int Range, string Name, int Attacks, bool Discardeable, int AttackCost = 1) : base(Name)
 {
     attackCost      = AttackCost;
     discardeable    = Discardeable;
     range           = Range;
     type            = Type;
     this.damageType = damageType;
     attackDamage    = new PlayerData.Attribute(AttackDamage, "Attack Damage");
     attacks         = Attacks;
     maxAttacks      = Attacks;
 }
예제 #2
0
파일: Weapon.cs 프로젝트: quajak/StartGame
        public static Weapon Load(string line)
        {
            string[]       words        = line.Split(' ');
            int            attackDamage = words[0].GetInt();
            BaseAttackType type         = (BaseAttackType)words[1].GetInt();
            BaseDamageType damageType   = (BaseDamageType)words[2].GetInt();
            int            range        = words[3].GetInt();
            int            attacks      = words[4].GetInt();
            bool           discardeable = words[5].GetBool();
            int            cost         = words[6].GetInt();
            string         name         = words[7];

            return(new Weapon(attackDamage, type, damageType, range, name, attacks, discardeable, cost));
        }
 public DamageEventInfo()
 {
     DamageType = new BaseDamageType();
 }
 public DamageEventInfo(Type ThisDamageType)
 {
     DamageType = (BaseDamageType)System.Activator.CreateInstance(ThisDamageType);
 }
예제 #5
0
파일: Weapon.cs 프로젝트: quajak/StartGame
 public RangedWeapon(int AttackDamage, BaseDamageType damageType, int Range, string Name, int Attacks, bool Discardeable, AmmoType ammoType, int AttackCost = 1)
     : base(AttackDamage, BaseAttackType.range, damageType, Range, Name, Attacks, Discardeable, AttackCost)
 {
     AmmoType = ammoType;
     ammo.Add(new Ammo(ammoType, new Buff(BuffType.Absolute, 0), ammoType.ToString(), "", Attacks));
 }