mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Rework sacrifice effects to support "can't be sacrificed" (#11587)
* add TargetSacrifice and canBeSacrificed
* SacrificeTargetCost refactor, now uses TargetSacrifice, constructors simplified, subclasses aligned
* fix text errors introduced by refactor
* refactor SacrificeEffect, SacrificeAllEffect, SacrificeOpponentsEffect
* cleanup keyword abilities involving sacrifice
* fix a bunch of custom effect classes involving sacrifice
* fix test choices
* update Assault Suit implementation
* fix filter check arguments
* add documentation to refactored common classes
* [CLB] Implement Jon Irenicus, Shattered One
* implement "{this} can't be sacrificed"
* add tests for Assault Suit and Jon Irenicus
* refactor out PlayerToRightGainsControlOfSourceEffect
* implement [LTC] Hithlain Rope
* add choose hint to all TargetSacrifice
---------
Co-authored-by: Evan Kranzler <theelk801@gmail.com>
Co-authored-by: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com>
This commit is contained in:
parent
f28c5c4fc5
commit
9b3ff32a33
699 changed files with 1837 additions and 1619 deletions
|
|
@ -192,9 +192,10 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (target.getOriginalTarget() instanceof TargetControlledPermanent) {
|
||||
if (target.getOriginalTarget() instanceof TargetControlledPermanent
|
||||
|| target.getOriginalTarget() instanceof TargetSacrifice) {
|
||||
List<Permanent> targets;
|
||||
TargetControlledPermanent origTarget = (TargetControlledPermanent) target.getOriginalTarget();
|
||||
TargetPermanent origTarget = (TargetPermanent) target.getOriginalTarget();
|
||||
targets = threats(abilityControllerId, source, origTarget.getFilter(), game, target.getTargets());
|
||||
if (!outcome.isGood()) {
|
||||
Collections.reverse(targets);
|
||||
|
|
@ -689,8 +690,9 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (target.getOriginalTarget() instanceof TargetControlledPermanent) {
|
||||
TargetControlledPermanent origTarget = (TargetControlledPermanent) target.getOriginalTarget();
|
||||
if (target.getOriginalTarget() instanceof TargetControlledPermanent
|
||||
|| target.getOriginalTarget() instanceof TargetSacrifice) {
|
||||
TargetPermanent origTarget = (TargetPermanent) target.getOriginalTarget();
|
||||
List<Permanent> targets;
|
||||
targets = threats(abilityControllerId, source, origTarget.getFilter(), game, target.getTargets());
|
||||
if (!outcome.isGood()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue