mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
merge latest trunk
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -538,6 +538,7 @@ res/cardsfolder/a/ashes_of_the_fallen.txt svneol=native#text/plain
|
||||
res/cardsfolder/a/ashes_to_ashes.txt svneol=native#text/plain
|
||||
res/cardsfolder/a/ashling_the_extinguisher.txt -text
|
||||
res/cardsfolder/a/ashling_the_extinguisher_avatar.txt -text
|
||||
res/cardsfolder/a/ashling_the_pilgrim.txt -text
|
||||
res/cardsfolder/a/ashling_the_pilgrim_avatar.txt -text
|
||||
res/cardsfolder/a/ashlings_prerogative.txt -text
|
||||
res/cardsfolder/a/ashmouth_hound.txt -text
|
||||
@@ -9549,6 +9550,7 @@ res/cardsfolder/s/simic_guildgate.txt -text
|
||||
res/cardsfolder/s/simic_guildmage.txt -text
|
||||
res/cardsfolder/s/simic_initiate.txt -text
|
||||
res/cardsfolder/s/simic_keyrune.txt -text
|
||||
res/cardsfolder/s/simic_manipulator.txt -text
|
||||
res/cardsfolder/s/simic_ragworm.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/simic_signet.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/simic_sky_swallower.txt svneol=native#text/plain
|
||||
|
||||
18
res/cardsfolder/a/ashling_the_pilgrim.txt
Normal file
18
res/cardsfolder/a/ashling_the_pilgrim.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
Name:Ashling the Pilgrim
|
||||
ManaCost:1 R
|
||||
Types:Legendary Creature Elemental Shaman
|
||||
PT:1/1
|
||||
A:AB$ PutCounter | Cost$ 1 R | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ StoreNum | StackDescription$ SpellDescription | SpellDescription$ Put a +1/+1 counter on CARDNAME. If this is the third time this ability has resolved this turn, remove all +1/+1 counters from CARDNAME, and it deals that much damage to each creature and each player.
|
||||
SVar:StoreNum:DB$ StoreSVar | SVar$ AshlingNum | Type$ CountSVar | Expression$ AshlingNum/Plus.1 | SubAbility$ DBRemoveCounter
|
||||
SVar:DBRemoveCounter:DB$ RemoveCounter | CounterType$ P1P1 | CounterNum$ All | RememberRemoved$ True | SubAbility$ DBDmg | ConditionCheckSVar$ AshlingNum | ConditionSVarCompare$ EQ3 | StackDescription$ None
|
||||
SVar:DBDmg:DB$ DamageAll | NumDmg$ X | References$ X | ValidCards$ Creature | ValidPlayers$ Each | ValidDescription$ each creature and each player. | SubAbility$ DBCleanup | ConditionCheckSVar$ AshlingNum | ConditionSVarCompare$ EQ3 | StackDescription$ None
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:AshlingNum:Number$0
|
||||
SVar:X:Count$RememberedSize
|
||||
T:Mode$ Phase | Phase$ Cleanup | Execute$ TrigReset | Static$ True
|
||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigReset | Static$ True
|
||||
SVar:TrigReset:AB$ StoreSVar | Cost$ 0 | SVar$ AshlingNum | Type$ Number | Expression$ 0
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/ashling_the_pilgrim.jpg
|
||||
Oracle:{1}{R}: Put a +1/+1 counter on Ashling the Pilgrim. If this is the third time this ability has resolved this turn, remove all +1/+1 counters from Ashling the Pilgrim, and it deals that much damage to each creature and each player.
|
||||
SetInfo:LRW Rare
|
||||
@@ -22,5 +22,5 @@ SVar:DBReset2:DB$ StoreSVar | SVar$ MinHand | Type$ Number | Expression$ 9999
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/balancing_act.jpg
|
||||
SVar:RemAIDeck:True
|
||||
SVar:RemRandomDeck:True
|
||||
SetInfo:ODY Rare
|
||||
Oracle:Each player chooses a number of permanents he or she controls equal to the number of permanents controlled by the player who controls the fewest, then sacrifices the rest. Each player discards cards the same way.
|
||||
SetInfo:ODY Rare
|
||||
@@ -6,10 +6,10 @@ SVar:Picture:http://www.wizards.com/global/images/magic/general/fog.jpg
|
||||
Oracle:Prevent all combat damage that would be dealt this turn.
|
||||
SetInfo:2ED Common
|
||||
SetInfo:7ED Common
|
||||
SetInfo:M12 Common
|
||||
SetInfo:6ED Common
|
||||
SetInfo:M10 Common
|
||||
SetInfo:MIR Common
|
||||
SetInfo:M12 Common
|
||||
SetInfo:M11 Common
|
||||
SetInfo:LEB Common
|
||||
SetInfo:M13 Common
|
||||
|
||||
@@ -3,8 +3,8 @@ ManaCost:3 W
|
||||
Types:Creature Griffin
|
||||
PT:2/3
|
||||
K:Flying
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever a creature enters the battlefield under your control, CARDNAME gets +1/+1 until end of turn.
|
||||
SVar:TrigPump:AB$Pump | Cost$ 0 | Defined$ Self | NumAtt$ 1 | NumDef$ 1
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.YouCtrl+Other | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever another creature enters the battlefield under your control, CARDNAME gets +1/+1 until end of turn.
|
||||
SVar:TrigPump:AB$ Pump | Cost$ 0 | Defined$ Self | NumAtt$ 1 | NumDef$ 1
|
||||
SVar:BuffedBy:Creature
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/griffin_protector.jpg
|
||||
Oracle:Flying\nWhenever another creature enters the battlefield under your control, Griffin Protector gets +1/+1 until end of turn.
|
||||
|
||||
@@ -8,5 +8,5 @@ SVar:LandsControlled:Count$Valid Land.RememberedPlayerCtrl
|
||||
SVar:SacX:SVar$LandsControlled/Minus.5
|
||||
SVar:FetchX:Number$5/Minus.LandsControlled
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/natural_balance.jpg
|
||||
SetInfo:MIR Rare
|
||||
Oracle:Each player who controls six or more lands chooses five lands he or she controls and sacrifices the rest. Each player who controls four or fewer lands may search his or her library for up to X basic land cards and put them onto the battlefield, where X is five minus the number of lands he or she controls. Then each player who searched his or her library this way shuffles it.
|
||||
SetInfo:MIR Rare
|
||||
@@ -1,7 +1,7 @@
|
||||
Name:Ooze Flux
|
||||
ManaCost:3 G
|
||||
Types:Enchantment
|
||||
A:AB$ Token | Announce$ X | Cost$ XCantBe0 1 G SubCounter<X/P1P1/Creature/among creatures you control> | TokenAmount$ 1 | TokenName$ Ooze | TokenTypes$ Creature,Ooze | TokenOwner$ You | TokenImage$ G X X Ooze | TokenColors$ Green | TokenPower$ X | TokenToughness$ X | SpellDescription$ Put a green Saproling creature token onto the battlefield. It has "This creature's power and toughness are each equal to the number of fade counters on CARDNAME."
|
||||
A:AB$ Token | Announce$ X | Cost$ XCantBe0 1 G SubCounter<X/P1P1/Creature/among creatures you control> | TokenAmount$ 1 | TokenName$ Ooze | TokenTypes$ Creature,Ooze | TokenOwner$ You | TokenImage$ G X X Ooze | TokenColors$ Green | TokenPower$ X | TokenToughness$ X | SpellDescription$ Put an X/X green Ooze creature token onto the battlefield, where X is the number of +1/+1 counters removed this way.
|
||||
SVar:X:Count$xPaid
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/ooze_flux.jpg
|
||||
|
||||
11
res/cardsfolder/s/simic_manipulator.txt
Normal file
11
res/cardsfolder/s/simic_manipulator.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Simic Manipulator
|
||||
ManaCost:1 U U
|
||||
Types:Creature Merfolk
|
||||
PT:0/1
|
||||
K:Evolve
|
||||
A:AB$ GainControl | Announce$ X | Cost$ XCantBe0 T SubCounter<X/P1P1/CARDNAME> | ValidTgts$ Creature.powerLEX | TgtPrompt$ Select target with power less than or equal to the number of +1/+1 counters removed this way | SpellDescription$ Gain control of target creature with power less than or equal to the number of +1/+1 counters removed this way.
|
||||
SVar:X:Count$xPaid
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/simic_manipulator.jpg
|
||||
Oracle:Evolve (Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness than this creature, put a +1/+1 counter on this creature.)\n{T}, Remove one or more +1/+1 counters from Simic Manipulator: Gain control of target creature with power less than or equal to the number of +1/+1 counters removed this way.
|
||||
SetInfo:GTC Rare
|
||||
@@ -7,5 +7,5 @@ K:Phasing
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPhaseLands | TriggerDescription$ At the beginning of your upkeep, all lands you control phase out.
|
||||
SVar:TrigPhaseLands:DB$ Phases | Defined$ Valid Land.YouCtrl
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/taniwha.jpg
|
||||
SetInfo:MIR Rare
|
||||
Oracle:Trample\nPhasing (This phases in or out before you untap during each of your untap steps. While it's phased out, it's treated as though it doesn't exist.)\nAt the beginning of your upkeep, all lands you control phase out. (They phase in before you untap during your next untap step.)
|
||||
SetInfo:MIR Rare
|
||||
@@ -1,7 +1,6 @@
|
||||
Name:Vision Charm
|
||||
ManaCost:U
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$ Charm | Cost$ U | Choices$ MillOpp,ChangeType,PhaseArtifact | CharmNum$ 1 | SpellDescription$ Choose one - Target player puts the top four cards of his or her library into his or her graveyard; or choose a land type and a basic land type, and each land of the first chosen type becomes the second chosen type until end of turn; or target artifact phases out. (While it's phased out, it's treated as though it doesn't exist. It phases in before its controller untaps during his or her next untap step.)
|
||||
SVar:MillOpp:DB$ Mill | NumCards$ 4 | ValidTgts$ Player | TgtPrompt$ Choose a player | SpellDescription$ Target player puts the top four cards of his or her library into his or her graveyard.
|
||||
SVar:ChangeType:DB$ ChooseType | Defined$ You | Type$ Land | SubAbility$ RemFirstLand | SpellDescription$ Choose a land type and a basic land type, and each land of the first chosen type becomes the second chosen type until end of turn.
|
||||
|
||||
@@ -46,6 +46,7 @@ Name=GtcGuildSimic
|
||||
1 Simic Charm|GTC
|
||||
1 Simic Fluxmage|GTC
|
||||
1 Simic Keyrune|GTC
|
||||
1 Simic Manipulator|GTC
|
||||
1 Skygames|GTC
|
||||
1 Spell Rupture|GTC
|
||||
1 Spire Tracer|GTC
|
||||
|
||||
@@ -180,7 +180,7 @@ public class ChangeZoneAi extends SpellAbilityAi {
|
||||
if (part instanceof CostDiscard) {
|
||||
CostDiscard cd = (CostDiscard) part;
|
||||
// this is mainly for typecycling
|
||||
if (!cd.isTargetingThis() || !ComputerUtil.isWorseThanDraw(ai, source)) {
|
||||
if (!cd.payCostFromSource() || !ComputerUtil.isWorseThanDraw(ai, source)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class DestroyAi extends SpellAbilityAi {
|
||||
continue;
|
||||
}
|
||||
CostSacrifice sacCost = (CostSacrifice) part;
|
||||
if (sacCost.isTargetingThis() && ComputerUtilCost.canPayCost(ability, c.getController())) {
|
||||
if (sacCost.payCostFromSource() && ComputerUtilCost.canPayCost(ability, c.getController())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class CostDiscard extends CostPartWithList {
|
||||
|
||||
final Integer i = this.convertAmount();
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
sb.append(this.getType());
|
||||
} else if (this.getType().equals("Hand")) {
|
||||
sb.append("your hand");
|
||||
@@ -108,7 +108,7 @@ public class CostDiscard extends CostPartWithList {
|
||||
String type = this.getType();
|
||||
final Integer amount = this.convertAmount();
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
if (!source.isInZone(ZoneType.Hand)) {
|
||||
return false;
|
||||
}
|
||||
@@ -174,7 +174,7 @@ public class CostDiscard extends CostPartWithList {
|
||||
final String amount = this.getAmount();
|
||||
this.resetList();
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
if (!handList.contains(source)) {
|
||||
return false;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ public class CostDiscard extends CostPartWithList {
|
||||
this.addToList(ai.getLastDrawnCard());
|
||||
}
|
||||
|
||||
else if (this.isTargetingThis()) {
|
||||
else if (this.payCostFromSource()) {
|
||||
if (!hand.contains(source)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ public class CostExile extends CostPartWithList {
|
||||
final Integer i = this.convertAmount();
|
||||
sb.append("Exile ");
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
sb.append(this.getType());
|
||||
if (!this.from.equals(ZoneType.Battlefield)) {
|
||||
sb.append(" from your ").append(this.from);
|
||||
@@ -507,7 +507,7 @@ public class CostExile extends CostPartWithList {
|
||||
final String desc = this.getTypeDescription() == null ? this.getType() : this.getTypeDescription();
|
||||
|
||||
sb.append(Cost.convertAmountTypeToWords(i, this.getAmount(), desc));
|
||||
if (!this.isTargetingThis()) {
|
||||
if (!this.payCostFromSource()) {
|
||||
sb.append(" you control");
|
||||
}
|
||||
return sb.toString();
|
||||
@@ -561,7 +561,7 @@ public class CostExile extends CostPartWithList {
|
||||
typeList = new ArrayList<Card>(activator.getCardsIn(this.getFrom()));
|
||||
}
|
||||
}
|
||||
if (!this.isTargetingThis()) {
|
||||
if (!this.payCostFromSource()) {
|
||||
typeList = CardLists.getValidCards(typeList, this.getType().split(";"), activator, source);
|
||||
|
||||
final Integer amount = this.convertAmount();
|
||||
@@ -652,7 +652,7 @@ public class CostExile extends CostPartWithList {
|
||||
}
|
||||
|
||||
Input target = null;
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
target = new InputExileThis(payment, this, ability);
|
||||
} else if (this.from.equals(ZoneType.Battlefield) || this.from.equals(ZoneType.Hand)) {
|
||||
target = new InputExileType(this, payment, this.getType(), c, ability);
|
||||
@@ -691,7 +691,7 @@ public class CostExile extends CostPartWithList {
|
||||
@Override
|
||||
public final boolean decideAIPayment(final AIPlayer ai, final SpellAbility ability, final Card source, final CostPayment payment) {
|
||||
this.resetList();
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
this.getList().add(source);
|
||||
} else if (this.getType().equals("All")) {
|
||||
this.setList(new ArrayList<Card>(ability.getActivatingPlayer().getCardsIn(this.getFrom())));
|
||||
|
||||
@@ -87,7 +87,7 @@ public abstract class CostPart {
|
||||
*
|
||||
* @return the this
|
||||
*/
|
||||
public final boolean isTargetingThis() {
|
||||
public final boolean payCostFromSource() {
|
||||
return this.getType().equals("CARDNAME");
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ public class CostPutCounter extends CostPartWithList {
|
||||
sb.append(Cost.convertAmountTypeToWords(i, this.getAmount(), this.counter.getName() + " counter"));
|
||||
|
||||
sb.append(" on ");
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
sb.append(this.getType());
|
||||
} else {
|
||||
final String desc = this.getTypeDescription() == null ? this.getType() : this.getTypeDescription();
|
||||
@@ -128,7 +128,7 @@ public class CostPutCounter extends CostPartWithList {
|
||||
*/
|
||||
@Override
|
||||
public final boolean canPay(final SpellAbility ability, final Card source, final Player activator, final Cost cost, final GameState game) {
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
if (source.hasKeyword("CARDNAME can't have counters placed on it.")) {
|
||||
return false;
|
||||
}
|
||||
@@ -161,7 +161,7 @@ public class CostPutCounter extends CostPartWithList {
|
||||
c = AbilityUtils.calculateAmount(source, this.getAmount(), ability);
|
||||
}
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
source.addCounter(this.getCounter(), c, false);
|
||||
} else {
|
||||
// Put counter on chosen card
|
||||
@@ -185,7 +185,7 @@ public class CostPutCounter extends CostPartWithList {
|
||||
c = AbilityUtils.calculateAmount(source, this.getAmount(), ability);
|
||||
}
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
source.addCounter(this.getCounter(), c, false);
|
||||
payment.setPaidManaPart(this);
|
||||
this.addToList(source);
|
||||
@@ -207,7 +207,7 @@ public class CostPutCounter extends CostPartWithList {
|
||||
@Override
|
||||
public final boolean decideAIPayment(final AIPlayer ai, final SpellAbility ability, final Card source, final CostPayment payment) {
|
||||
this.resetList();
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
this.addToList(source);
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -130,7 +130,7 @@ public class CostRemoveCounter extends CostPartWithList {
|
||||
|
||||
sb.append(" from ");
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
sb.append(this.getType());
|
||||
} else {
|
||||
final String desc = this.getTypeDescription() == null ? this.getType() : this.getTypeDescription();
|
||||
@@ -165,7 +165,7 @@ public class CostRemoveCounter extends CostPartWithList {
|
||||
final CounterType cntrs = this.getCounter();
|
||||
|
||||
final Integer amount = this.convertAmount();
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
if ((amount != null) && ((source.getCounters(cntrs) - amount) < 0)) {
|
||||
return false;
|
||||
}
|
||||
@@ -203,7 +203,7 @@ public class CostRemoveCounter extends CostPartWithList {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
source.subtractCounter(this.counter, c);
|
||||
} else {
|
||||
for (final Card card : this.getList()) {
|
||||
@@ -226,7 +226,7 @@ public class CostRemoveCounter extends CostPartWithList {
|
||||
Integer c = this.convertAmount();
|
||||
int maxCounters = 0;
|
||||
|
||||
if (!this.isTargetingThis()) {
|
||||
if (!this.payCostFromSource()) {
|
||||
if (c == null) {
|
||||
final String sVar = ability.getSVar(amount);
|
||||
// Generalize this
|
||||
@@ -302,7 +302,7 @@ public class CostRemoveCounter extends CostPartWithList {
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.isTargetingThis()) {
|
||||
if (!this.payCostFromSource()) {
|
||||
this.getList().clear();
|
||||
final List<Card> typeList =
|
||||
CardLists.getValidCards(ai.getCardsIn(this.getZone()), this.getType().split(";"), ai, source);
|
||||
|
||||
@@ -69,7 +69,7 @@ public class CostReturn extends CostPartWithList {
|
||||
final Integer i = this.convertAmount();
|
||||
String pronoun = "its";
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
sb.append(this.getType());
|
||||
} else {
|
||||
final String desc = this.getTypeDescription() == null ? this.getType() : this.getTypeDescription();
|
||||
@@ -97,7 +97,7 @@ public class CostReturn extends CostPartWithList {
|
||||
*/
|
||||
@Override
|
||||
public final boolean canPay(final SpellAbility ability, final Card source, final Player activator, final Cost cost, final GameState game) {
|
||||
if (!this.isTargetingThis()) {
|
||||
if (!this.payCostFromSource()) {
|
||||
boolean needsAnnoucement = ability.hasParam("Announce") && this.getType().contains(ability.getParam("Announce"));
|
||||
|
||||
List<Card> typeList = new ArrayList<Card>(activator.getCardsIn(ZoneType.Battlefield));
|
||||
@@ -149,7 +149,7 @@ public class CostReturn extends CostPartWithList {
|
||||
c = AbilityUtils.calculateAmount(source, amount, ability);
|
||||
}
|
||||
}
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
final Input inp = CostReturn.returnThis(ability, payment, this);
|
||||
Singletons.getModel().getMatch().getInput().setInputInterrupt(inp);
|
||||
} else {
|
||||
@@ -169,7 +169,7 @@ public class CostReturn extends CostPartWithList {
|
||||
@Override
|
||||
public final boolean decideAIPayment(final AIPlayer ai, final SpellAbility ability, final Card source, final CostPayment payment) {
|
||||
this.resetList();
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
this.getList().add(source);
|
||||
} else {
|
||||
Integer c = this.convertAmount();
|
||||
|
||||
@@ -71,7 +71,7 @@ public class CostReveal extends CostPartWithList {
|
||||
final String type = this.getType();
|
||||
final Integer amount = this.convertAmount();
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
if (!source.isInZone(ZoneType.Hand)) {
|
||||
return false;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public class CostReveal extends CostPartWithList {
|
||||
List<Card> hand = new ArrayList<Card>(ai.getCardsIn(ZoneType.Hand));
|
||||
this.resetList();
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
if (!hand.contains(source)) {
|
||||
return false;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ public class CostReveal extends CostPartWithList {
|
||||
final String amount = this.getAmount();
|
||||
this.resetList();
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
this.addToList(source);
|
||||
payment.setPaidManaPart(this);
|
||||
} else if (this.getType().equals("Hand")) {
|
||||
@@ -199,7 +199,7 @@ public class CostReveal extends CostPartWithList {
|
||||
|
||||
final Integer i = this.convertAmount();
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
sb.append(this.getType());
|
||||
} else if (this.getType().equals("Hand")) {
|
||||
return ("Reveal you hand");
|
||||
|
||||
@@ -67,7 +67,7 @@ public class CostSacrifice extends CostPartWithList {
|
||||
|
||||
final Integer i = this.convertAmount();
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
sb.append(this.getType());
|
||||
} else {
|
||||
final String desc = this.getTypeDescription() == null ? this.getType() : this.getTypeDescription();
|
||||
@@ -90,7 +90,7 @@ public class CostSacrifice extends CostPartWithList {
|
||||
@Override
|
||||
public final boolean canPay(final SpellAbility ability, final Card source, final Player activator, final Cost cost, final GameState game) {
|
||||
// You can always sac all
|
||||
if (!this.isTargetingThis()) {
|
||||
if (!this.payCostFromSource()) {
|
||||
// If the sacrificed type is dependant on an annoucement, can't necesarily rule out the CanPlay call
|
||||
boolean needsAnnoucement = ability.hasParam("Announce") && this.getType().contains(ability.getParam("Announce"));
|
||||
|
||||
@@ -154,7 +154,7 @@ public class CostSacrifice extends CostPartWithList {
|
||||
list = CardLists.getNotType(list, "Creature");
|
||||
}
|
||||
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
final Input inp = CostSacrifice.sacrificeThis(ability, payment, this);
|
||||
Singletons.getModel().getMatch().getInput().setInputInterrupt(inp);
|
||||
} else if (amount.equals("All")) {
|
||||
@@ -195,7 +195,7 @@ public class CostSacrifice extends CostPartWithList {
|
||||
public final boolean decideAIPayment(final AIPlayer ai, final SpellAbility ability, final Card source, final CostPayment payment) {
|
||||
this.resetList();
|
||||
final Player activator = ability.getActivatingPlayer();
|
||||
if (this.isTargetingThis()) {
|
||||
if (this.payCostFromSource()) {
|
||||
this.getList().add(source);
|
||||
} else if (this.getAmount().equals("All")) {
|
||||
/*List<Card> typeList = new ArrayList<Card>(activator.getCardsIn(ZoneType.Battlefield));
|
||||
|
||||
@@ -1701,7 +1701,8 @@ public abstract class SpellAbility implements ISpellAbility {
|
||||
String value = this.getActivatingPlayer().getController().announceRequirements(this, aVar);
|
||||
if (value == null || !StringUtils.isNumeric(value)) {
|
||||
return false;
|
||||
} else if (this.getPayCosts().getCostMana().isxCantBe0() && Integer.parseInt(value) == 0) {
|
||||
} else if (this.getPayCosts().getCostMana() != null && this.getPayCosts().getCostMana().isxCantBe0()
|
||||
&& Integer.parseInt(value) == 0) {
|
||||
return false;
|
||||
}
|
||||
this.setSVar(aVar, "Number$" + value);
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ComputerUtilCost {
|
||||
final CounterType type = remCounter.getCounter();
|
||||
final double percent = type.name().equals("P1P1") ? p1p1Percent : otherPercent;
|
||||
final int currentNum = source.getCounters(type);
|
||||
if (!part.isTargetingThis()) {
|
||||
if (!part.payCostFromSource()) {
|
||||
if (type.name().equals("P1P1")) {
|
||||
return false;
|
||||
}
|
||||
@@ -224,7 +224,7 @@ public class ComputerUtilCost {
|
||||
for (final CostPart part : cost.getCostParts()) {
|
||||
if (part instanceof CostSacrifice) {
|
||||
final CostSacrifice sac = (CostSacrifice) part;
|
||||
if (sac.isTargetingThis() && source.isCreature()) {
|
||||
if (sac.payCostFromSource() && source.isCreature()) {
|
||||
return false;
|
||||
}
|
||||
final String type = sac.getType();
|
||||
|
||||
Reference in New Issue
Block a user