Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Zachary Kline
2020-06-29 10:36:27 -07:00
223 changed files with 158 additions and 27 deletions

View File

@@ -6,7 +6,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.35-SNAPSHOT</version>
<version>1.6.36-SNAPSHOT</version>
</parent>
<artifactId>forge-ai</artifactId>

View File

@@ -5,6 +5,7 @@ import java.util.List;
import java.util.Map;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.Lists;
import forge.card.CardType;
@@ -23,6 +24,7 @@ import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.spellability.SpellAbilityStackInstance;
import forge.game.zone.ZoneType;
import forge.util.Aggregates;
import forge.util.TextUtil;
import forge.util.collect.FCollectionView;
@@ -105,6 +107,24 @@ public class AiCostDecision extends CostDecisionMakerBase {
}
return PaymentDecision.card(randomSubset);
}
else if (type.equals("DifferentNames")) {
CardCollection differentNames = new CardCollection();
CardCollection discardMe = CardLists.filter(hand, CardPredicates.hasSVar("DiscardMe"));
while (c > 0) {
Card chosen;
if (!discardMe.isEmpty()) {
chosen = Aggregates.random(discardMe);
discardMe = CardLists.filter(discardMe, Predicates.not(CardPredicates.sharesNameWith(chosen)));
} else {
final Card worst = ComputerUtilCard.getWorstAI(hand);
chosen = worst != null ? worst : Aggregates.random(hand);
}
differentNames.add(chosen);
hand = CardLists.filter(hand, Predicates.not(CardPredicates.sharesNameWith(chosen)));
c--;
}
return PaymentDecision.card(differentNames);
}
else {
final AiController aic = ((PlayerControllerAi)player.getController()).getAi();

View File

@@ -6,7 +6,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.35-SNAPSHOT</version>
<version>1.6.36-SNAPSHOT</version>
</parent>
<artifactId>forge-core</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.35-SNAPSHOT</version>
<version>1.6.36-SNAPSHOT</version>
</parent>
<artifactId>forge-game</artifactId>

View File

@@ -18,6 +18,9 @@
package forge.game.cost;
import java.util.Map;
import java.util.Set;
import com.google.common.collect.Sets;
import forge.game.ability.AbilityKey;
import forge.game.card.Card;
@@ -83,6 +86,9 @@ public class CostDiscard extends CostPartWithList {
else if (this.getType().equals("LastDrawn")) {
sb.append("the last card you drew this turn");
}
else if (this.getType().equals("DifferentNames")) {
sb.append(Cost.convertAmountTypeToWords(i, this.getAmount(), "Card")).append(" with different names");
}
else {
final StringBuilder desc = new StringBuilder();
@@ -129,6 +135,13 @@ public class CostDiscard extends CostPartWithList {
final Card c = payer.getLastDrawnCard();
return handList.contains(c);
}
else if (type.equals("DifferentNames")) {
Set<String> cardNames = Sets.newHashSet();
for (Card c : handList) {
cardNames.add(c.getName());
}
return amount != null && cardNames.size() >= amount;
}
else {
boolean sameName = false;
if (type.contains("+WithSameName")) {

View File

@@ -3009,9 +3009,12 @@ public class Player extends GameEntity implements Comparable<Player> {
final String name = Lang.getPossesive(companion.getName()) + " Companion Effect";
DetachedCardEffect eff = new DetachedCardEffect(companion, name);
String mayBePlayedAbility = "Mode$ Continuous | EffectZone$ Command | MayPlay$ True | Affected$ Card.YouOwn+EffectSource | AffectedZone$ Command";
eff.addStaticAbility(mayBePlayedAbility);
// Probably remove this effect when the spell is cast via a static trigger
String addToHandAbility = "Mode$ Continuous | EffectZone$ Command | Affected$ Card.YouOwn+EffectSource | AffectedZone$ Command | AddAbility$ MoveToHand";
String moveToHand = "ST$ ChangeZone | Cost$ 3 | Defined$ Self | Origin$ Command | Destination$ Hand | ActivationZone$ Command | SpellDescription$ Companion - Put CARDNAME in to your hand";
eff.setSVar("MoveToHand", moveToHand);
eff.addStaticAbility(addToHandAbility);
// TODO Probably remove this effect when the moved to hand
return eff;
}

View File

@@ -19,7 +19,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.35-SNAPSHOT</version>
<version>1.6.36-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-android</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.35-SNAPSHOT</version>
<version>1.6.36-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-desktop</artifactId>

View File

@@ -12,7 +12,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.35-SNAPSHOT</version>
<version>1.6.36-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-ios</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.35-SNAPSHOT</version>
<version>1.6.36-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-mobile-dev</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.35-SNAPSHOT</version>
<version>1.6.36-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-mobile</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.35-SNAPSHOT</version>
<version>1.6.36-SNAPSHOT</version>
</parent>
<artifactId>forge-gui</artifactId>

View File

@@ -1,5 +1,6 @@
#Add one announcement per line
IKO Release. Sorry Companions and Mutate will take some more time. They are still very much on the radar.
We believe the issue with 1.8.0_211 or greater have been resolved. Let us know if you are still on the latest version and things are better now.
M21 Pre-release.
Mutate is NOT finished yet. Please be patient.
Companion is in, but unfortunately Wizards changed the rules on us. We'll get the new rules in when we can.
[b]Forge now requires Java 8 (or newer). You will not be able to start the game if you are not yet running Java 8.[/b]
We have a Discord server for hanging out with Forge devs and other Forge fans. Feel free to [url=https://discord.gg/3v9JCVr]jump on in and say hi[/url]!

View File

@@ -3,6 +3,7 @@ apantel
Austinio7116
Churrufli
DrDev
Elwin
excessum
Flair
Gos

View File

@@ -86,3 +86,4 @@ Throne of Eldraine, 3/6/ELD, ELD
Theros: Beyond Death, 3/6/THB, THB
Mystery Booster, 3/6/THB, MB1
Ikoria: Lair of Behemoths, 3/6/IKO, IKO
Core Set 2021, 3/6/M21, M21

View File

@@ -113,3 +113,4 @@ ELD: 36 Boosters
THB: 36 Boosters
MB1: 24 Boosters
IKO: 36 Boosters
M21: 36 Boosters

View File

@@ -78,3 +78,5 @@ THB: 10 Boosters, 40 BasicLands
#needs to be 20 BasicLands, 20 Foil BasicLands, 1 Arasta of the Endless Web+|THB|3
IKO: 10 Boosters, 40 BasicLands
#needs to be 20 BasicLands, 20 Foil BasicLands, 1 Colossification+|IKO|3
M21: 10 Boosters, 40 BasicLands
#needs to be 20 BasicLands, 20 Foil BasicLands, 1 Pack Leader+|M21|3

View File

@@ -0,0 +1,5 @@
Name:Eliminate
ManaCost:1 B
Types:Instant
A:SP$ Destroy | Cost$ 1 B | ValidTgts$ Creature+cmcLE3,Planeswalker+cmcLE3 | TgtPrompt$ Select target creature or planeswalker with converted mana cost 3 or less | SpellDescription$ Destroy target creature or planeswalker with converted mana cost 3 or less.
Oracle:Destroy target creature or planeswalker with converted mana cost 3 or less.

Some files were not shown because too many files have changed in this diff Show More