forked from External/mage
Implement Prototype ability (#11249)
Prototype is a SpellAbilityType, for which alternate costs are permitted. It has a continuous effect that applies on the battlefield as well as a method to modify the spell on the stack. Permanents have an isPrototyped flag that copy effects can check explicitly (same brittle method as transformed permanents use; reworking copy effects to streamline them is a separate scope). Many test cases have been added to confirm functionality (thanks to Zerris for additional test suggestions). --------- Co-authored-by: Susucre <34709007+Susucre@users.noreply.github.com> Co-authored-by: Evan Kranzler <theelk801@gmail.com> Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
This commit is contained in:
parent
ac20483b73
commit
5e095afdb0
23 changed files with 946 additions and 17 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package mage.game;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.*;
|
||||
import mage.constants.Outcome;
|
||||
|
|
@ -361,8 +362,16 @@ public final class ZonesHandler {
|
|||
// put onto battlefield with possible counters
|
||||
game.getPermanentsEntering().put(permanent.getId(), permanent);
|
||||
card.checkForCountersToAdd(permanent, source, game);
|
||||
|
||||
permanent.setTapped(info instanceof ZoneChangeInfo.Battlefield
|
||||
&& ((ZoneChangeInfo.Battlefield) info).tapped);
|
||||
|
||||
if (Zone.STACK == event.getFromZone()) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (spell != null) {
|
||||
permanent.setPrototyped(spell.isPrototyped());
|
||||
}
|
||||
}
|
||||
|
||||
permanent.setFaceDown(info.faceDown, game);
|
||||
if (info.faceDown) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue