mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
* Added Brothers Yamazaki and Struggle for Sanity from Champions of Kamigawa.
This commit is contained in:
parent
bac17fd390
commit
31e82d1dc4
4 changed files with 284 additions and 9 deletions
|
|
@ -1891,18 +1891,20 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
filterLegendName.add(new NamePredicate(legend.getName()));
|
||||
filterLegendName.add(new ControllerIdPredicate(legend.getControllerId()));
|
||||
if (getBattlefield().contains(filterLegendName, legend.getControllerId(), this, 2)) {
|
||||
Player controller = this.getPlayer(legend.getControllerId());
|
||||
if (controller != null) {
|
||||
Target targetLegendaryToKeep = new TargetPermanent(filterLegendName);
|
||||
targetLegendaryToKeep.setTargetName(legend.getName() + " to keep (Legendary Rule)?");
|
||||
controller.chooseTarget(Outcome.Benefit, targetLegendaryToKeep, null, this);
|
||||
for (Permanent dupLegend : getBattlefield().getActivePermanents(filterLegendName, legend.getControllerId(), this)) {
|
||||
if (!targetLegendaryToKeep.getTargets().contains(dupLegend.getId())) {
|
||||
movePermanentToGraveyardWithInfo(dupLegend);
|
||||
if (!replaceEvent(GameEvent.getEvent(GameEvent.EventType.DESTROY_PERMANENT_BY_LEGENDARY_RULE, legend.getId(), legend.getControllerId()))) {
|
||||
Player controller = this.getPlayer(legend.getControllerId());
|
||||
if (controller != null) {
|
||||
Target targetLegendaryToKeep = new TargetPermanent(filterLegendName);
|
||||
targetLegendaryToKeep.setTargetName(legend.getName() + " to keep (Legendary Rule)?");
|
||||
controller.chooseTarget(Outcome.Benefit, targetLegendaryToKeep, null, this);
|
||||
for (Permanent dupLegend : getBattlefield().getActivePermanents(filterLegendName, legend.getControllerId(), this)) {
|
||||
if (!targetLegendaryToKeep.getTargets().contains(dupLegend.getId())) {
|
||||
movePermanentToGraveyardWithInfo(dupLegend);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,6 +210,11 @@ public class GameEvent implements Serializable {
|
|||
DAMAGE_CREATURE, DAMAGED_CREATURE,
|
||||
DAMAGE_PLANESWALKER, DAMAGED_PLANESWALKER,
|
||||
DESTROY_PERMANENT,
|
||||
/* DESTROY_PERMANENT_BY_LEGENDARY_RULE
|
||||
targetId id of the permanent to destroy
|
||||
playerId controller of the permanent to detroy
|
||||
*/
|
||||
DESTROY_PERMANENT_BY_LEGENDARY_RULE,
|
||||
/* DESTROYED_PERMANENT
|
||||
targetId id of the destroyed creature
|
||||
sourceId sourceId of the ability with the destroy effect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue