Fixed "Jolrael, Mwonvuli Recluse", fixed "Corrosive Ooze", added new keyword "all(myeqp)" in order to target all the equipments attached to a creature (e.g. Corrosive Ooze).
This commit is contained in:
@@ -12303,7 +12303,8 @@ toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=Corrosive Ooze
|
||||
auto=
|
||||
auto=emblem transforms((,newability[lord(creature[counter{0/0.1.CorrosiveEffect}]) transforms((,newability[@each combatends:name(Destroy all equipments) all(myeqp) destroy],newability[@each combatends:name(Destroy all equipments) removeallcounters(0/0.1.CorrosiveEffect)]))])) forever dontremove
|
||||
auto=@combat(blocking,blocked) source(this) from(creature[equipped]):name(Destroy all equipments) all(trigger[from]) counter(0/0.1.CorrosiveEffect)
|
||||
text=Whenever Corrosive Ooze blocks or becomes blocked by an equipped creature, destroy all Equipment attached to that creature at end of combat.
|
||||
mana={1}{G}
|
||||
type=Creature
|
||||
@@ -32979,8 +32980,8 @@ type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Jolrael, Mwonvuli Recluse
|
||||
auto=@drawof(player):transforms((,newability[@drawof(player) restriction{once}:token(Cat Jol)])) oneshot
|
||||
auto={4}{G}{G}:all(creature|mybattlefield) transforms((,setpower=type:*:myHand,settoughness=type:*:myHand)) ueot
|
||||
auto=@drawof(player) restriction{compare(pdrewcount)~equalto~2}:name(Create cat) token(Cat Jol)
|
||||
auto={4}{G}{G}:name(All creatures becomes X/X) all(creature|mybattlefield) transforms((,setpower=type:*:myHand,settoughness=type:*:myHand)) ueot
|
||||
text=Whenever you draw your second card each turn, create a 2/2 green Cat creature token. -- {4}{G}{G}: Until end of turn, creatures you control have base power and toughness X/X, where X is the number of cards in your hand.
|
||||
mana={1}{G}
|
||||
type=Legendary Creature
|
||||
|
||||
@@ -397,4 +397,24 @@ public:
|
||||
virtual bool equals(TargetChooser * tc);
|
||||
~TotemChooser();
|
||||
};
|
||||
|
||||
class EqpChooser: public TypeTargetChooser
|
||||
{
|
||||
public:
|
||||
bool withoutProtections;
|
||||
EqpChooser(GameObserver *observer, int * _zones, int _nbzones, MTGCardInstance * card = NULL, int _maxtargets = 1, bool other = false, bool targetMin = false) :
|
||||
TypeTargetChooser(observer, "*",_zones, _nbzones, card, _maxtargets, other, targetMin)
|
||||
{
|
||||
}
|
||||
;
|
||||
EqpChooser(GameObserver *observer, MTGCardInstance * card = NULL, int _maxtargets = 1, bool other = false,bool targetMin = false) :
|
||||
TypeTargetChooser(observer, "*", card, _maxtargets, other,targetMin)
|
||||
{
|
||||
}
|
||||
;
|
||||
virtual bool canTarget(Targetable * target, bool withoutProtections = false);
|
||||
virtual EqpChooser * clone() const;
|
||||
virtual bool equals(TargetChooser * tc);
|
||||
~EqpChooser();
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -54,6 +54,13 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
return NEW TotemChooser(observer, card, maxtargets);
|
||||
};
|
||||
|
||||
found = s.find("myeqp");
|
||||
if (found != string::npos)
|
||||
{
|
||||
int maxtargets = 1;
|
||||
return NEW EqpChooser(observer, card, maxtargets);
|
||||
};
|
||||
|
||||
found = s.find("mytgt");
|
||||
if (found == 0)
|
||||
{
|
||||
@@ -2305,3 +2312,42 @@ bool TotemChooser::equals(TargetChooser * tc)
|
||||
TotemChooser::~TotemChooser()
|
||||
{
|
||||
}
|
||||
|
||||
//equipment chooser
|
||||
bool EqpChooser::canTarget(Targetable * target,bool withoutProtections)
|
||||
{
|
||||
if (MTGCardInstance * card = dynamic_cast<MTGCardInstance*>(target))
|
||||
{
|
||||
if(card == source)
|
||||
return false;
|
||||
if(!card->isInPlay(observer))
|
||||
return false;
|
||||
if(card->parentCards.size())
|
||||
{
|
||||
if((card->parentCards.at(0)) == source && (card->hasType(Subtypes::TYPE_EQUIPMENT)))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
EqpChooser* EqpChooser::clone() const
|
||||
{
|
||||
EqpChooser * a = NEW EqpChooser(*this);
|
||||
return a;
|
||||
}
|
||||
|
||||
bool EqpChooser::equals(TargetChooser * tc)
|
||||
{
|
||||
|
||||
EqpChooser * dtc = dynamic_cast<EqpChooser *> (tc);
|
||||
if (!dtc)
|
||||
return false;
|
||||
|
||||
return TypeTargetChooser::equals(tc);
|
||||
}
|
||||
|
||||
EqpChooser::~EqpChooser()
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user