mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Fixed bug #3835, stolen creatures that exploit themselves now trigger for the appropriate player
This commit is contained in:
parent
6988688e64
commit
12cedf945d
1 changed files with 3 additions and 4 deletions
|
@ -63,7 +63,6 @@ public class ExploitCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
return new ExploitCreatureTriggeredAbility(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.EXPLOITED_CREATURE;
|
||||
|
@ -74,7 +73,8 @@ public class ExploitCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (event.getTargetId().equals(getSourceId()) && event.getSourceId().equals(getSourceId())) {
|
||||
if (!this.hasSourceObjectAbility(game, source, event)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
this.setControllerId(event.getPlayerId());
|
||||
return true; // if Exploits creature sacrifices itself, exploit triggers
|
||||
}
|
||||
return super.isInUseableZone(game, source, event);
|
||||
|
@ -83,7 +83,7 @@ public class ExploitCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getSourceId().equals(getSourceId())) {
|
||||
for (Effect effect: getEffects()) {
|
||||
for (Effect effect : getEffects()) {
|
||||
if (setTargetPointer == SetTargetPointer.PERMANENT) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||
}
|
||||
|
@ -98,4 +98,3 @@ public class ExploitCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
return "When {this} exploits a creature, " + super.getRule();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue