mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Merge branch 'tasha' into 'master'
Tasha's Hideous Laughter: Fix infinite loop when lib empties See merge request core-developers/forge!5039
This commit is contained in:
@@ -49,7 +49,7 @@ public class RepeatEffect extends SpellAbilityEffect {
|
||||
// TODO Replace Infinite Loop Break with a game draw. Here are the scenarios that can cause this:
|
||||
// Helm of Obedience vs Graveyard to Library replacement effect
|
||||
|
||||
if(source.getName().equals("Helm of Obedience")) {
|
||||
if (source.getName().equals("Helm of Obedience")) {
|
||||
StringBuilder infLoop = new StringBuilder(sa.getHostCard().toString());
|
||||
infLoop.append(" - To avoid an infinite loop, this repeat has been broken ");
|
||||
infLoop.append(" and the game will now continue in the current state, ending the loop early. ");
|
||||
|
||||
@@ -2,8 +2,9 @@ Name:Tasha's Hideous Laughter
|
||||
ManaCost:1 U U
|
||||
Types:Sorcery
|
||||
A:SP$ RepeatEach | RepeatPlayers$ Opponent | RepeatSubAbility$ DBRepeat | SpellDescription$ Each opponent exiles cards from the top of their library until that player has exiled cards with total mana value 20 or more.
|
||||
SVar:DBRepeat:DB$ Repeat | RepeatSubAbility$ DBExile | RepeatCheckSVar$ X | RepeatSVarCompare$ LT20 | SubAbility$ DBCleanup
|
||||
SVar:DBRepeat:DB$ Repeat | RepeatSubAbility$ DBExile | RepeatCheckSVar$ X | RepeatSVarCompare$ LT20 | MaxRepeat$ Y | SubAbility$ DBCleanup
|
||||
SVar:DBExile:DB$ Dig | Defined$ Remembered | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | Imprint$ True
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearImprinted$ True
|
||||
SVar:X:Imprinted$CardManaCost
|
||||
SVar:Y:PlayerCountRemembered$CardsInLibrary
|
||||
Oracle:Each opponent exiles cards from the top of their library until that player has exiled cards with total mana value 20 or more.
|
||||
|
||||
Reference in New Issue
Block a user