Added Cursed Scroll primitive.
This commit is contained in:
@@ -9152,6 +9152,13 @@ mana={1}{R}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Cursed Scroll
|
||||
auto={3}{T}:name(Name a card from your hand) choice target(*|myhand) donothing && name(Game chooses a random card) if compare(cursedscrollresult)~equalto~1 then ability$!name(The random card macthes with the named card) name(The random card macthes with the named card) choice name(Damage creature) damage:2 target(creature) _ choice name(Damage player) damage:2 target(player) _ choice name(Damage planeswalker) damage:2 target(planeswalker)!$ controller
|
||||
text={3}, {T}: Choose a card name, then reveal a card at random from your hand. If that card has the chosen name, Cursed Scroll deals 2 damage to any target.
|
||||
mana={1}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Cyclopean Giant
|
||||
auto=@movedTo(this|graveyard) from(battlefield):all(trigger[to]) moveto(exile) and!( transforms((swamp)) target(land) )!
|
||||
text=When Cyclopean Giant dies, target land becomes a Swamp. Exile Cyclopean Giant.
|
||||
|
||||
@@ -2857,12 +2857,6 @@ type=Enchantment
|
||||
subtype=Aura Curse
|
||||
[/card]
|
||||
[card]
|
||||
name=Cursed Scroll
|
||||
text={3}, {T}: Name a card. Reveal a card at random from your hand. If it's the named card, Cursed Scroll deals 2 damage to target creature or player.
|
||||
mana={1}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Curtain of Light
|
||||
text=Cast Curtain of Light only during combat after blockers are declared. -- Target unblocked attacking creature becomes blocked. (This spell works on unblockable creatures.) -- Draw a card.
|
||||
mana={1}{W}
|
||||
|
||||
@@ -1063,6 +1063,28 @@ private:
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (s == "cursedscrollresult")//Return 1 if the cursed scroll has to give damage (calculated randomly basing on the number of unique cards in the player hand)...
|
||||
{
|
||||
intValue = 0;
|
||||
if(card->controller()->game->hand->nb_cards){
|
||||
list<string> unique_cards;
|
||||
for (int j = 0; j < card->controller()->game->hand->nb_cards; j++){
|
||||
bool found = false;
|
||||
for (unsigned int k = 0; k < unique_cards.size() && !found; k++){
|
||||
list<string>::iterator it;
|
||||
for (it = unique_cards.begin(); it != unique_cards.end(); it++){
|
||||
if(card->controller()->game->hand->cards[j]->name == *it)
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
unique_cards.push_back(card->controller()->game->hand->cards[j]->name);
|
||||
}
|
||||
if(!(std::rand() % unique_cards.size()))
|
||||
intValue = 1;
|
||||
unique_cards.clear();
|
||||
}
|
||||
}
|
||||
else if (s == "mypos")
|
||||
{//hand,exile,grave & library only (library zpos is inverted so the recent one is always the top)
|
||||
intValue = card->zpos;
|
||||
|
||||
Reference in New Issue
Block a user