merged new cards, changes to deck
commit
89e9603c44
|
@ -11320,3 +11320,53 @@ converted=3
|
|||
cost={1}{B}{B}
|
||||
pt=7/7
|
||||
timing=main
|
||||
|
||||
>Abuna Acolyte
|
||||
image=http://magiccards.info/scans/en/som/1.jpg
|
||||
value=2
|
||||
rarity=U
|
||||
type=Creature
|
||||
subtype=Cat,Cleric
|
||||
color=w
|
||||
converted=2
|
||||
cost={1}{W}
|
||||
pt=1/1
|
||||
timing=main
|
||||
|
||||
>Acid Web Spider
|
||||
image=http://magiccards.info/scans/en/som/108.jpg
|
||||
value=3
|
||||
rarity=U
|
||||
type=Creature
|
||||
subtype=Spider
|
||||
color=g
|
||||
converted=5
|
||||
cost={3}{G}{G}
|
||||
pt=3/5
|
||||
ability=reach
|
||||
timing=main
|
||||
|
||||
>Argent Sphinx
|
||||
image=http://magiccards.info/scans/en/som/28.jpg
|
||||
value=4
|
||||
rarity=R
|
||||
type=Creature
|
||||
subtype=Sphinx
|
||||
color=u
|
||||
converted=4
|
||||
cost={2}{U}{U}
|
||||
pt=4/3
|
||||
ability=flying
|
||||
timing=main
|
||||
|
||||
>Argentum Armor
|
||||
image=http://magiccards.info/scans/en/som/137.jpg
|
||||
value=5
|
||||
rarity=R
|
||||
type=Artifact
|
||||
subtype=Equipment
|
||||
converted=6
|
||||
cost={6}
|
||||
equip={6}
|
||||
given_pt=6/6
|
||||
timing=equipment
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicSource;
|
||||
import magic.model.action.MagicPreventDamageAction;
|
||||
import magic.model.action.MagicTargetAction;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.condition.MagicCondition;
|
||||
import magic.model.event.MagicActivationHints;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicPermanentActivation;
|
||||
import magic.model.event.MagicTapEvent;
|
||||
import magic.model.event.MagicTiming;
|
||||
import magic.model.target.MagicPreventTargetPicker;
|
||||
import magic.model.target.MagicTarget;
|
||||
|
||||
public class Abuna_Acolyte {
|
||||
public static final MagicPermanentActivation A1 = new MagicPermanentActivation(
|
||||
new MagicCondition[]{MagicCondition.CAN_TAP_CONDITION},
|
||||
new MagicActivationHints(MagicTiming.Pump),
|
||||
"Prevent 1") {
|
||||
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||
return new MagicEvent[]{new MagicTapEvent((MagicPermanent)source)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
MagicTargetChoice.POS_TARGET_CREATURE_OR_PLAYER,
|
||||
MagicPreventTargetPicker.getInstance(),
|
||||
MagicEvent.NO_DATA,
|
||||
this,
|
||||
"Prevent the next 1 damage that would be dealt to target creature or player$ this turn.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game,final MagicEvent event,final Object[] data,final Object[] choiceResults) {
|
||||
event.processTarget(game,choiceResults,0,new MagicTargetAction() {
|
||||
public void doAction(final MagicTarget target) {
|
||||
game.doAction(new MagicPreventDamageAction(target,1));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
|
||||
new MagicCondition[]{MagicCondition.CAN_TAP_CONDITION},
|
||||
new MagicActivationHints(MagicTiming.Pump),
|
||||
"Prevent 2") {
|
||||
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||
return new MagicEvent[]{new MagicTapEvent((MagicPermanent)source)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
MagicTargetChoice.POS_TARGET_ARTIFACT_CREATURE,
|
||||
MagicPreventTargetPicker.getInstance(),
|
||||
MagicEvent.NO_DATA,
|
||||
this,
|
||||
"Prevent the next 2 damage that would be dealt to target artifact creature$ this turn");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game,final MagicEvent event,final Object[] data,final Object[] choiceResults) {
|
||||
event.processTarget(game,choiceResults,0,new MagicTargetAction() {
|
||||
public void doAction(final MagicTarget target) {
|
||||
game.doAction(new MagicPreventDamageAction(target,2));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicDestroyAction;
|
||||
import magic.model.action.MagicPermanentAction;
|
||||
import magic.model.choice.MagicMayChoice;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.target.MagicDestroyTargetPicker;
|
||||
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
|
||||
|
||||
|
||||
public class Acid_Web_Spider {
|
||||
public static final MagicWhenComesIntoPlayTrigger T = new MagicWhenComesIntoPlayTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
player,
|
||||
new MagicMayChoice(
|
||||
"You may destroy target Equipment.",
|
||||
MagicTargetChoice.NEG_TARGET_EQUIPMENT),
|
||||
new MagicDestroyTargetPicker(false),
|
||||
MagicEvent.NO_DATA,
|
||||
this,
|
||||
"You may$ destroy target Equipment$.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
|
||||
event.processTargetPermanent(game,choiceResults,1,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent permanent) {
|
||||
game.doAction(new MagicDestroyAction(permanent));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicManaCost;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.MagicSource;
|
||||
import magic.model.action.MagicExileUntilEndOfTurnAction;
|
||||
import magic.model.condition.MagicCondition;
|
||||
import magic.model.event.MagicActivationHints;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicPayManaCostEvent;
|
||||
import magic.model.event.MagicPermanentActivation;
|
||||
import magic.model.event.MagicTiming;
|
||||
|
||||
|
||||
public class Argent_Sphinx {
|
||||
public static final MagicPermanentActivation A =new MagicPermanentActivation(
|
||||
new MagicCondition[]{
|
||||
MagicManaCost.BLUE.getCondition(),
|
||||
MagicCondition.METALCRAFT_CONDITION
|
||||
},
|
||||
new MagicActivationHints(MagicTiming.Removal,false,1),
|
||||
"Exile") {
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||
final MagicPlayer player=source.getController();
|
||||
return new MagicEvent[]{
|
||||
new MagicPayManaCostEvent(source,player,MagicManaCost.BLUE)};
|
||||
}
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
new Object[]{source},
|
||||
this,
|
||||
"Exile " + source + ". Return it to the battlefield " +
|
||||
"under your control at the end of turn.");
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] data,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicExileUntilEndOfTurnAction((MagicPermanent)data[0]));
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.action.MagicDestroyAction;
|
||||
import magic.model.action.MagicPermanentAction;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.target.MagicDestroyTargetPicker;
|
||||
import magic.model.trigger.MagicWhenAttacksTrigger;
|
||||
|
||||
|
||||
public class Argentum_Armor {
|
||||
public static final MagicWhenAttacksTrigger T =new MagicWhenAttacksTrigger(1) {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
|
||||
final MagicPermanent equippedCreature = permanent.getEquippedCreature();
|
||||
return (equippedCreature.isValid() &&
|
||||
equippedCreature == creature) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
permanent.getController(),
|
||||
MagicTargetChoice.NEG_TARGET_PERMANENT,
|
||||
new MagicDestroyTargetPicker(false),
|
||||
MagicEvent.NO_DATA,
|
||||
this,
|
||||
"Destroy target permanent$."):
|
||||
MagicEvent.NONE;
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent permanent) {
|
||||
game.doAction(new MagicDestroyAction(permanent));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
|
@ -5,10 +5,12 @@ import java.util.List;
|
|||
|
||||
public enum MagicDeckConstructionRule {
|
||||
|
||||
Min60Cards("Decks must have a least 60 cards."),
|
||||
MinDeckSize("Decks must have a least 40 cards."),
|
||||
FourCopyLimit("With the exception of basic lands, a deck must have no more than 4 copies of a card.")
|
||||
;
|
||||
|
||||
public static final int MIN_DECK_SIZE = 40;
|
||||
|
||||
private final String text;
|
||||
|
||||
private MagicDeckConstructionRule(final String text) {
|
||||
|
@ -22,8 +24,8 @@ public enum MagicDeckConstructionRule {
|
|||
public static List<MagicDeckConstructionRule> checkDeck(MagicDeck deck) {
|
||||
ArrayList<MagicDeckConstructionRule> brokenRules = new ArrayList<MagicDeckConstructionRule>();
|
||||
|
||||
if(deck.size() < 60) {
|
||||
brokenRules.add(Min60Cards);
|
||||
if(deck.size() < MIN_DECK_SIZE) {
|
||||
brokenRules.add(MinDeckSize);
|
||||
}
|
||||
|
||||
List<MagicDeckCardDefinition> countedDeck = MagicDeckCardDefinition.condenseCopyCardList(deck);
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.Properties;
|
|||
|
||||
public class MagicPlayerDefinition {
|
||||
|
||||
private static final int DECK_SIZE=60;
|
||||
private static final int DECK_SIZE=40;
|
||||
private static final int MIN_SOURCE=16;
|
||||
|
||||
private static final String NAME="name";
|
||||
|
|
|
@ -109,12 +109,17 @@ public class MagicTargetChoice extends MagicChoice {
|
|||
"target artifact or enchantment your opponent controls");
|
||||
public static final MagicTargetChoice TARGET_ARTIFACT_OR_ENCHANTMENT_OR_LAND=
|
||||
new MagicTargetChoice(MagicTargetFilter.TARGET_ARTIFACT_OR_ENCHANTMENT_OR_LAND,true,MagicTargetHint.None,"target artifact, enchantment or land");
|
||||
public static final MagicTargetChoice POS_TARGET_ARTIFACT_CREATURE =
|
||||
new MagicTargetChoice(MagicTargetFilter.TARGET_ARTIFACT_CREATURE,true,MagicTargetHint.Positive,
|
||||
"target artifact creature");
|
||||
public static final MagicTargetChoice TARGET_ENCHANTMENT =
|
||||
new MagicTargetChoice(MagicTargetFilter.TARGET_ENCHANTMENT,true,MagicTargetHint.None,"target enchantment");
|
||||
public static final MagicTargetChoice NEG_TARGET_ENCHANTMENT =
|
||||
new MagicTargetChoice(MagicTargetFilter.TARGET_ENCHANTMENT,true,MagicTargetHint.Negative,"target enchantment");
|
||||
public static final MagicTargetChoice NEG_TARGET_SPIRIT_OR_ENCHANTMENT =
|
||||
new MagicTargetChoice(MagicTargetFilter.TARGET_SPIRIT_OR_ENCHANTMENT,true,MagicTargetHint.Negative,"target Spirit or enchantment");
|
||||
public static final MagicTargetChoice NEG_TARGET_EQUIPMENT =
|
||||
new MagicTargetChoice(MagicTargetFilter.TARGET_EQUIPMENT,true,MagicTargetHint.Negative,"target Equipment");
|
||||
public static final MagicTargetChoice TARGET_CREATURE=
|
||||
new MagicTargetChoice(MagicTargetFilter.TARGET_CREATURE,true,MagicTargetHint.None,"target creature");
|
||||
public static final MagicTargetChoice NEG_TARGET_CREATURE=
|
||||
|
|
|
@ -233,6 +233,17 @@ public interface MagicTargetFilter {
|
|||
}
|
||||
};
|
||||
|
||||
MagicTargetFilter TARGET_ARTIFACT_CREATURE = new MagicTargetFilter() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
|
||||
final MagicPermanent targetPermanent = (MagicPermanent)target;
|
||||
return targetPermanent.isArtifact() &&
|
||||
targetPermanent.isCreature(game);
|
||||
}
|
||||
public boolean acceptType(final MagicTargetType targetType) {
|
||||
return targetType == MagicTargetType.Permanent;
|
||||
}
|
||||
};
|
||||
|
||||
MagicTargetFilter TARGET_ARTIFACT_CREATURE_YOU_CONTROL = new MagicTargetFilter() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
|
||||
final MagicPermanent targetPermanent = (MagicPermanent)target;
|
||||
|
@ -406,6 +417,15 @@ public interface MagicTargetFilter {
|
|||
}
|
||||
};
|
||||
|
||||
MagicTargetFilter TARGET_EQUIPMENT = new MagicTargetFilter() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
|
||||
final MagicPermanent targetPermanent = (MagicPermanent)target;
|
||||
return targetPermanent.isEquipment();
|
||||
}
|
||||
public boolean acceptType(final MagicTargetType targetType) {
|
||||
return targetType == MagicTargetType.Permanent;
|
||||
}
|
||||
};
|
||||
|
||||
MagicTargetFilter TARGET_PERMANENT_YOU_CONTROL=new MagicTargetFilter() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue