diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 9ab640264..936610a2d 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -73407,8 +73407,7 @@ toughness=* [/card] [card] name=Plague Sliver -auto=@each my upkeep:life:-type:sliver:mybattlefield controller -auto=@each opponent upkeep:life:-type:sliver:opponentbattlefield opponent +auto=lord(sliver) transforms((,newabililty[@each my upkeep:damage:1 controller])) text=All Slivers have "At the beginning of your upkeep, this permanent deals 1 damage to you." mana={2}{B}{B} type=Creature diff --git a/projects/mtg/include/WEvent.h b/projects/mtg/include/WEvent.h index 94043218e..0f9b546ec 100644 --- a/projects/mtg/include/WEvent.h +++ b/projects/mtg/include/WEvent.h @@ -279,6 +279,12 @@ struct WEventCardUnattached : public WEventCardUpdate { virtual Targetable * getTarget(int target); }; +//event when card-equipment attached/equipped +struct WEventCardEquipped : public WEventCardUpdate { + WEventCardEquipped(MTGCardInstance * card); + virtual Targetable * getTarget(int target); +}; + //event when card moves from player/opponent battlefield to player/opponent battlefield struct WEventCardControllerChange : public WEventCardUpdate { WEventCardControllerChange(MTGCardInstance * card); diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index a02bc3912..aad2664fb 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -5611,6 +5611,8 @@ int AEquip::equip(MTGCardInstance * equipped) //we equip... a->addToGame(); } + WEvent * e = NEW WEventCardEquipped(source); + game->receiveEvent(e); return 1; } diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index eee380023..e4fc0bd7c 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -412,6 +412,8 @@ int GuiPlay::receiveEventPlus(WEvent * e) Replace(); else if (dynamic_cast (e)) Replace(); + else if (dynamic_cast (e)) + Replace(); else if (dynamic_cast (e)) Replace(); Replace(); diff --git a/projects/mtg/src/WEvent.cpp b/projects/mtg/src/WEvent.cpp index 4b1db1029..09f4b4214 100644 --- a/projects/mtg/src/WEvent.cpp +++ b/projects/mtg/src/WEvent.cpp @@ -165,6 +165,11 @@ WEventCardUnattached::WEventCardUnattached(MTGCardInstance * card) : { } +WEventCardEquipped::WEventCardEquipped(MTGCardInstance * card) : + WEventCardUpdate(card) +{ +} + WEventCardControllerChange::WEventCardControllerChange(MTGCardInstance * card) : WEventCardUpdate(card) { @@ -324,6 +329,12 @@ Targetable * WEventCardUnattached::getTarget(int target) return NULL; } +Targetable * WEventCardEquipped::getTarget(int target) +{ + if (target) return card; + return NULL; +} + Targetable * WEventCardControllerChange::getTarget(int target) { if (target) return card;