mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +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;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -38,9 +35,10 @@ import mage.constants.Rarity;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dustinconrad
|
||||
|
@ -88,16 +86,9 @@ class GuerrillaTacticsTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (GameEvent.EventType.DISCARDED_CARD.equals(event.getType())
|
||||
&& event.getSourceId() != null // can be null if e.g. discard down to hand limit
|
||||
&& event.getTargetId().equals(getSourceId())
|
||||
&& 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;
|
||||
return GameEvent.EventType.DISCARDED_CARD.equals(event.getType()) &&
|
||||
game.getOpponents(this.getControllerId()).contains(game.getControllerId(event.getSourceId())) &&
|
||||
getSourceId().equals(event.getTargetId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue