mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
Fix #9560 and replace various custom effects with GainControlAllEffect
This commit is contained in:
parent
55b75a5839
commit
0b200748e5
12 changed files with 124 additions and 460 deletions
|
|
@ -30,7 +30,7 @@ public class GainControlAllEffect extends OneShotEffect {
|
|||
this.filter = filter;
|
||||
this.duration = duration;
|
||||
this.controllingPlayerId = controllingPlayerId;
|
||||
this.staticText = "gain control of " + filter.getMessage();
|
||||
this.staticText = "gain control of all " + filter.getMessage() + (duration.toString().isEmpty() ? "" : ' ' + duration.toString());
|
||||
}
|
||||
|
||||
public GainControlAllEffect(final GainControlAllEffect effect) {
|
||||
|
|
@ -50,7 +50,7 @@ public class GainControlAllEffect extends OneShotEffect {
|
|||
for (Permanent permanent : game.getBattlefield()
|
||||
.getActivePermanents(filter,
|
||||
source.getControllerId(), source, game)) {
|
||||
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, controllingPlayerId);
|
||||
ContinuousEffect effect = new GainControlTargetEffect(duration, controllingPlayerId);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue