mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added Condition to PutCounter, PutCounterAll, RemoveCounter, LosesGame, WinsGame
- Added Mayael's Aria
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -4310,6 +4310,7 @@ res/cardsfolder/matsu_tribe_sniper.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/maul_splicer.txt -text svneol=native#text/plain
|
res/cardsfolder/maul_splicer.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/mawcor.txt -text svneol=native#text/plain
|
res/cardsfolder/mawcor.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/mayael_the_anima.txt -text svneol=native#text/plain
|
res/cardsfolder/mayael_the_anima.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/mayaels_aria.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/maze_of_ith.txt -text svneol=native#text/plain
|
res/cardsfolder/maze_of_ith.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/maze_of_shadows.txt -text svneol=native#text/plain
|
res/cardsfolder/maze_of_shadows.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/meadowboon.txt -text svneol=native#text/plain
|
res/cardsfolder/meadowboon.txt -text svneol=native#text/plain
|
||||||
|
|||||||
11
res/cardsfolder/mayaels_aria.txt
Normal file
11
res/cardsfolder/mayaels_aria.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Name:Mayael's Aria
|
||||||
|
ManaCost:R G W
|
||||||
|
Types:Enchantment
|
||||||
|
Text:no text
|
||||||
|
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounterAll | TriggerDescription$ At the beginning of your upkeep, put a +1/+1 counter on each creature you control if you control a creature with power 5 or greater. Then you gain 10 life if you control a creature with power 10 or greater. Then you win the game if you control a creature with power 20 or greater.
|
||||||
|
SVar:TrigPutCounterAll:DB$ PutCounterAll | ValidCards$ Creature.YouCtrl | CounterType$ P1P1 | CounterNum$ 1 | ConditionPresent$ Creature.YouCtrl+powerGE5 | SubAbility$ SVar=DBGainLife
|
||||||
|
SVar:DBGainLife:DB$ GainLife | LifeAmount$ 10 | Defined$ You | ConditionPresent$ Creature.YouCtrl+powerGE10 | SubAbility$ SVar=DBWinGame
|
||||||
|
SVar:DBWinGame:DB$ WinsGame | Defined$ You | ConditionPresent$ Creature.YouCtrl+powerGE20
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/mayaels_aria.jpg
|
||||||
|
End
|
||||||
@@ -478,7 +478,11 @@ public class AbilityFactory_Counters {
|
|||||||
|
|
||||||
public static void putResolve(final AbilityFactory af, final SpellAbility sa){
|
public static void putResolve(final AbilityFactory af, final SpellAbility sa){
|
||||||
HashMap<String,String> params = af.getMapParams();
|
HashMap<String,String> params = af.getMapParams();
|
||||||
String DrawBack = params.get("SubAbility");
|
if (!AbilityFactory.checkConditional(params, sa)){
|
||||||
|
AbilityFactory.resolveSubAbility(sa);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Card card = af.getHostCard();
|
Card card = af.getHostCard();
|
||||||
String type = params.get("CounterType");
|
String type = params.get("CounterType");
|
||||||
int counterAmount = AbilityFactory.calculateAmount(af.getHostCard(), params.get("CounterNum"), sa);
|
int counterAmount = AbilityFactory.calculateAmount(af.getHostCard(), params.get("CounterNum"), sa);
|
||||||
@@ -501,14 +505,7 @@ public class AbilityFactory_Counters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (af.hasSubAbility()){
|
AbilityFactory.resolveSubAbility(sa);
|
||||||
Ability_Sub abSub = sa.getSubAbility();
|
|
||||||
if (abSub != null){
|
|
||||||
abSub.resolve();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
CardFactoryUtil.doDrawBack(DrawBack, counterAmount, card.getController(), card.getController().getOpponent(), card.getController(), card, tgtCards.get(0), sa);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// *******************************************
|
// *******************************************
|
||||||
@@ -754,7 +751,11 @@ public class AbilityFactory_Counters {
|
|||||||
|
|
||||||
public static void removeResolve(final AbilityFactory af, final SpellAbility sa){
|
public static void removeResolve(final AbilityFactory af, final SpellAbility sa){
|
||||||
HashMap<String,String> params = af.getMapParams();
|
HashMap<String,String> params = af.getMapParams();
|
||||||
String DrawBack = params.get("SubAbility");
|
if (!AbilityFactory.checkConditional(params, sa)){
|
||||||
|
AbilityFactory.resolveSubAbility(sa);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Card card = af.getHostCard();
|
Card card = af.getHostCard();
|
||||||
String type = params.get("CounterType");
|
String type = params.get("CounterType");
|
||||||
int counterAmount = AbilityFactory.calculateAmount(af.getHostCard(), params.get("CounterNum"), sa);
|
int counterAmount = AbilityFactory.calculateAmount(af.getHostCard(), params.get("CounterNum"), sa);
|
||||||
@@ -782,14 +783,7 @@ public class AbilityFactory_Counters {
|
|||||||
tgtCard.subtractCounter(Counters.valueOf(type), counterAmount);
|
tgtCard.subtractCounter(Counters.valueOf(type), counterAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (af.hasSubAbility()){
|
AbilityFactory.resolveSubAbility(sa);
|
||||||
Ability_Sub abSub = sa.getSubAbility();
|
|
||||||
if (abSub != null){
|
|
||||||
abSub.resolve();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
CardFactoryUtil.doDrawBack(DrawBack, counterAmount, card.getController(), card.getController().getOpponent(), card.getController(), card, null, sa);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// *******************************************
|
// *******************************************
|
||||||
@@ -926,6 +920,12 @@ public class AbilityFactory_Counters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void proliferateResolve(final AbilityFactory AF, SpellAbility sa) {
|
private static void proliferateResolve(final AbilityFactory AF, SpellAbility sa) {
|
||||||
|
HashMap<String,String> params = AF.getMapParams();
|
||||||
|
if (!AbilityFactory.checkConditional(params, sa)){
|
||||||
|
AbilityFactory.resolveSubAbility(sa);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CardList hperms = AllZoneUtil.getPlayerCardsInPlay(AllZone.HumanPlayer);
|
CardList hperms = AllZoneUtil.getPlayerCardsInPlay(AllZone.HumanPlayer);
|
||||||
hperms = hperms.filter(new CardListFilter() {
|
hperms = hperms.filter(new CardListFilter() {
|
||||||
public boolean addCard(Card crd)
|
public boolean addCard(Card crd)
|
||||||
@@ -1065,12 +1065,7 @@ public class AbilityFactory_Counters {
|
|||||||
|
|
||||||
} //comp
|
} //comp
|
||||||
|
|
||||||
if (AF.hasSubAbility()){
|
AbilityFactory.resolveSubAbility(sa);
|
||||||
Ability_Sub abSub = sa.getSubAbility();
|
|
||||||
if (abSub != null){
|
|
||||||
abSub.resolve();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// *******************************************
|
// *******************************************
|
||||||
@@ -1277,8 +1272,11 @@ public class AbilityFactory_Counters {
|
|||||||
|
|
||||||
public static void putAllResolve(final AbilityFactory af, final SpellAbility sa) {
|
public static void putAllResolve(final AbilityFactory af, final SpellAbility sa) {
|
||||||
HashMap<String,String> params = af.getMapParams();
|
HashMap<String,String> params = af.getMapParams();
|
||||||
String DrawBack = params.get("SubAbility");
|
if (!AbilityFactory.checkConditional(params, sa)){
|
||||||
Card card = af.getHostCard();
|
AbilityFactory.resolveSubAbility(sa);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String type = params.get("CounterType");
|
String type = params.get("CounterType");
|
||||||
int counterAmount = AbilityFactory.calculateAmount(af.getHostCard(), params.get("CounterNum"), sa);
|
int counterAmount = AbilityFactory.calculateAmount(af.getHostCard(), params.get("CounterNum"), sa);
|
||||||
String valid = params.get("ValidCards");
|
String valid = params.get("ValidCards");
|
||||||
@@ -1299,13 +1297,6 @@ public class AbilityFactory_Counters {
|
|||||||
tgtCard.addCounterFromNonEffect(Counters.valueOf(type), counterAmount);
|
tgtCard.addCounterFromNonEffect(Counters.valueOf(type), counterAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (af.hasSubAbility()){
|
AbilityFactory.resolveSubAbility(sa);
|
||||||
Ability_Sub abSub = sa.getSubAbility();
|
|
||||||
if (abSub != null){
|
|
||||||
abSub.resolve();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
CardFactoryUtil.doDrawBack(DrawBack, counterAmount, card.getController(), card.getController().getOpponent(), card.getController(), card, cards.get(0), sa);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package forge.card.abilityFactory;
|
package forge.card.abilityFactory;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
import forge.AllZone;
|
import forge.AllZone;
|
||||||
@@ -163,6 +164,12 @@ public class AbilityFactory_EndGameCondition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void winsGameResolve(final AbilityFactory af, final SpellAbility sa){
|
public static void winsGameResolve(final AbilityFactory af, final SpellAbility sa){
|
||||||
|
HashMap<String,String> params = af.getMapParams();
|
||||||
|
if (!AbilityFactory.checkConditional(params, sa)){
|
||||||
|
AbilityFactory.resolveSubAbility(sa);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Card card = af.getHostCard();
|
Card card = af.getHostCard();
|
||||||
|
|
||||||
ArrayList<Player> players = AbilityFactory.getDefinedPlayers(card, af.getMapParams().get("Defined"), sa);
|
ArrayList<Player> players = AbilityFactory.getDefinedPlayers(card, af.getMapParams().get("Defined"), sa);
|
||||||
@@ -357,6 +364,12 @@ public class AbilityFactory_EndGameCondition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void losesGameResolve(final AbilityFactory af, final SpellAbility sa){
|
public static void losesGameResolve(final AbilityFactory af, final SpellAbility sa){
|
||||||
|
HashMap<String,String> params = af.getMapParams();
|
||||||
|
if (!AbilityFactory.checkConditional(params, sa)){
|
||||||
|
AbilityFactory.resolveSubAbility(sa);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Card card = af.getHostCard();
|
Card card = af.getHostCard();
|
||||||
|
|
||||||
Target tgt = sa.getTarget();
|
Target tgt = sa.getTarget();
|
||||||
|
|||||||
Reference in New Issue
Block a user