A permanent leaving the battlefield causes "lose control" triggers to trigger.

This commit is contained in:
elcnesh
2014-07-28 13:52:52 +00:00
parent c52fc8c612
commit 643e58e954
2 changed files with 8 additions and 3 deletions

View File

@@ -238,6 +238,12 @@ public class GameAction {
runParams.put("Origin", zoneFrom != null ? zoneFrom.getZoneType().name() : null);
runParams.put("Destination", zoneTo.getZoneType().name());
game.getTriggerHandler().runTrigger(TriggerType.ChangesZone, runParams, false);
if (zoneFrom != null && zoneFrom.is(ZoneType.Battlefield)) {
final HashMap<String, Object> runParams2 = new HashMap<String, Object>();
runParams2.put("Card", lastKnownInfo);
runParams2.put("OriginalController", zoneFrom.getPlayer());
game.getTriggerHandler().runTrigger(TriggerType.ChangesController, runParams2, false);
}
// AllZone.getStack().chooseOrderOfSimultaneousStackEntryAll();
if (suppress) {

View File

@@ -5,10 +5,9 @@ PT:4/4
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigGainControl | TriggerDescription$ Whenever CARDNAME attacks, gain control of target Equipment an opponent controls until end of turn. Attach it to CARDNAME. When you lose control of that Equipment, unattach it.
SVar:TrigGainControl:AB$ GainControl | Cost$ 0 | ValidTgts$ Equipment.OppCtrl | LoseControl$ EOT | TgtPrompt$ Select target Equipment an opponent controls | SubAbility$ DBAttach
SVar:DBAttach:DB$ Attach | Object$ ParentTarget | Defined$ Self | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ ParentTarget | Triggers$ TrigChangeController,OutOfSight | SVars$ TrigUnattach,ExileSelf | Duration$ Permanent
SVar:DBEffect:DB$ Effect | RememberObjects$ ParentTarget | Triggers$ TrigChangeController | SVars$ TrigUnattach,ExileSelf | Duration$ Permanent
SVar:TrigChangeController:Mode$ ChangesController | ValidCard$ Card.IsRemembered | ValidOriginalController$ You | TriggerZones$ Command | Execute$ TrigUnattach | TriggerDescription$ When you lose control of that Equipment, unattach it.
SVar:TrigUnattach:DB$ Unattach | Defined$ Remembered | SubAbility$ ExileSelf
SVar:OutOfSight:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.IsRemembered | Execute$ ExileSelf | Static$ True
SVar:ExileSelf:DB$ ChangeZone | Origin$ Command | Destination$ Exile
SVar:Picture:http://www.wizards.com/global/images/magic/general/ogre_geargrabber.jpg
Oracle:Whenever Ogre Geargrabber attacks, gain control of target Equipment an opponent controls until end of turn. Attach it to Ogre Geargrabber. When you lose control of that Equipment, unattach it.
Oracle:Whenever Ogre Geargrabber attacks, gain control of target Equipment an opponent controls until end of turn. Attach it to Ogre Geargrabber. When you lose control of that Equipment, unattach it.