mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
[ONE] Implement Tekuthal, Inquiry Dominus (#9921)
This commit is contained in:
parent
2167b7cb4f
commit
a151e979e5
4 changed files with 137 additions and 27 deletions
|
|
@ -52,37 +52,42 @@ public class ProliferateEffect extends OneShotEffect {
|
|||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
Target target = new TargetPermanentOrPlayer(0, Integer.MAX_VALUE, filter, true);
|
||||
Map<String, Serializable> options = new HashMap<>();
|
||||
options.put("UI.right.btn.text", "Done");
|
||||
controller.choose(Outcome.Benefit, target, source, game, options);
|
||||
|
||||
for (UUID chosen : target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(chosen);
|
||||
if (permanent != null) {
|
||||
for (Counter counter : permanent.getCounters(game).values()) {
|
||||
GameEvent event = new GameEvent(GameEvent.EventType.PROLIFERATE, getId(), source, source.getControllerId(), 1, true);
|
||||
if (game.replaceEvent(event)) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < event.getAmount(); i++) {
|
||||
Target target = new TargetPermanentOrPlayer(0, Integer.MAX_VALUE, filter, true);
|
||||
Map<String, Serializable> options = new HashMap<>();
|
||||
options.put("UI.right.btn.text", "Done");
|
||||
controller.choose(Outcome.Benefit, target, source, game, options);
|
||||
for (UUID chosen : target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(chosen);
|
||||
if (permanent != null) {
|
||||
for (Counter counter : permanent.getCounters(game).values()) {
|
||||
Counter newCounter = CounterType.findByName(counter.getName()).createInstance();
|
||||
if (permanent.addCounters(newCounter, source.getControllerId(), source, game)) {
|
||||
game.informPlayers(permanent.getName() + " had " + newCounter.getDescription() + " added to it.");
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
Player player = game.getPlayer(chosen);
|
||||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
for (Counter counter : player.getCounters().values()) {
|
||||
Counter newCounter = CounterType.findByName(counter.getName()).createInstance();
|
||||
if (permanent.addCounters(newCounter, source.getControllerId(), source, game)) {
|
||||
game.informPlayers(permanent.getName() + " had " + newCounter.getDescription() + " added to it.");
|
||||
if (player.addCounters(newCounter, source.getControllerId(), source, game)) {
|
||||
game.informPlayers(player.getLogName() + " had " + newCounter.getDescription() + " added to them.");
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
Player player = game.getPlayer(chosen);
|
||||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
for (Counter counter : player.getCounters().values()) {
|
||||
Counter newCounter = CounterType.findByName(counter.getName()).createInstance();
|
||||
if (player.addCounters(newCounter, source.getControllerId(), source, game)) {
|
||||
game.informPlayers(player.getLogName() + " had " + newCounter.getDescription() + " added to them.");
|
||||
}
|
||||
}
|
||||
game.fireEvent(GameEvent.getEvent(
|
||||
GameEvent.EventType.PROLIFERATED,
|
||||
controller.getId(), source, controller.getId()
|
||||
));
|
||||
}
|
||||
game.fireEvent(GameEvent.getEvent(
|
||||
GameEvent.EventType.PROLIFERATED,
|
||||
controller.getId(), source, controller.getId()
|
||||
));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ public class GameEvent implements Serializable {
|
|||
CAN_TAKE_MULLIGAN,
|
||||
SCRY, SCRIED, SCRY_TO_BOTTOM,
|
||||
SURVEIL, SURVEILED,
|
||||
PROLIFERATED,
|
||||
PROLIFERATE, PROLIFERATED,
|
||||
FATESEALED,
|
||||
FLIP_COIN, COIN_FLIPPED,
|
||||
REPLACE_ROLLED_DIE, // for Clam-I-Am workaround only
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue