Skip to content

Commit 7ca8fcb

Browse files
Added minor documentation for BreakShield and TriggerBreakShield
1 parent 8b926c8 commit 7ca8fcb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

InscryptionAPI/Card/ShieldManager.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ public static class ShieldManager
2323
public static List<FullAbility> AllShieldAbilities { get; internal set; } = new(AllAbilities);
2424
public static List<AbilityInfo> AllShieldInfos { get; internal set; } = AllShieldAbilities.Select(x => x.Info).ToList();
2525

26+
/// <summary>
27+
/// IEnumerator method that wraps BreakShield. Also contains code for triggering IShieldPreventedDamage and IShieldPreventedDamageInHand.
28+
/// </summary>
29+
/// <param name="target">Card getting attacked.</param>
30+
/// <param name="damage">Damage being dealt.</param>
31+
/// <param name="attacker">Card attacking the target.</param>
2632
public static IEnumerator TriggerBreakShield(PlayableCard target, int damage, PlayableCard attacker)
2733
{
2834
//InscryptionAPIPlugin.Logger.LogDebug("[TriggerBreakShield] Begin");
@@ -51,6 +57,9 @@ public static IEnumerator TriggerBreakShield(PlayableCard target, int damage, Pl
5157
/// The method used for when a shielded card is damaged. Includes extra parameters for modders looking to modify this further.
5258
/// This method is only called when damage > 0 and the target has a shield.
5359
/// </summary>
60+
/// <param name="target">Card getting attacked.</param>
61+
/// <param name="damage">Damage being dealt.</param>
62+
/// <param name="attacker">Card attacking the target.</param>
5463
public static void BreakShield(PlayableCard target, int damage, PlayableCard attacker)
5564
{
5665
DamageShieldBehaviour shield = Array.Find(target.GetComponents<DamageShieldBehaviour>(), x => x.HasShields());

0 commit comments

Comments
 (0)