mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Minor fix that triggering creature must be on the battlefield when effect resolves.
This commit is contained in:
parent
9762cf0b0d
commit
019b5a3f0e
1 changed files with 5 additions and 3 deletions
|
@ -76,6 +76,11 @@ public class EvolveAbility extends TriggeredAbilityImpl<EvolveAbility> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkInterveningIfClause(Game game) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isPowerOrThoughnessGreater(Permanent sourceCreature, Permanent newCreature) {
|
public static boolean isPowerOrThoughnessGreater(Permanent sourceCreature, Permanent newCreature) {
|
||||||
if (newCreature.getPower().getValue() > sourceCreature.getPower().getValue()) {
|
if (newCreature.getPower().getValue() > sourceCreature.getPower().getValue()) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -116,9 +121,6 @@ class EvolveEffect extends OneShotEffect<EvolveEffect> {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
UUID triggeringCreatureId = (UUID) getValue("triggeringCreature");
|
UUID triggeringCreatureId = (UUID) getValue("triggeringCreature");
|
||||||
Permanent triggeringCreature = game.getPermanent(triggeringCreatureId);
|
Permanent triggeringCreature = game.getPermanent(triggeringCreatureId);
|
||||||
if (triggeringCreature == null) {
|
|
||||||
triggeringCreature = (Permanent) game.getLastKnownInformation(triggeringCreatureId, Zone.BATTLEFIELD);
|
|
||||||
}
|
|
||||||
if (triggeringCreature != null) {
|
if (triggeringCreature != null) {
|
||||||
Permanent sourceCreature = game.getPermanent(source.getSourceId());
|
Permanent sourceCreature = game.getPermanent(source.getSourceId());
|
||||||
if (sourceCreature != null && EvolveAbility.isPowerOrThoughnessGreater(sourceCreature, triggeringCreature)) {
|
if (sourceCreature != null && EvolveAbility.isPowerOrThoughnessGreater(sourceCreature, triggeringCreature)) {
|
||||||
|
|
Loading…
Reference in a new issue