mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Merge pull request #2899 from tool4ever/fixsba
Effect cleanup can prevent any LTB trigger
This commit is contained in:
@@ -1439,6 +1439,8 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
setHoldCheckingStaticAbilities(false);
|
setHoldCheckingStaticAbilities(false);
|
||||||
|
|
||||||
|
// important to collect first otherwise if a static fires it will mess up registered ones from LKI
|
||||||
|
game.getTriggerHandler().collectTriggerForWaiting();
|
||||||
if (game.getTriggerHandler().runWaitingTriggers()) {
|
if (game.getTriggerHandler().runWaitingTriggers()) {
|
||||||
checkAgain = true;
|
checkAgain = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,9 @@ public class RollDiceEffect extends SpellAbilityEffect {
|
|||||||
return rollDiceForPlayer(sa, player, amount, sides, 0, 0, null);
|
return rollDiceForPlayer(sa, player, amount, sides, 0, 0, null);
|
||||||
}
|
}
|
||||||
private static int rollDiceForPlayer(SpellAbility sa, Player player, int amount, int sides, int ignore, int modifier, List<Integer> rollsResult) {
|
private static int rollDiceForPlayer(SpellAbility sa, Player player, int amount, int sides, int ignore, int modifier, List<Integer> rollsResult) {
|
||||||
|
if (amount == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
int advantage = getRollAdvange(player);
|
int advantage = getRollAdvange(player);
|
||||||
amount += advantage;
|
amount += advantage;
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ public class TriggerHandler {
|
|||||||
return FileSection.parseToMap(trigParse, FileSection.DOLLAR_SIGN_KV_SEPARATOR);
|
return FileSection.parseToMap(trigParse, FileSection.DOLLAR_SIGN_KV_SEPARATOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void collectTriggerForWaiting() {
|
public void collectTriggerForWaiting() {
|
||||||
for (final TriggerWaiting wt : waitingTriggers) {
|
for (final TriggerWaiting wt : waitingTriggers) {
|
||||||
if (wt.getTriggers() != null)
|
if (wt.getTriggers() != null)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user