forked from External/mage
multiple changes:
* refactor: improved target pointer init code and logic, added docs and runtime checks; * game: fixed miss or wrong init calls in some continuous effects; * game: fixed wrong usage of target pointers (miss copy code, miss npe checks);
This commit is contained in:
parent
b2aa4ecc08
commit
78612ddc91
115 changed files with 466 additions and 355 deletions
|
|
@ -11,6 +11,7 @@ import mage.game.permanent.Permanent;
|
|||
import mage.target.targetpointer.FixedTargets;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -91,7 +92,7 @@ public class AttacksWithCreaturesTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
getEffects().setValue(VALUEKEY_NUMBER_ATTACKERS, attackers.size());
|
||||
if (setTargetPointer) {
|
||||
getEffects().setTargetPointer(new FixedTargets(attackers, game));
|
||||
getEffects().setTargetPointer(new FixedTargets(new ArrayList<>(attackers), game));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue