Skip to content

Commit

Permalink
Revert "Fix a bug that magic number doesn't reset if a card modifier …
Browse files Browse the repository at this point in the history
…modified it once" (#424)
  • Loading branch information
kiooeht authored Jan 19, 2024
1 parent 4671eb6 commit 0fd1e20
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ public static class CardModifierOnApplyPowers
//modifyBaseMagic
public static void Prefix(AbstractCard __instance) {
int magic = (int) CardModifierManager.onModifyBaseMagic(__instance.baseMagicNumber, __instance);
__instance.magicNumber = magic;
__instance.isMagicNumberModified = magic != __instance.baseMagicNumber;
if (magic != __instance.baseMagicNumber) {
__instance.magicNumber = magic;
__instance.isMagicNumberModified = true;
}
}

//onApplyPowers
Expand Down Expand Up @@ -231,8 +233,10 @@ public static class CardModifierCalculateCardDamage
//modifyBaseMagic
public static void Prefix(AbstractCard __instance) {
int magic = (int) CardModifierManager.onModifyBaseMagic(__instance.baseMagicNumber, __instance);
__instance.magicNumber = magic;
__instance.isMagicNumberModified = magic != __instance.baseMagicNumber;
if (magic != __instance.baseMagicNumber) {
__instance.magicNumber = magic;
__instance.isMagicNumberModified = true;
}
}

//onCalculateCardDamage
Expand Down

0 comments on commit 0fd1e20

Please sign in to comment.