- Reorganized Conditions of static abilities (WIP).

This commit is contained in:
Sloth
2012-11-25 22:42:37 +00:00
parent c55472f8fd
commit 49772a6667
35 changed files with 59 additions and 66 deletions

View File

@@ -4,9 +4,9 @@ Types:Creature Human
Text:no text Text:no text
PT:2+*/2+* PT:2+*/2+*
K:Trample K:Trample
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | PlayerTurn$ True | Description$ As long as it's your turn, CARDNAME's power and toughness are each equal to 2 plus the number of Swamps your opponents control. As long as it's not your turn, CARDNAME's power and toughness are each 2. S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Condition$ PlayerTurn | Description$ As long as it's your turn, CARDNAME's power and toughness are each equal to 2 plus the number of Swamps your opponents control. As long as it's not your turn, CARDNAME's power and toughness are each 2.
SVar:X:Count$Valid Swamp.OppCtrl/Plus.2 SVar:X:Count$Valid Swamp.OppCtrl/Plus.2
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ 2 | SetToughness$ 2 | OpponentTurn$ True S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ 2 | SetToughness$ 2 | Condition$ NotPlayerTurn
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/angry_mob.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/angry_mob.jpg

View File

@@ -2,10 +2,10 @@ Name:City of Solitude
ManaCost:2 G ManaCost:2 G
Types:Enchantment Types:Enchantment
Text:no text Text:no text
S:Mode$ CantBeCast | ValidCard$ Card | PlayerTurn$ True | Caster$ Opponent | Description$ Players can cast spells and activate abilities only during their own turns. S:Mode$ CantBeCast | ValidCard$ Card | Condition$ PlayerTurn | Caster$ Opponent | Description$ Players can cast spells and activate abilities only during their own turns.
S:Mode$ CantBeCast | ValidCard$ Card | OpponentTurn$ True | Caster$ You S:Mode$ CantBeCast | ValidCard$ Card | Condition$ NotPlayerTurn | Caster$ You
S:Mode$ CantBeActivated | ValidCard$ Card | PlayerTurn$ True | Activator$ Opponent S:Mode$ CantBeActivated | ValidCard$ Card | Condition$ PlayerTurn | Activator$ Opponent
S:Mode$ CantBeActivated | ValidCard$ Card | OpponentTurn$ True | Activator$ You S:Mode$ CantBeActivated | ValidCard$ Card | Condition$ NotPlayerTurn | Activator$ You
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://wizards.com/global/images/magic/general/city_of_solitude.jpg SVar:Picture:http://wizards.com/global/images/magic/general/city_of_solitude.jpg

View File

@@ -2,8 +2,8 @@ Name:Defense Grid
ManaCost:2 ManaCost:2
Types:Artifact Types:Artifact
Text:no text Text:no text
S:Mode$ RaiseCost | Activator$ You | Type$ Spell | Amount$ 3 | OpponentTurn$ True | Description$ Each spell costs 3 more to cast except during its controller's turn. S:Mode$ RaiseCost | Activator$ You | Type$ Spell | Amount$ 3 | Condition$ NotPlayerTurn | Description$ Each spell costs 3 more to cast except during its controller's turn.
S:Mode$ RaiseCost | Activator$ Opponent | Type$ Spell | Amount$ 3 | PlayerTurn$ True S:Mode$ RaiseCost | Activator$ Opponent | Type$ Spell | Amount$ 3 | Condition$ PlayerTurn
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/defense_grid.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/defense_grid.jpg

View File

@@ -3,8 +3,8 @@ ManaCost:1 G G
Types:Legendary Creature Human Monk Types:Legendary Creature Human Monk
Text:no text Text:no text
PT:2/2 PT:2/2
S:Mode$ CantBeCast | ValidCard$ Card | PlayerTurn$ True | Caster$ Opponent | Description$ Players can cast spells only during their own turns. S:Mode$ CantBeCast | ValidCard$ Card | Condition$ PlayerTurn | Caster$ Opponent | Description$ Players can cast spells only during their own turns.
S:Mode$ CantBeCast | ValidCard$ Card | OpponentTurn$ True | Caster$ You S:Mode$ CantBeCast | ValidCard$ Card | Condition$ NotPlayerTurn | Caster$ You
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/dosan_the_falling_leaf.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/dosan_the_falling_leaf.jpg
SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/205.jpg SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/205.jpg

View File

@@ -2,8 +2,8 @@ Name:Glory of Warfare
ManaCost:2 R W ManaCost:2 R W
Types:Enchantment Types:Enchantment
Text:no text Text:no text
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddPower$ 2 | PlayerTurn$ True | Description$ As long as it's your turn, creatures you control get +2/+0. S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddPower$ 2 | Condition$ PlayerTurn | Description$ As long as it's your turn, creatures you control get +2/+0.
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddToughness$ 2 | OpponentTurn$ True | Description$ As long as it's not your turn, creatures you control get +0/+2. S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddToughness$ 2 | Condition$ NotPlayerTurn | Description$ As long as it's not your turn, creatures you control get +0/+2.
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/glory_of_warfare.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/glory_of_warfare.jpg

View File

@@ -3,8 +3,8 @@ ManaCost:W W
Types:Creature Human Cleric Types:Creature Human Cleric
Text:no text Text:no text
PT:2/2 PT:2/2
S:Mode$ CantBeCast | ValidCard$ Card | PlayerTurn$ True | Caster$ Opponent | Description$ During your turn, your opponents can't cast spells or activate abilities of artifacts, creatures, or enchantments. S:Mode$ CantBeCast | ValidCard$ Card | Condition$ PlayerTurn | Caster$ Opponent | Description$ During your turn, your opponents can't cast spells or activate abilities of artifacts, creatures, or enchantments.
S:Mode$ CantBeActivated | ValidCard$ Artifact,Creature,Enchantment | PlayerTurn$ True | Activator$ Opponent S:Mode$ CantBeActivated | ValidCard$ Artifact,Creature,Enchantment | Condition$ PlayerTurn | Activator$ Opponent
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/grand_abolisher.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/grand_abolisher.jpg
SetInfo:M12|Rare|http://magiccards.info/scans/en/m12/19.jpg SetInfo:M12|Rare|http://magiccards.info/scans/en/m12/19.jpg

View File

@@ -3,7 +3,7 @@ ManaCost:2 G
Types:Creature Elf Types:Creature Elf
Text:no text Text:no text
PT:1/2 PT:1/2
S:Mode$ Continuous | Affected$ Creature.tapped+YouCtrl | AddKeyword$ Hexproof | OpponentTurn$ True | Description$ As long as it's not your turn, tapped creatures you control have hexproof. S:Mode$ Continuous | Affected$ Creature.tapped+YouCtrl | AddKeyword$ Hexproof | Condition$ NotPlayerTurn | Description$ As long as it's not your turn, tapped creatures you control have hexproof.
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/oak_street_innkeeper.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/oak_street_innkeeper.jpg
SetInfo:RTR|Uncommon|http://magiccards.info/scans/en/rtr/131.jpg SetInfo:RTR|Uncommon|http://magiccards.info/scans/en/rtr/131.jpg

View File

@@ -2,7 +2,7 @@ Name:Personal Sanctuary
ManaCost:2 W ManaCost:2 W
Types:Enchantment Types:Enchantment
Text:no text Text:no text
S:Mode$ PreventDamage | Target$ You | PlayerTurn$ True | Description$ During your turn, prevent all damage that would be dealt to you. S:Mode$ PreventDamage | Target$ You | Condition$ PlayerTurn | Description$ During your turn, prevent all damage that would be dealt to you.
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/personal_sanctuary.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/personal_sanctuary.jpg
SetInfo:M12|Rare|http://magiccards.info/scans/en/m12/30.jpg SetInfo:M12|Rare|http://magiccards.info/scans/en/m12/30.jpg

View File

@@ -3,7 +3,6 @@ ManaCost:U
Types:Instant Types:Instant
Text:no text Text:no text
A:SP$ ChangeZone | Cost$ U | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | Origin$ Battlefield | Destination$ Hand | OpponentTurn$ True | ActivationPhases$ Declare Attackers - Play Instants and Abilities | SpellDescription$ Cast CARDNAME only during the declare attackers step and only if you've been attacked this step. Return target attacking creature to its owner's hand. A:SP$ ChangeZone | Cost$ U | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | Origin$ Battlefield | Destination$ Hand | OpponentTurn$ True | ActivationPhases$ Declare Attackers - Play Instants and Abilities | SpellDescription$ Cast CARDNAME only during the declare attackers step and only if you've been attacked this step. Return target attacking creature to its owner's hand.
SVar:RemAIDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://resources.wizards.com/magic/cards/p2/en-us/card6541.jpg SVar:Picture:http://resources.wizards.com/magic/cards/p2/en-us/card6541.jpg
SetInfo:PO2|Uncommon|http://magiccards.info/scans/en/po2/43.jpg SetInfo:PO2|Uncommon|http://magiccards.info/scans/en/po2/43.jpg

View File

@@ -3,7 +3,6 @@ ManaCost:R
Types:Instant Types:Instant
Text:Cast CARDNAME only during the declare attackers step and only if you've been attacked this step.\r\n Text:Cast CARDNAME only during the declare attackers step and only if you've been attacked this step.\r\n
A:SP$ DamageAll | Cost$ R | NumDmg$ 1 | ValidCards$ Creature.attacking | ValidDescription$ each attacking creature. | OpponentTurn$ True | ActivationPhases$ Declare Attackers - Play Instants and Abilities | SpellDescription$ CARDNAME deals 1 damage to each attacking creature. A:SP$ DamageAll | Cost$ R | NumDmg$ 1 | ValidCards$ Creature.attacking | ValidDescription$ each attacking creature. | OpponentTurn$ True | ActivationPhases$ Declare Attackers - Play Instants and Abilities | SpellDescription$ CARDNAME deals 1 damage to each attacking creature.
SVar:RemAIDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://serv3.tcgimages.eu/img/cards/Portal/scorching_winds.jpg SVar:Picture:http://serv3.tcgimages.eu/img/cards/Portal/scorching_winds.jpg
SetInfo:POR|Uncommon|http://magiccards.info/scans/en/po/155.jpg SetInfo:POR|Uncommon|http://magiccards.info/scans/en/po/155.jpg

View File

@@ -2,8 +2,8 @@ Name:Vibrating Sphere
ManaCost:4 ManaCost:4
Types:Artifact Types:Artifact
Text:no text Text:no text
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddPower$ 2 | PlayerTurn$ True | Description$ As long as it's your turn, creatures you control get +2/+0. S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddPower$ 2 | Condition$ PlayerTurn | Description$ As long as it's your turn, creatures you control get +2/+0.
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddToughness$ -2 | OpponentTurn$ True | Description$ As long as it's not your turn, creatures you control get -0/-2. S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddToughness$ -2 | Condition$ NotPlayerTurn | Description$ As long as it's not your turn, creatures you control get -0/-2.
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/vibrating_sphere.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/vibrating_sphere.jpg

View File

@@ -4,7 +4,7 @@ Types:Artifact
Text:no text Text:no text
K:CARDNAME enters the battlefield tapped. K:CARDNAME enters the battlefield tapped.
A:AB$ Mana | Cost$ T | Produced$ 1 | SpellDescription$ Add 1 to your mana pool. A:AB$ Mana | Cost$ T | Produced$ 1 | SpellDescription$ Add 1 to your mana pool.
S:Mode$ Continuous | OpponentTurn$ True | EffectZone$ All | CharacteristicDefining$ True | SetPower$ 2 | SetToughness$ 3 | AddType$ Creature & Gargoyle | AddKeyword$ Flying | Description$ As long as it's not your turn, CARDNAME is a 2/3 Gargoyle artifact creature with flying. S:Mode$ Continuous | Condition$ NotPlayerTurn | EffectZone$ All | SetPower$ 2 | SetToughness$ 3 | AddType$ Creature & Gargoyle | AddKeyword$ Flying | Description$ As long as it's not your turn, CARDNAME is a 2/3 Gargoyle artifact creature with flying.
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/warden_of_the_wall.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/warden_of_the_wall.jpg
SetInfo:DKA|Uncommon|http://magiccards.info/scans/en/dka/153.jpg SetInfo:DKA|Uncommon|http://magiccards.info/scans/en/dka/153.jpg

View File

@@ -3,7 +3,7 @@ ManaCost:4 G
Types:Creature Spirit Types:Creature Spirit
Text:no text Text:no text
PT:3/3 PT:3/3
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ 2 | AddToughness$ 2 | PlayerTurn$ True | Description$ CARDNAME gets +2/+2 as long as it's your turn. S:Mode$ Continuous | Affected$ Card.Self | AddPower$ 2 | AddToughness$ 2 | Condition$ PlayerTurn | Description$ CARDNAME gets +2/+2 as long as it's your turn.
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/wildwood_geist.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/wildwood_geist.jpg
SetInfo:AVR|Common|http://magiccards.info/scans/en/avr/204.jpg SetInfo:AVR|Common|http://magiccards.info/scans/en/avr/204.jpg

View File

@@ -508,6 +508,14 @@ public class StaticAbility {
if (!controller.hasMetalcraft()) { if (!controller.hasMetalcraft()) {
return false; return false;
} }
} else if (params.get("Condition").equals("PlayerTurn")) {
if (!Singletons.getModel().getGame().getPhaseHandler().isPlayerTurn(controller)) {
return false;
}
} else if (params.get("Condition").equals("NotPlayerTurn")) {
if (Singletons.getModel().getGame().getPhaseHandler().isPlayerTurn(controller)) {
return false;
}
} else if (params.get("Condition").equals("PermanentOfEachColor")) { } else if (params.get("Condition").equals("PermanentOfEachColor")) {
if ((controller.getColoredCardsInPlay(Constant.Color.BLACK).isEmpty() if ((controller.getColoredCardsInPlay(Constant.Color.BLACK).isEmpty()
|| controller.getColoredCardsInPlay(Constant.Color.BLUE).isEmpty() || controller.getColoredCardsInPlay(Constant.Color.BLUE).isEmpty()
@@ -523,14 +531,6 @@ public class StaticAbility {
} }
} }
if (this.params.containsKey("PlayerTurn") && !Singletons.getModel().getGame().getPhaseHandler().isPlayerTurn(controller)) {
return false;
}
if (this.params.containsKey("OpponentTurn") && !Singletons.getModel().getGame().getPhaseHandler().isPlayerTurn(controller.getOpponent())) {
return false;
}
if (this.params.containsKey("OpponentAttackedWithCreatureThisTurn") if (this.params.containsKey("OpponentAttackedWithCreatureThisTurn")
&& !controller.getOpponent().getAttackedWithCreatureThisTurn()) { && !controller.getOpponent().getAttackedWithCreatureThisTurn()) {
return false; return false;
@@ -553,17 +553,6 @@ public class StaticAbility {
} }
} }
/*
* if(mapParams.containsKey("isPresent")) { String isPresent =
* mapParams.get("isPresent"); List<Card> list =
* AllZoneUtil.getCardsInPlay();
*
* list = list.getValidCards(isPresent.split(","), controller,
* hostCard);
*
* }
*/
if (this.params.containsKey("CheckSVar")) { if (this.params.containsKey("CheckSVar")) {
final int sVar = AbilityFactory.calculateAmount(this.hostCard, this.params.get("CheckSVar"), null); final int sVar = AbilityFactory.calculateAmount(this.hostCard, this.params.get("CheckSVar"), null);
String comparator = "GE1"; String comparator = "GE1";
@@ -576,6 +565,8 @@ public class StaticAbility {
if (!Expressions.compare(sVar, svarOperator, operandValue)) { if (!Expressions.compare(sVar, svarOperator, operandValue)) {
return false; return false;
} }
} else { //no need to check the others
return true;
} }
if (this.params.containsKey("CheckSecondSVar")) { if (this.params.containsKey("CheckSecondSVar")) {
@@ -590,6 +581,8 @@ public class StaticAbility {
if (!Expressions.compare(sVar, svarOperator, operandValue)) { if (!Expressions.compare(sVar, svarOperator, operandValue)) {
return false; return false;
} }
} else { //no need to check the others
return true;
} }
if (this.params.containsKey("CheckThirdSVar")) { if (this.params.containsKey("CheckThirdSVar")) {
@@ -604,6 +597,8 @@ public class StaticAbility {
if (!Expressions.compare(sVar, svarOperator, operandValue)) { if (!Expressions.compare(sVar, svarOperator, operandValue)) {
return false; return false;
} }
} else { //no need to check the others
return true;
} }
if (this.params.containsKey("CheckFourthSVar")) { if (this.params.containsKey("CheckFourthSVar")) {