forked from External/mage
implement [MH3] Nethergoyf, refactor targets usages by game param (#12267)
This commit is contained in:
parent
88b6f4036f
commit
754b382e78
62 changed files with 592 additions and 285 deletions
|
|
@ -27,6 +27,7 @@ public class SacrificeAllEffect extends OneShotEffect {
|
|||
|
||||
/**
|
||||
* Each player sacrifices a permanent
|
||||
*
|
||||
* @param filter can be generic, will automatically add article and necessary sacrifice predicates
|
||||
*/
|
||||
public SacrificeAllEffect(FilterPermanent filter) {
|
||||
|
|
@ -35,6 +36,7 @@ public class SacrificeAllEffect extends OneShotEffect {
|
|||
|
||||
/**
|
||||
* Each player sacrifices N permanents
|
||||
*
|
||||
* @param filter can be generic, will automatically add necessary sacrifice predicates
|
||||
*/
|
||||
public SacrificeAllEffect(int amount, FilterPermanent filter) {
|
||||
|
|
@ -43,6 +45,7 @@ public class SacrificeAllEffect extends OneShotEffect {
|
|||
|
||||
/**
|
||||
* Each player sacrifices X permanents
|
||||
*
|
||||
* @param filter can be generic, will automatically add necessary sacrifice predicates
|
||||
*/
|
||||
public SacrificeAllEffect(DynamicValue amount, FilterPermanent filter) {
|
||||
|
|
@ -91,7 +94,7 @@ public class SacrificeAllEffect extends OneShotEffect {
|
|||
continue;
|
||||
}
|
||||
TargetSacrifice target = new TargetSacrifice(numTargets, filter);
|
||||
while (!target.isChosen() && target.canChoose(player.getId(), source, game) && player.canRespond()) {
|
||||
while (!target.isChosen(game) && target.canChoose(player.getId(), source, game) && player.canRespond()) {
|
||||
player.choose(Outcome.Sacrifice, target, source, game);
|
||||
}
|
||||
perms.addAll(target.getTargets());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue