mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
Reverting changes to Guerrilla Tactics as it works now
This commit is contained in:
parent
5ec0b656bb
commit
018498598c
1 changed files with 5 additions and 14 deletions
|
@ -27,9 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.ninthedition;
|
package mage.sets.ninthedition;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageObject;
|
|
||||||
|
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
@ -38,9 +35,10 @@ import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.stack.StackObject;
|
|
||||||
import mage.target.common.TargetCreatureOrPlayer;
|
import mage.target.common.TargetCreatureOrPlayer;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author dustinconrad
|
* @author dustinconrad
|
||||||
|
@ -88,16 +86,9 @@ class GuerrillaTacticsTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (GameEvent.EventType.DISCARDED_CARD.equals(event.getType())
|
return GameEvent.EventType.DISCARDED_CARD.equals(event.getType()) &&
|
||||||
&& event.getSourceId() != null // can be null if e.g. discard down to hand limit
|
game.getOpponents(this.getControllerId()).contains(game.getControllerId(event.getSourceId())) &&
|
||||||
&& event.getTargetId().equals(getSourceId())
|
getSourceId().equals(event.getTargetId());
|
||||||
&& event.getPlayerId().equals(getControllerId())) {
|
|
||||||
MageObject mageObject = game.getObject(event.getSourceId());
|
|
||||||
if (mageObject != null && (mageObject instanceof StackObject)) {
|
|
||||||
return game.getOpponents(this.getControllerId()).contains(((StackObject)mageObject).getControllerId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue