Merge branch 'ai' into 'master'

Add ReplaceDamageAi

See merge request core-developers/forge!5512
This commit is contained in:
Michael Kamensky
2021-10-06 20:05:51 +00:00
56 changed files with 175 additions and 164 deletions

View File

@@ -1,9 +1,8 @@
Name:Jeska's Will
ManaCost:2 R
Types:Sorcery
A:SP$ Charm | Cost$ 2 R | MinCharmNum$ 1 | CharmNum$ X | Choices$ DBHandTarget,DBExile | AdditionalDescription$ If you control a commander as you cast this spell, you may choose both.
SVar:DBHandTarget:DB$ Pump | ValidTgts$ Opponent | SubAbility$ DBMana | AILogic$ ManaRitual | SpellDescription$ Add {R} for each card in target opponent's hand.
SVar:DBMana:DB$ Mana | Produced$ R | Amount$ Z | StackDescription$ None
A:SP$ Charm | Cost$ 2 R | MinCharmNum$ 1 | CharmNum$ X | Choices$ DBMana,DBExile | AdditionalDescription$ If you control a commander as you cast this spell, you may choose both.
SVar:DBMana:DB$ Mana | Defined$ You | ValidTgts$ Opponent | AILogic$ ManaRitual | Produced$ R | Amount$ Z | SpellDescription$ Add {R} for each card in target opponent's hand.
SVar:DBExile:DB$ Dig | Defined$ You | DigNum$ 3 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect | SpellDescription$ Exile the top three cards of your library. You may play them this turn.
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ Play | SubAbility$ DBCleanup | ForgetOnMoved$ Exile
SVar:Play:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play the exiled cards this turn.

View File

@@ -2,8 +2,7 @@ Name:Rousing Refrain
ManaCost:3 R R
Types:Sorcery
K:Suspend:3:1 R
A:SP$ Pump | Cost$ 3 R R | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | SubAbility$ DBMana | AILogic$ ManaRitual | StackDescription$ SpellDescription | SpellDescription$ Add {R} for each card in target opponent's hand.
SVar:DBMana:DB$ Mana | Produced$ R | Amount$ Z | PersistentMana$ True | SubAbility$ DBChange | StackDescription$ SpellDescription | SpellDescription$ Until end of turn, you don't lose this mana as steps and phases end.
A:SP$ Mana | Cost$ 3 R R | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | SubAbility$ DBMana | AILogic$ ManaRitual | Produced$ R | Amount$ Z | PersistentMana$ True | Defined$ You | SubAbility$ DBChange | StackDescription$ SpellDescription | SpellDescription$ Until end of turn, you don't lose this mana as steps and phases end.
SVar:Z:TargetedPlayer$CardsInHand
SVar:DBChange:DB$ ChangeZone | Origin$ Stack | Destination$ Exile | WithCountersType$ TIME | WithCountersAmount$ 3 | SpellDescription$ Exile CARDNAME with three time counters on it.
Oracle:Add {R} for each card in target opponent's hand. Until end of turn, you don't lose this mana as steps and phases end. Exile Rousing Refrain with three time counters on it.\nSuspend 3—{1}{R} (Rather than cast this card from your hand, you may pay {1}{R} and exile it with three time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost.)

View File

@@ -119,8 +119,7 @@ public abstract class GuiDownloadService implements Runnable {
});
}
});
}
else {
} else {
//handle special case of zip service
if (onReadyToStart != null) {
onReadyToStart.run();
@@ -147,8 +146,7 @@ public abstract class GuiDownloadService implements Runnable {
progressBar.setDescription("All items have been downloaded.");
btnStart.setText("OK");
btnStart.setCommand(cmdClose);
}
else {
} else {
progressBar.setMaximum(files.size());
progressBar.setDescription(files.size() == 1 ? "1 item found." : files.size() + " items found.");
//for(Entry<String, String> kv : cards.entrySet()) System.out.printf("Will get %s from %s%n", kv.getKey(), kv.getValue());
@@ -223,8 +221,7 @@ public abstract class GuiDownloadService implements Runnable {
}
sb.append(String.format("%02d remaining.", t2Go / 1000));
}
else {
} else {
sb.append(String.format("%d of %d items finished! Skipped " + skipped + " items. Please close!",
count, files.size()));
finish();
@@ -303,8 +300,7 @@ public abstract class GuiDownloadService implements Runnable {
}
// if file is not found and this is a JPG, give PNG a shot...
if ((conn.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) && (url.endsWith(".jpg")))
{
if ((conn.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) && (url.endsWith(".jpg"))) {
fullborder = false;
isJPG = false;
conn.disconnect();
@@ -342,8 +338,7 @@ public abstract class GuiDownloadService implements Runnable {
System.out.println(" Connection failed for url: " + url);
break;
}
}
else {
} else {
System.out.println(" Can't create folder: " + base.getAbsolutePath());
}
}
@@ -425,7 +420,7 @@ public abstract class GuiDownloadService implements Runnable {
String response = HttpUtil.getURL(manifestUrl);
if (response == null) return null;
if (response == null) return null;
String[] strings = response.split("<a href=\"");