- Added Puca's Mischief and Spawnbroker

This commit is contained in:
swordshine
2013-05-24 05:54:18 +00:00
parent 44e967bfcb
commit cf448b4595
7 changed files with 73 additions and 1 deletions

2
.gitattributes vendored
View File

@@ -8277,6 +8277,7 @@ res/cardsfolder/p/psychotic_haze.txt svneol=native#text/plain
res/cardsfolder/p/psychotrope_thallid.txt svneol=native#text/plain
res/cardsfolder/p/pteron_ghost.txt svneol=native#text/plain
res/cardsfolder/p/public_execution.txt -text
res/cardsfolder/p/pucas_mischief.txt -text
res/cardsfolder/p/puffer_extract.txt svneol=native#text/plain
res/cardsfolder/p/pull_from_eternity.txt -text
res/cardsfolder/p/pull_under.txt svneol=native#text/plain
@@ -10227,6 +10228,7 @@ res/cardsfolder/s/sparring_collar.txt -text
res/cardsfolder/s/sparring_golem.txt svneol=native#text/plain
res/cardsfolder/s/spatial_merging.txt -text
res/cardsfolder/s/spawn_of_rix_maadi.txt -text
res/cardsfolder/s/spawnbroker.txt -text
res/cardsfolder/s/spawning_breath.txt svneol=native#text/plain
res/cardsfolder/s/spawning_pit.txt svneol=native#text/plain
res/cardsfolder/s/spawning_pool.txt svneol=native#text/plain

View File

@@ -0,0 +1,10 @@
Name:Puca's Mischief
ManaCost:3 U
Types:Enchantment
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigExchange | TriggerDescription$ At the beginning of your upkeep, you may exchange control of target nonland permanent you control and target nonland permanent an opponent controls with an equal or lesser converted mana cost.
SVar:TrigExchange:AB$ Pump | Cost$ 0 | ValidTgts$ Permanent.YouCtrl+nonLand | TgtPrompt$ Select target nonland permanent you control | SubAbility$ DBExchange
SVar:DBExchange:DB$ ExchangeControl | Defined$ ParentTarget | ValidTgts$ Permanent.OppCtrl+nonLand | TgtPrompt$ Select target nonland permanent an opponent controls with less or equal converted mana cost | TargetsWithRelatedProperty$ LECMC
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/pucas_mischief.jpg
Oracle:At the beginning of your upkeep, you may exchange control of target nonland permanent you control and target nonland permanent an opponent controls with an equal or lesser converted mana cost.
SetInfo:SHM Rare

View File

@@ -6,6 +6,7 @@ SVar:DBUnTapYours:DB$ UntapAll | ValidCards$ Creature.YouCtrl | RememberUntapped
SVar:DBGainCtrl:DB$ GainControl | AllValid$ Creature.IsRemembered+RememberedPlayerCtrl | AddKWs$ Haste | NewController$ You | LoseControl$ EOT | ForgetControlled$ True | StackDescription$ None | SubAbility$ DBGainCtrlOpp
SVar:DBGainCtrlOpp:DB$ GainControl | AllValid$ Creature.IsRemembered+YouCtrl | AddKWs$ Haste | NewController$ Player.IsRemembered | LoseControl$ EOT | StackDescription$ None | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/reins_of_power.jpg
Oracle:Untap all creatures you control and all creatures target opponent controls. You and that opponent each gain control of all creatures the other controls until end of turn. Those creatures gain haste until end of turn.
SetInfo:COM Rare

View File

@@ -0,0 +1,11 @@
Name:Spawnbroker
ManaCost:2 U
Types:Creature Human Wizard
PT:1/1
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | OptionalDecider$ You | Execute$ TrigExchange | TriggerDescription$ When CARDNAME enters the battlefield, you may exchange control of target creature you control and target creature with power less than or equal to that creature's power an opponent controls.
SVar:TrigExchange:AB$ Pump | Cost$ 0 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | SubAbility$ DBExchange
SVar:DBExchange:DB$ ExchangeControl | Defined$ ParentTarget | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls with less or equal power | TargetsWithRelatedProperty$ LEPower
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/spawnbroker.jpg
Oracle:When Spawnbroker enters the battlefield, you may exchange control of target creature you control and target creature with power less than or equal to that creature's power an opponent controls.
SetInfo:RAV Rare

View File

@@ -270,6 +270,9 @@ public final class AbilityFactory {
if (mapParams.containsKey("TargetsAtRandom")) {
abTgt.setRandomTarget(true);
}
if (mapParams.containsKey("TargetsWithRelatedProperty")) {
abTgt.setRelatedProperty(mapParams.get("TargetsWithRelatedProperty"));
}
return abTgt;
}

View File

@@ -65,6 +65,7 @@ public class Target {
private boolean singleTarget = false;
private boolean randomTarget = false;
private String definedController = null;
private String relatedProperty = null;
// How many can be targeted?
private String minTargets;
@@ -107,7 +108,9 @@ public class Target {
this.sameController = target.isSameController();
this.withoutSameCreatureType = target.isWithoutSameCreatureType();
this.definedController = target.getDefinedController();
this.relatedProperty = target.getRelatedProperty();
this.singleTarget = target.isSingleTarget();
this.randomTarget = target.isRandomTarget();
this.choice = target.getTargetChoices();
}
@@ -889,6 +892,20 @@ public class Target {
this.definedController = defined;
}
/**
* @return the relatedProperty
*/
public String getRelatedProperty() {
return relatedProperty;
}
/**
* @param related the relatedProperty to set
*/
public void setRelatedProperty(String related) {
this.relatedProperty = related;
}
/**
* @return the singleTarget
*/

View File

@@ -183,7 +183,35 @@ public class TargetSelection {
});
}
}
// If second target has properties related to the first
if (tgt.getRelatedProperty() != null && !targetedObjects.isEmpty()) {
final List<Card> list = new ArrayList<Card>();
final String related = tgt.getRelatedProperty();
for (final Object o : targetedObjects) {
if (o instanceof Card) {
list.add((Card) o);
}
}
if (!list.isEmpty()) {
final Card card = list.get(0);
if ("LEPower".equals(related)) {
choices = CardLists.filter(choices, new Predicate<Card>() {
@Override
public boolean apply(final Card c) {
return c.getCurrentPower() <= card.getCurrentPower();
}
});
}
if ("LECMC".equals(related)) {
choices = CardLists.filter(choices, new Predicate<Card>() {
@Override
public boolean apply(final Card c) {
return c.getCMC() <= card.getCMC();
}
});
}
}
}
// If all cards must be from the same zone
if (tgt.isSingleZone() && !targeted.isEmpty()) {
choices = CardLists.filterControlledBy(choices, targeted.get(0).getController());