Example #1
0
        public static AbilityStep FromWeaponAttack(WeaponAttackModel weaponAttack, Double attackDamageMultiplier)
        {
            return WithNoSecondaryTargets(weaponAttack.AnimationId, (source, target) =>
            {
                //figure out the attack damage for this attack
                var damage = source.GenerateDamage(weaponAttack.AttackModel);

                //apply damage multiplier
                var modifiedDamages = damage.DamagesByType.ToDictionary(x => x.Key, x => Convert.ToInt32(x.Value * attackDamageMultiplier));

                //target takes the damage
                target.TakeDamage(damage);
            });
        }
Example #2
0
 public static WeaponItem New(String id, String name, String description, String itemTypeDetailsId, 
     Dictionary<EquipmentTarget, EquipableItemModification> modificationsByTarget, WeaponAttackModel[] attacks)
 {
     return new WeaponItem(id, name, description, itemTypeDetailsId, modificationsByTarget, attacks);
 }
Example #3
0
 protected WeaponItem(String id, String name, String description, String itemTypeDetailsId, 
     Dictionary<EquipmentTarget, EquipableItemModification> modificationsByTarget, WeaponAttackModel[] getAttacks)
     : base(id, name, description, itemTypeDetailsId, modificationsByTarget)
 {
     Attacks = getAttacks;
 }