コード例 #1
0
ファイル: AbilityStep.cs プロジェクト: VOChris/VOStudios
        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);
            });
        }
コード例 #2
0
ファイル: WeaponItem.cs プロジェクト: VOChris/VOStudios
 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);
 }
コード例 #3
0
ファイル: WeaponItem.cs プロジェクト: VOChris/VOStudios
 protected WeaponItem(String id, String name, String description, String itemTypeDetailsId, 
     Dictionary<EquipmentTarget, EquipableItemModification> modificationsByTarget, WeaponAttackModel[] getAttacks)
     : base(id, name, description, itemTypeDetailsId, modificationsByTarget)
 {
     Attacks = getAttacks;
 }