Beispiel #1
0
 public Weapon(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     damage = (DamageCalculator)info.GetValue(_damageSerializableName,
                                              typeof(DamageCalculator));
     specialAttack = (_SpecialAttack)info.GetValue(_specialAttackSerializationName,
                                                   typeof(_SpecialAttack));
 }
Beispiel #2
0
 public Weapon(string name,
               string symbol,
               Color color,
               DamageCalculator damage,
               string specialAttackDescription = null,
               _SpecialAttack specialAttack    = null,
               string description = "Base weapon of the game",
               Coord position     = new Coord(),
               int cost           = 0,
               int weight         = 1,
               int uses           = Item._UnlimitedUses)
     : base(name, symbol, color, true, false, description, position, cost, weight, uses)
 {
     this.damage                   = damage;
     this.specialAttack            = specialAttack;
     this.specialAttackDescription = specialAttackDescription;
 }
Beispiel #3
0
 public LongSword(string name    = "Long Sword",
                  Coord position = new Coord(),
                  _SpecialAttack specialAttack    = null,
                  string specialAttackDescription = null)
     : base(name,
            DefaultSymbol,
            Color.DarkGray,
            new DamageCalculator(
                new Dictionary <DamageType, DamageCalculator.DamageCalculatorMethod>()
 {
     { DamageType.Physical, (mod) => Dice.Throws(8, mod: mod) }
 }),
            description: "A long sword",
            specialAttack: specialAttack,
            specialAttackDescription: specialAttackDescription,
            cost: 10,
            weight: 2,
            position: position)
 {
 }
Beispiel #4
0
        public LongSword(   string name = "Long Sword", 
                            Coord position = new Coord(),
                            _SpecialAttack specialAttack = null,
                            string specialAttackDescription = null)
            : base(name, 
                   DefaultSymbol, 
                   Color.DarkGray, 
                   new DamageCalculator(
                       new Dictionary<DamageType, DamageCalculator.DamageCalculatorMethod>()
                       {
                           { DamageType.Physical, (mod) => Dice.Throws(8, mod: mod) }
                       }),
                   description: "A long sword",
                   specialAttack: specialAttack,
                   specialAttackDescription: specialAttackDescription,
                   cost: 10,
                   weight: 2,
                   position: position)
        {

        }
Beispiel #5
0
 public Weapon(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     damage = (DamageCalculator)info.GetValue(   _damageSerializableName, 
                                                 typeof(DamageCalculator));
     specialAttack = (_SpecialAttack)info.GetValue(  _specialAttackSerializationName,
                                                     typeof(_SpecialAttack));
 }
Beispiel #6
0
 public Weapon(  string name,
                 string symbol,
                 Color color,
                 DamageCalculator damage,
                 string specialAttackDescription = null,
                 _SpecialAttack specialAttack = null,
                 string description = "Base weapon of the game",
                 Coord position = new Coord(),
                 int cost = 0,
                 int weight = 1,
                 int uses = Item._UnlimitedUses)
     : base(name, symbol, color, true, false, description, position, cost, weight, uses)
 {
     this.damage = damage;
     this.specialAttack = specialAttack;
     this.specialAttackDescription = specialAttackDescription;
 }