mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[BFZ] Added Devoid and Ingest keywords.
This commit is contained in:
parent
423e1fd368
commit
b6c3355329
5 changed files with 362 additions and 246 deletions
|
@ -64,6 +64,6 @@ ddd=gvl
|
|||
unh=uh
|
||||
dde=pvc
|
||||
# Remove setname as soon as the images can be downloaded
|
||||
ignore.urls=TOK,MM2,V15,BFZ,DDP
|
||||
ignore.urls=TOK,V15,DDP
|
||||
# sets ordered by release time (newest goes first)
|
||||
token.lookup.order=DDP,BFZ,FVD,FVE,FVL,FVR,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC
|
41
Mage/src/mage/abilities/keyword/DevoidAbility.java
Normal file
41
Mage/src/mage/abilities/keyword/DevoidAbility.java
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class DevoidAbility extends SimpleStaticAbility {
|
||||
|
||||
public DevoidAbility(ObjectColor color) {
|
||||
super(Zone.ALL, null);
|
||||
color.setBlack(false);
|
||||
color.setWhite(false);
|
||||
color.setGreen(false);
|
||||
color.setBlue(false);
|
||||
color.setRed(false);
|
||||
}
|
||||
|
||||
public DevoidAbility(final DevoidAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DevoidAbility copy() {
|
||||
return new DevoidAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Devoid <i>(This card has no color.)<i/>";
|
||||
}
|
||||
|
||||
}
|
71
Mage/src/mage/abilities/keyword/IngestAbility.java
Normal file
71
Mage/src/mage/abilities/keyword/IngestAbility.java
Normal file
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class IngestAbility extends DealsCombatDamageToAPlayerTriggeredAbility {
|
||||
|
||||
public IngestAbility() {
|
||||
super(new IngestEffect(), false, true);
|
||||
|
||||
}
|
||||
|
||||
public IngestAbility(IngestAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestAbility copy() {
|
||||
return new IngestAbility(this);
|
||||
}
|
||||
}
|
||||
|
||||
class IngestEffect extends OneShotEffect {
|
||||
|
||||
public IngestEffect() {
|
||||
super(Outcome.Exile);
|
||||
this.staticText = "that player exiles the top card of his or her library";
|
||||
}
|
||||
|
||||
public IngestEffect(final IngestEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IngestEffect copy() {
|
||||
return new IngestEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (targetPlayer != null) {
|
||||
Card card = targetPlayer.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
targetPlayer.moveCards(card, Zone.LIBRARY, Zone.EXILED, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -183,6 +183,8 @@ foreach my $setName (keys %{$cards{$cardName}}) {
|
|||
$vars{'abilities'} .= "\n this.addAbility(" . $kw . "Ability.getInstance());";
|
||||
} elsif ($keywords{$kw} eq 'new') {
|
||||
$vars{'abilities'} .= "\n this.addAbility(new " . $kw . "Ability());";
|
||||
} elsif ($keywords{$kw} eq 'color') {
|
||||
$vars{'abilities'} .= "\n this.addAbility(new " . $kw . "Ability(this.color));";
|
||||
} elsif ($keywords{$kw} eq 'number') {
|
||||
$ability =~ m/(\b\d+?\b)/g;
|
||||
$vars{'abilities'} .= "\n this.addAbility(new " . $kw . 'Ability(' . $1 . '));';
|
||||
|
|
|
@ -11,6 +11,7 @@ Dash|card, manaString|
|
|||
Deathtouch|instance|
|
||||
Delve|new|
|
||||
Dethrone|new|
|
||||
Devoid|color|
|
||||
Defender|instance|
|
||||
Double Strike|instance|
|
||||
Dredge|number|
|
||||
|
@ -32,6 +33,7 @@ Hexproof|instance|
|
|||
Indestructible|instance|
|
||||
Infect|instance|
|
||||
Intimidate|instance|
|
||||
Ingest|new|
|
||||
Islandcycling|cost|
|
||||
Islandwalk|new|
|
||||
Level up|cost|
|
||||
|
|
Loading…
Reference in a new issue