Esempio n. 1
0
 public RangeAttack(OffenseStats offenseAbilities,
                    CharacterSize size,
                    IWeapon weapon) : base(offenseAbilities, size, weapon)
 {
     AttackBonus.AddModifier(new StatisticStatModifier("Range Attack Bonus", offenseAbilities.RangeAttackBonus));
     this.AttackType = AttackTypes.Ranged;
 }
Esempio n. 2
0
 public MeleeAttack(OffenseStats offenseAbilities,
                    AbilityScore strength,
                    CharacterSize size,
                    IWeaponAttackStatistics weapon) : base(offenseAbilities, size, weapon)
 {
     this.strength = strength;
     AttackBonus.AddModifier(new StatisticStatModifier("Melee Attack Bonus", offenseAbilities.MeleeAttackBonus));
     DamageModifier.AddModifier(this.strength.UniversalStatModifier);
     this.AttackType = AttackTypes.Melee;
 }
Esempio n. 3
0
    internal AttackBonus Compute()
    {
        AttackBonus bonus = new AttackBonus();

        bonus.damage.percent.BaseValue = damage.percent;
        bonus.damage.flat.BaseValue    = damage.flat;

        bonus.arpen.percent.BaseValue = arpen.percent;
        bonus.arpen.flat.BaseValue    = arpen.flat;

        return(bonus);
    }
Esempio n. 4
0
 /// <summary>
 /// Creates an effect that applies a bonus to an attack roll.
 /// </summary>
 /// <param name="amount">The bonus to apply.</param>
 /// <param name="bonusType">The weapon slot this bonus should be applied to.</param>
 public static Effect AttackIncrease(int amount, AttackBonus bonusType = AttackBonus.Misc)
 => NWScript.EffectAttackIncrease(amount, (int)bonusType);
Esempio n. 5
0
 /// <summary>
 /// Creates an effect that applies a penalty to an attack roll.
 /// </summary>
 /// <param name="amount">The penalty to apply.</param>
 /// <param name="penaltyType">The weapon slot this penalty should be applied to.</param>
 public static Effect AttackDecrease(int amount, AttackBonus penaltyType = AttackBonus.Misc)
 => NWScript.EffectAttackDecrease(amount, (int)penaltyType);