mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
Fixed #11623
This commit is contained in:
parent
b6042f7b22
commit
58739cf2d6
3 changed files with 17 additions and 3 deletions
|
|
@ -180,6 +180,9 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<debug>false</debug>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
|
|
|||
|
|
@ -63,6 +63,10 @@ class HealingGraceEffect extends PreventionEffectImpl {
|
|||
@Override
|
||||
public void init(Ability source, Game game) {
|
||||
this.targetSource.choose(Outcome.PreventDamage, source.getControllerId(), source.getSourceId(), source, game);
|
||||
// be sure to note the target source's zcc, etc, if able.
|
||||
if (targetSource.getFirstTarget() != null) {
|
||||
this.targetSource.updateTarget(targetSource.getFirstTarget(), game);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -74,7 +78,9 @@ class HealingGraceEffect extends PreventionEffectImpl {
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (super.applies(event, source, game)) {
|
||||
if (event.getTargetId().equals(source.getFirstTarget()) && event.getSourceId().equals(targetSource.getFirstTarget())) {
|
||||
if (event.getTargetId().equals(source.getFirstTarget())
|
||||
&& event.getSourceId().equals(targetSource.getFirstTarget())
|
||||
&& targetSource.isLegal(source, game)) { // source is blinked, becomes a new object, etc.) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -44,6 +43,10 @@ public class PreventAllDamageFromChosenSourceToYouEffect extends PreventionEffec
|
|||
@Override
|
||||
public void init(Ability source, Game game) {
|
||||
this.targetSource.choose(Outcome.PreventDamage, source.getControllerId(), source.getSourceId(), source, game);
|
||||
// be sure to note the target source's zcc, etc, if able.
|
||||
if (targetSource.getFirstTarget() != null) {
|
||||
this.targetSource.updateTarget(targetSource.getFirstTarget(), game);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -55,7 +58,9 @@ public class PreventAllDamageFromChosenSourceToYouEffect extends PreventionEffec
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (super.applies(event, source, game)) {
|
||||
if (event.getTargetId().equals(source.getControllerId()) && event.getSourceId().equals(targetSource.getFirstTarget())) {
|
||||
if (event.getTargetId().equals(source.getControllerId())
|
||||
&& event.getSourceId().equals(targetSource.getFirstTarget())
|
||||
&& targetSource.isLegal(source, game)) { // source is blinked, becomes a new object, etc.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue