added bribery counter. added Gwafa Hazid, Profiteer
parent
e623c832ba
commit
c13861ba11
|
@ -0,0 +1,13 @@
|
|||
>Gwafa Hazid, Profiteer
|
||||
url=http://magiccards.info/cfx/en/110.html
|
||||
image=http://magiccards.info/scans/en/cfx/110.jpg
|
||||
value=4
|
||||
rarity=R
|
||||
type=Legendary,Creature
|
||||
subtype=Human,Rogue
|
||||
color=wu
|
||||
converted=3
|
||||
cost={1}{W}{U}
|
||||
pt=2/2
|
||||
timing=main
|
||||
requires_card_code
|
Binary file not shown.
After Width: | Height: | Size: 804 B |
|
@ -0,0 +1,98 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicAbility;
|
||||
import magic.model.MagicCounterType;
|
||||
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.MagicChangeCountersAction;
|
||||
import magic.model.action.MagicDrawAction;
|
||||
import magic.model.action.MagicPermanentAction;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.condition.MagicCondition;
|
||||
import magic.model.event.MagicActivationHints;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicPayManaCostTapEvent;
|
||||
import magic.model.event.MagicPermanentActivation;
|
||||
import magic.model.event.MagicTiming;
|
||||
import magic.model.mstatic.MagicLayer;
|
||||
import magic.model.mstatic.MagicStatic;
|
||||
import magic.model.target.MagicNoCombatTargetPicker;
|
||||
import magic.model.target.MagicTargetFilter;
|
||||
|
||||
public class Gwafa_Hazid__Profiteer {
|
||||
public static final MagicStatic S = new MagicStatic(
|
||||
MagicLayer.Ability,
|
||||
MagicTargetFilter.TARGET_CREATURE) {
|
||||
@Override
|
||||
public long getAbilityFlags(
|
||||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final long flags) {
|
||||
return flags | MagicAbility.CannotAttackOrBlock.getMask();
|
||||
}
|
||||
@Override
|
||||
public boolean condition(
|
||||
final MagicGame game,
|
||||
final MagicPermanent source,
|
||||
final MagicPermanent target) {
|
||||
return target.getCounters(MagicCounterType.Bribery) > 0;
|
||||
}
|
||||
};
|
||||
|
||||
public static final MagicPermanentActivation A = new MagicPermanentActivation(
|
||||
new MagicCondition[]{
|
||||
MagicCondition.CAN_TAP_CONDITION,
|
||||
MagicManaCost.WHITE_BLUE.getCondition()
|
||||
},
|
||||
new MagicActivationHints(MagicTiming.Tapping),
|
||||
"Disable"
|
||||
) {
|
||||
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||
return new MagicEvent[]{
|
||||
new MagicPayManaCostTapEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
MagicManaCost.WHITE_BLUE)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(
|
||||
final MagicPermanent source,
|
||||
final MagicPayedCost payedCost) {
|
||||
final MagicPlayer player = source.getController();
|
||||
return new MagicEvent(
|
||||
source,
|
||||
player,
|
||||
MagicTargetChoice.TARGET_CREATURE_YOUR_OPPONENT_CONTROLS,
|
||||
new MagicNoCombatTargetPicker(true,true,true),
|
||||
MagicEvent.NO_DATA,
|
||||
this,
|
||||
player + " puts a bribery counter on target creature$. " +
|
||||
"Its controller draws a card.");
|
||||
}
|
||||
|
||||
@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 creature) {
|
||||
game.doAction(new MagicChangeCountersAction(
|
||||
creature,
|
||||
MagicCounterType.Bribery,
|
||||
1,
|
||||
true));
|
||||
game.doAction(new MagicDrawAction(creature.getController(),1));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
|
@ -62,6 +62,7 @@ public class IconImages {
|
|||
public static final ImageIcon CHARGE=loadIcon("charge.png");
|
||||
public static final ImageIcon FEATHER=loadIcon("feather.gif");
|
||||
public static final ImageIcon GOLDCOUNTER=loadIcon("goldcounter.png");
|
||||
public static final ImageIcon BRIBECOUNTER=loadIcon("bribecounter.png");
|
||||
public static final ImageIcon LAND=loadIcon("land.gif");
|
||||
public static final ImageIcon LAND2=loadIcon("land2.gif");
|
||||
public static final ImageIcon LIFE=loadIcon("life.gif");
|
||||
|
|
|
@ -53,6 +53,7 @@ public class TextImages {
|
|||
TEXT_ICONS.put("{C}",IconImages.CHARGE);
|
||||
TEXT_ICONS.put("{F}",IconImages.FEATHER);
|
||||
TEXT_ICONS.put("{g}",IconImages.GOLDCOUNTER);
|
||||
TEXT_ICONS.put("{br}",IconImages.BRIBECOUNTER);
|
||||
TEXT_ICONS.put("{L}",IconImages.LOSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ public enum MagicCounterType {
|
|||
Charge("charge","{C}"),
|
||||
Feather("feather","{F}"),
|
||||
Gold("gold","{g}"),
|
||||
Bribery("bribery","{br}"),
|
||||
;
|
||||
|
||||
public static final int NR_COUNTERS=MagicCounterType.values().length;
|
||||
|
|
|
@ -73,6 +73,7 @@ public class MagicManaCost {
|
|||
public static final MagicManaCost TWO_WHITE=MagicManaCost.createCost("{2}{W}");
|
||||
public static final MagicManaCost SEVEN_WHITE=MagicManaCost.createCost("{7}{W}");
|
||||
public static final MagicManaCost WHITE_WHITE=MagicManaCost.createCost("{W}{W}");
|
||||
public static final MagicManaCost WHITE_BLUE=MagicManaCost.createCost("{W}{U}");
|
||||
public static final MagicManaCost ONE_WHITE_WHITE=MagicManaCost.createCost("{1}{W}{W}");
|
||||
public static final MagicManaCost X_WHITE=MagicManaCost.createCost("{X}{W}");
|
||||
public static final MagicManaCost BLACK_GREEN=MagicManaCost.createCost("{B}{G}");
|
||||
|
|
|
@ -117,6 +117,10 @@ public class ImageDrawingUtils {
|
|||
g.drawImage(IconImages.GOLDCOUNTER.getImage(),ax,ay,observer);
|
||||
ax+=16;
|
||||
}
|
||||
if (counterType == MagicCounterType.Bribery) {
|
||||
g.drawImage(IconImages.BRIBECOUNTER.getImage(),ax,ay,observer);
|
||||
ax+=16;
|
||||
}
|
||||
if (counterType == MagicCounterType.PlusOne) {
|
||||
g.drawImage(IconImages.PLUS.getImage(),ax,ay,observer);
|
||||
g.setColor(Color.DARK_GRAY);
|
||||
|
|
Loading…
Reference in New Issue