mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[LTR] Implement Aragorn, Company Leader
This commit is contained in:
parent
04f1327816
commit
018a815eb1
3 changed files with 100 additions and 5 deletions
|
|
@ -12,10 +12,7 @@ import mage.game.permanent.Permanent;
|
|||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -56,7 +53,9 @@ public class AddCounterChoiceSourceEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanentEntering(source.getSourceId());
|
||||
Permanent permanent = Optional
|
||||
.ofNullable(game.getPermanentEntering(source.getSourceId()))
|
||||
.orElseGet(() -> source.getSourcePermanentIfItStillExists(game));
|
||||
if (player == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue