mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
[MKC] Implement Boltbender
This commit is contained in:
parent
aaa082b4cc
commit
bc087bfb68
3 changed files with 60 additions and 4 deletions
|
|
@ -7,6 +7,8 @@ import mage.constants.Outcome;
|
|||
import mage.game.Game;
|
||||
import mage.game.stack.StackObject;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
|
@ -39,11 +41,15 @@ public class ChooseNewTargetsTargetEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
StackObject stackObject = game.getStack().getStackObject(source.getFirstTarget());
|
||||
if (stackObject != null) {
|
||||
return stackObject.chooseNewTargets(game, source.getControllerId(), forceChange, onlyOneTarget, null);
|
||||
for (UUID targetId : getTargetPointer().getTargets(game, source)) {
|
||||
StackObject stackObject = game.getStack().getStackObject(targetId);
|
||||
if (stackObject != null) {
|
||||
stackObject.chooseNewTargets(
|
||||
game, source.getControllerId(), forceChange, onlyOneTarget, null
|
||||
);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue