Skip to content

Commit

Permalink
Add DamageIncrease method overload to support DamageBonus parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroark committed Aug 16, 2024
1 parent 40eb250 commit cad9fa7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions NWN.Anvil/src/main/API/EngineStructures/Effect.Create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,16 @@ public static Effect DamageIncrease(int bonus, DamageType damageType = DamageTyp
return NWScript.EffectDamageIncrease(bonus, (int)damageType)!;
}

/// <summary>
/// Creates an effect that applies a bonus to a specified damage type.
/// </summary>
/// <param name="bonus">The damage bonus to apply.</param>
/// <param name="damageType">The damage type to apply the bonus to.</param>
public static Effect DamageIncrease(DamageBonus bonus, DamageType damageType = DamageType.Magical)
{
return NWScript.EffectDamageIncrease((int) bonus, (int)damageType)!;

Check warning

Code scanning / InspectCode

Incorrect spacing: Space is redundant elsewhere Warning

Space is redundant
}

/// <summary>
/// Creates an effect that resists a constant amount of damage from a physical attack with a certain magical power.
/// </summary>
Expand Down

0 comments on commit cad9fa7

Please sign in to comment.