Merge branch 'master' into newmaster

This commit is contained in:
Anthony Calosa
2022-07-20 06:20:06 +08:00
12 changed files with 91 additions and 38 deletions

View File

@@ -45,7 +45,7 @@ public class CreatureEvaluator implements Function<Card, Integer> {
value += addValue(toughness * 10, "toughness: " + toughness);
// because backside is always stronger the potential makes it better than a single faced card
if (c.hasKeyword(Keyword.DAYBOUND)) {
if (c.hasKeyword(Keyword.DAYBOUND) && c.hasBackSide()) {
value += addValue(power * 10, "transforming");
}
}

View File

@@ -3486,7 +3486,8 @@ public class AbilityUtils {
}
if (value.equals("OpponentsAttackedThisCombat")) {
return doXMath(game.getCombat().getAttackedOpponents(player).size(), m, source, ctb);
int amount = game.getCombat() == null ? 0 : game.getCombat().getAttackedOpponents(player).size();
return doXMath(amount, m, source, ctb);
}
if (value.equals("DungeonsCompleted")) {

View File

@@ -124,11 +124,12 @@ public class ControlGainEffect extends SpellAbilityEffect {
sa.getParam("Chooser"), sa).get(0) : activator;
CardCollectionView choices = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield),
sa.getParam("Choices"), activator, source, sa);
if (!choices.isEmpty()) {
String title = sa.hasParam("ChoiceTitle") ? sa.getParam("ChoiceTitle") :
Localizer.getInstance().getMessage("lblChooseaCard") +" ";
tgtCards = chooser.getController().chooseCardsForEffect(choices, sa, title, 1, 1, false, null);
if (choices.isEmpty()) {
return;
}
String title = sa.hasParam("ChoiceTitle") ? sa.getParam("ChoiceTitle") :
Localizer.getInstance().getMessage("lblChooseaCard") +" ";
tgtCards = chooser.getController().chooseCardsForEffect(choices, sa, title, 1, 1, false, null);
} else {
tgtCards = getDefinedCards(sa);
}

View File

@@ -1703,7 +1703,7 @@ public class CardProperty {
return false;
}
} else if (property.equals("hadToAttackThisCombat")) {
AttackRequirement e = game.getCombat().getAttackConstraints().getRequirements().get(card);
AttackRequirement e = combat.getAttackConstraints().getRequirements().get(card);
if (e == null || !e.hasCreatureRequirement() || !e.getAttacker().equalsWithTimestamp(card)) {
return false;
}

View File

@@ -384,7 +384,8 @@ public abstract class Trigger extends TriggerReplacementBase {
for (Player opp : this.getHostCard().getController().getOpponents()) {
if (opp.equals(attackedP)) {
continue;
} else if (opp.getLife() > life) {
}
if (opp.getLife() > life) {
found = true;
break;
}

View File

@@ -175,21 +175,6 @@ public class WrappedAbility extends Ability {
return sa.copy();
}
@Override
public Player getActivatingPlayer() {
return sa.getActivatingPlayer();
}
@Override
public String getDescription() {
return sa.getDescription();
}
@Override
public ManaCost getMultiKickerManaCost() {
return sa.getMultiKickerManaCost();
}
@Override
public SpellAbilityRestriction getRestrictions() {
return sa.getRestrictions();
@@ -249,14 +234,18 @@ public class WrappedAbility extends Ability {
}
@Override
public AbilitySub getSubAbility() {
return sa.getSubAbility();
public void setStackDescription(final String s) {
sa.setStackDescription(s);
}
@Override
public TargetRestrictions getTargetRestrictions() {
return sa.getTargetRestrictions();
}
@Override
public void setTargetRestrictions(final TargetRestrictions tgt) {
sa.setTargetRestrictions(tgt);
}
@Override
public Card getTargetCard() {
@@ -267,6 +256,10 @@ public class WrappedAbility extends Ability {
public TargetChoices getTargets() {
return sa.getTargets();
}
@Override
public void setTargets(TargetChoices targets) {
sa.setTargets(targets);
}
@Override
public boolean isAbility() {
@@ -327,16 +320,28 @@ public class WrappedAbility extends Ability {
// sa.resetOnceResolved();
}
@Override
public Player getActivatingPlayer() {
return sa.getActivatingPlayer();
}
@Override
public void setActivatingPlayer(final Player player) {
sa.setActivatingPlayer(player);
}
@Override
public String getDescription() {
return sa.getDescription();
}
@Override
public void setDescription(final String s) {
sa.setDescription(s);
}
@Override
public ManaCost getMultiKickerManaCost() {
return sa.getMultiKickerManaCost();
}
@Override
public void setMultiKickerManaCost(final ManaCost cost) {
sa.setMultiKickerManaCost(cost);
@@ -358,25 +363,14 @@ public class WrappedAbility extends Ability {
}
@Override
public void setStackDescription(final String s) {
sa.setStackDescription(s);
public AbilitySub getSubAbility() {
return sa.getSubAbility();
}
@Override
public void setSubAbility(final AbilitySub subAbility) {
sa.setSubAbility(subAbility);
}
@Override
public void setTargetRestrictions(final TargetRestrictions tgt) {
sa.setTargetRestrictions(tgt);
}
@Override
public void setTargets(TargetChoices targets) {
sa.setTargets(targets);
}
@Override
public void setTargetCard(final Card card) {
sa.setTargetCard(card);

View File

@@ -0,0 +1,7 @@
Name:Astral Confrontation
ManaCost:4 W
Types:Instant
S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ X | EffectZone$ All | Description$ This spell costs {1} less to cast for each opponent you're attacking.
SVar:X:PlayerCountPropertyYou$OpponentsAttackedThisCombat
A:SP$ ChangeZone | Cost$ 4 W | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | SpellDescription$ Exile target creature.
Oracle:This spell costs 1 less to cast for each opponent you're attacking.\nExile target creature.

View File

@@ -0,0 +1,8 @@
Name:Bronze Walrus
ManaCost:3
Types:Artifact Creature Walrus
PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigScry | TriggerDescription$ When CARDNAME enters the battlefield, scry 2. (Look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)
SVar:TrigScry:DB$ Scry | ScryNum$ 2
A:AB$ Mana | Cost$ T | Produced$ Any | SpellDescription$ Add one mana of any color.
Oracle:When Bronze Walrus enters the battlefield, scry 2. (Look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)\n{T}: Add one mana of any color.

View File

@@ -0,0 +1,10 @@
Name:Circle of the Land Druid
ManaCost:1 G
Types:Creature Gnome Druid
PT:1/1
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigMill | TriggerDescription$ When CARDNAME enters the battlefield, you may mill four cards. (You may put the top four cards of your library into your graveyard.)
SVar:TrigMill:DB$ Mill | NumCards$ 4 | Defined$ You | Optional$ True
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ Natural Recovery — When CARDNAME dies, return target land card from your graveyard to your hand.
SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | ValidTgts$ Land.YouCtrl
DeckHas:Ability$Mill|Graveyard
Oracle:When Circle of the Land Druid enters the battlefield, you may mill four cards. (You may put the top four cards of your library into your graveyard.)\nNatural Recovery — When Circle of the Land Druid dies, return target land card from your graveyard to your hand.

View File

@@ -0,0 +1,8 @@
Name:Clockwork Fox
ManaCost:3
Types:Artifact Creature Fox
PT:3/2
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME leaves the battlefield, you draw two cards and each opponent draws a card.
SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ 2 | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | Defined$ Player.Opponent | NumCards$ 1
Oracle:When Clockwork Fox leaves the battlefield, you draw two cards and each opponent draws a card.

View File

@@ -376,6 +376,26 @@ ScryfallCode=HBG
264 C Prophetic Prism @Diego Gisbert
265 C Spiked Pit Trap @Deruchenko Alexander
266 R Baldur's Gate @Titus Lunter
289 L Plains @Bruce Brenneise
290 L Plains @Leanna Crossan
291 L Plains @Titus Lunter
292 L Plains @Emmanuel Shiu
293 L Island @Bruce Brenneise
294 L Island @Piotr Dura
295 L Island @James Paick
296 L Island @Sam White
297 L Swamp @Piotr Dura
298 L Swamp @Logan Feliciano
299 L Swamp @Grady Frederick
300 L Swamp @Sam White
301 L Mountain @Matt Gaser
302 L Mountain @Lucas Graciano
303 L Mountain @Muhammad Firdaus
304 L Mountain @Sam White
305 L Forest @Bruce Brenneise
306 L Forest @Muhammad Firdaus
307 L Forest @Lucas Graciano
308 L Forest @Julian Kok Joon Wen
[rebalanced]
A166 C A-Sepulcher Ghoul @Jason A. Engle

View File

@@ -10,4 +10,7 @@ ScryfallCode=P22
2 R Omniscience @Alayna Danner
3 R Parallel Lives @Greg Staples
4 R Stranglehold @Ralph Horsley
5 R Smothering Tithe @Aurore Folny
6 R Training Grounds @Caroline Gariba
9 R No Mercy @John Stanko
10 R R Growing Rites of Itlimoc @Dmitry Burmak