forked from External/mage
* Hans Eriksson - Fixed not working triggered fight ability (fixes #7219).
This commit is contained in:
parent
49bd6fe90d
commit
ed6bd4d7a7
1 changed files with 6 additions and 2 deletions
|
|
@ -21,6 +21,8 @@ import mage.players.Player;
|
|||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
|
@ -111,10 +113,12 @@ class HansErikssonEffect extends OneShotEffect {
|
|||
if (defenderId != null) {
|
||||
game.getCombat().addAttackerToCombat(permanent.getId(), defenderId, game);
|
||||
}
|
||||
Effect fightEffect = new FightTargetSourceEffect();
|
||||
fightEffect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(
|
||||
new FightTargetSourceEffect(), false,
|
||||
fightEffect, false,
|
||||
"When you put a creature card onto the battlefield this way, it fights {this}"
|
||||
);
|
||||
);
|
||||
game.fireReflexiveTriggeredAbility(ability, source);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue