mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +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);
|
||||
|
||||
// important to collect first otherwise if a static fires it will mess up registered ones from LKI
|
||||
game.getTriggerHandler().collectTriggerForWaiting();
|
||||
if (game.getTriggerHandler().runWaitingTriggers()) {
|
||||
checkAgain = true;
|
||||
}
|
||||
|
||||
@@ -68,6 +68,9 @@ public class RollDiceEffect extends SpellAbilityEffect {
|
||||
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) {
|
||||
if (amount == 0) {
|
||||
return 0;
|
||||
}
|
||||
int advantage = getRollAdvange(player);
|
||||
amount += advantage;
|
||||
int total = 0;
|
||||
|
||||
@@ -180,7 +180,7 @@ public class TriggerHandler {
|
||||
return FileSection.parseToMap(trigParse, FileSection.DOLLAR_SIGN_KV_SEPARATOR);
|
||||
}
|
||||
|
||||
private void collectTriggerForWaiting() {
|
||||
public void collectTriggerForWaiting() {
|
||||
for (final TriggerWaiting wt : waitingTriggers) {
|
||||
if (wt.getTriggers() != null)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user