mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
* Fixed wrong re-targeting on copy complex cards (fixed adjustTargets for copies)
* Oath Of Lieges - Fixed that copy of opponent's card don't work; * Oath Of Lieges - Fixed that it can shuffle lib without search;
This commit is contained in:
parent
59bda7f1d5
commit
bb18814c84
3 changed files with 225 additions and 84 deletions
|
|
@ -21,6 +21,8 @@ public class PermanentCard extends PermanentImpl {
|
|||
protected int maxLevelCounters;
|
||||
// A copy of the origin card that was cast (this is not the original card, so it's possible to chnage some attribute to this blueprint to change attributes to the permanent if it enters the battlefield with e.g. a subtype)
|
||||
protected Card card;
|
||||
// A copy of original card that was used for copy and create current permanent (used in copy effects and special commands like adjustTargets)
|
||||
protected Card copiedFromCard;
|
||||
// the number this permanent instance had
|
||||
protected int zoneChangeCounter;
|
||||
|
||||
|
|
@ -153,7 +155,13 @@ public class PermanentCard extends PermanentImpl {
|
|||
if (this.isTransformed() && card.getSecondCardFace() != null) {
|
||||
card.getSecondCardFace().adjustTargets(ability, game);
|
||||
} else {
|
||||
card.adjustTargets(ability, game);
|
||||
if (this.isCopy()) {
|
||||
// if COPIED card have adjuster then it's must be called instead own -- see OathOfLieges tests
|
||||
// raise null error on wrong copy
|
||||
this.getCopyFrom().adjustTargets(ability, game);
|
||||
} else {
|
||||
card.adjustTargets(ability, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue