Laurent - Updated discard function now function with cost & target (see update from MRD) - Note that this is the discard random function....
Did not try it yet without target (e.g. when comes intoplay auto=discard:19 probably will not work and would make the opponent discard a card randomnly...
This commit is contained in:
@@ -504,6 +504,16 @@ rarity=L
|
|||||||
subtype=Mountain
|
subtype=Mountain
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
text={B}, Sacrifice Necrogen Spellbomb: Target player discards a card. {1}, Sacrifice Necrogen Spellbomb: Draw a card.
|
||||||
|
id=46055
|
||||||
|
auto={B}{S}:discard:1 target(player)
|
||||||
|
auto={1}{S}:draw:1
|
||||||
|
name=Necrogen Spellbomb
|
||||||
|
rarity=C
|
||||||
|
type=Artifact
|
||||||
|
mana={1}
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
text=Neurok Spy is unblockable as long as defending player controls an artifact.
|
text=Neurok Spy is unblockable as long as defending player controls an artifact.
|
||||||
id=45974
|
id=45974
|
||||||
name=Neurok Spy
|
name=Neurok Spy
|
||||||
|
|||||||
@@ -1519,14 +1519,6 @@ type=Enchantment
|
|||||||
mana={2}{B}
|
mana={2}{B}
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text={B}, Sacrifice Necrogen Spellbomb: Target player discards a card. {1}, Sacrifice Necrogen Spellbomb: Draw a card.
|
|
||||||
id=46055
|
|
||||||
name=Necrogen Spellbomb
|
|
||||||
rarity=C
|
|
||||||
type=Artifact
|
|
||||||
mana={1}
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
text=Flash Protection from artifacts
|
text=Flash Protection from artifacts
|
||||||
id=48930
|
id=48930
|
||||||
name=Needlebug
|
name=Needlebug
|
||||||
|
|||||||
@@ -2650,6 +2650,27 @@ class ADeplete:public TargetAbility{
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class ADiscard:public TargetAbility{
|
||||||
|
public:
|
||||||
|
int nbcards;
|
||||||
|
ADiscard(int _id, MTGCardInstance * card, ManaCost * _cost, int _nbcards = 1,TargetChooser * _tc = NULL, int _tap = 1):TargetAbility(_id,card, _tc, _cost,0,_tap){
|
||||||
|
if (!tc) tc= NEW PlayerTargetChooser(card);
|
||||||
|
nbcards = _nbcards;
|
||||||
|
}
|
||||||
|
int resolve(){
|
||||||
|
Player * player = tc->getNextPlayerTarget();
|
||||||
|
if (!player) return 0;
|
||||||
|
for (int i = 0; i < 2; i++){
|
||||||
|
game->players[i]->game->discardRandom(game->players[i]->game->hand);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
const char * getMenuText(){
|
||||||
|
return "Discard";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Generic Karma
|
// Generic Karma
|
||||||
class ADamageForTypeControlled: public TriggeredAbility{
|
class ADamageForTypeControlled: public TriggeredAbility{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -697,7 +697,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
|
|||||||
//TODO ?
|
//TODO ?
|
||||||
}else{
|
}else{
|
||||||
if (tc){
|
if (tc){
|
||||||
//TODO ?
|
game->addObserver (NEW ADiscard(id,card,cost,nbcards,tc,doTap));
|
||||||
}else{
|
}else{
|
||||||
for (int i = 0; i < nbcards; i++){
|
for (int i = 0; i < nbcards; i++){
|
||||||
game->opponent()->game->discardRandom(game->opponent()->game->hand);
|
game->opponent()->game->discardRandom(game->opponent()->game->hand);
|
||||||
|
|||||||
Reference in New Issue
Block a user