Fixed AFR, STA, STX and J21 sets, fixed "_PROLIFERATE_" macro and fixed primitives with "proliferate" ability, fixed all primitives with "mutate" ability, improved "proliferate" and "duplicatecounters" keywords, added a new target "permanent" to target togheter a player and permanents on battlefield (e.g. cards with "proliferate").

This commit is contained in:
Vittorio Alfieri
2021-09-13 18:56:16 +02:00
parent 04a6a4bfe2
commit 2af470e42b
10 changed files with 80 additions and 36 deletions

View File

@@ -148,6 +148,8 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "creature,planeswalker"); //Any Damageable target (player, creature, planeswalker)
found = s.find("planeswalker^creature");
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "creature,planeswalker"); //Any Damageable target (player, creature, planeswalker)
found = s.find("permanent");
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "permanent"); //Any player or permanet (player, creature, planeswalker, artifact, land, enchantment)
found = s.find("creature");
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other); //2 Damageable target (player, creature)
found = s.find("planeswalker");
@@ -1466,16 +1468,25 @@ bool CardTargetChooser::equals(TargetChooser * tc)
TypeTargetChooser::TypeTargetChooser(GameObserver *observer, const char * _type, MTGCardInstance * card, int _maxtargets, bool other,bool targetMin) :
TargetZoneChooser(observer, card, _maxtargets, other,targetMin)
{
nbtypes = 0;
if(!strcmp(_type,"creature,planeswalker")){
int id = MTGAllCards::findType("creature");
nbtypes = 0;
addType(id);
id = MTGAllCards::findType("planeswalker");
addType(id);
}
else {
} else if(!strcmp(_type,"permanent")){
int id = MTGAllCards::findType("creature");
addType(id);
id = MTGAllCards::findType("planeswalker");
addType(id);
id = MTGAllCards::findType("land");
addType(id);
id = MTGAllCards::findType("artifact");
addType(id);
id = MTGAllCards::findType("enchantment");
addType(id);
} else {
int id = MTGAllCards::findType(_type);
nbtypes = 0;
addType(id);
}
int default_zones[] = { MTGGameZone::MY_BATTLEFIELD, MTGGameZone::OPPONENT_BATTLEFIELD };