Improved Cursed Scroll and Magus of the Scroll, fixed Android downloader.

This commit is contained in:
Vittorio Alfieri
2021-07-25 21:54:39 +02:00
parent 9bdf0e0690
commit f499a1e52f
3 changed files with 7 additions and 23 deletions

View File

@@ -2742,7 +2742,7 @@ public class ImgDownloader {
set.equals("BOK") || set.equals("CHK") || set.equals("ZNR") || set.equals("KHM") ||
set.equals("STX"))
rarity = "";
if(id != null && (id.equals("209162") || id.equals("209163") || id.equals("401721") || id.equals("401722") || id.equals("491633")))
if(id != null && (id.equals("209162") || id.equals("209163") || id.equals("401721") || id.equals("401722")))
rarity = "t";
if(id != null && (id.equals("1750411") || id.equals("5176911") || id.equals("44680711") || id.equals("29530711") || id.equals("45108910")
|| id.equals("530447") || id.equals("530448") || id.equals("530449")))
@@ -2768,6 +2768,8 @@ public class ImgDownloader {
mappa.put("530447t", "Skeleton");
if(id.equals("530448"))
mappa.put("530448t", "Goblin");
if(id.equals("491633"))
mappa.put("491633t", "Angel");
if (id.equals("114921")) {
mappa.put("11492111t", "Citizen");
mappa.put("11492112t", "Camarid");

View File

@@ -13426,7 +13426,7 @@ type=Artifact
[/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(Deals 2 damages) name(Deals 2 damages) damage:2 target(player,creature,planeswalker)!$ controller
auto={3}{T}:ability$!name(Name a card from your hand) name(Name a card from your hand) target(*|myhand) transforms((,newability[if compare(cursedscrollresult)~equalto~1 then name(Deals 2 damage) name(Deals 2 damage) damage:2 target(player^creature^planeswalker)])) oneshot!$ 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
@@ -38070,7 +38070,7 @@ toughness=3
[/card]
[card]
name=Magus of the Scroll
auto={3}{T}:name(Name a card from your hand) choice target(*|myhand) donothing && name(Reveal a random card) if compare(cursedscrollresult)~equalto~1 then ability$!name(Deals 2 damages) name(Deals 2 damages) damage:2 target(player,creature)!$ controller
auto={3}{T}:ability$!name(Name a card from your hand) name(Name a card from your hand) target(*|myhand) transforms((,newability[if compare(magusofscrollresult)~equalto~1 then name(Deals 2 damage) name(Deals 2 damage) damage:2 target(player^creature^planeswalker)])) oneshot!$ controller
text={3}, {T}: Name a card. Reveal a card at random from your hand. If it's the named card, Magus of the Scroll deals 2 damage to target creature or player.
mana={R}
type=Creature

View File

@@ -1013,27 +1013,9 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card)
intValue = list[i];
}
}
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)...
else if ((s == "cursedscrollresult" || s == "magusofscrollresult") && (card->controller()->game->hand->nb_cards > 0))//return 1 if the choosen card has to give damage (e.g. Cursed Scroll, Magus od the Scroll).
{
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();
}
intValue = (card->controller()->game->hand->cards[std::rand() % card->controller()->game->hand->nb_cards]->name == card->name)?1:0;
}
else if (s == "mypos" || s == "bushidopoints")//hand,exile,grave & library only (library zpos is inverted so the recent one is always the top) -- bushido point
{