mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Fixed canPlay in AF Clash always returning true (even when it's a sorcery during any phase).
- Added a canPlayAI function to AF Clash (for Pulling Teeth).
This commit is contained in:
@@ -50,12 +50,7 @@ public final class AbilityFactoryClash {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return true;
|
||||
return AbilityFactoryClash.clashCanPlayAI(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -93,12 +88,7 @@ public final class AbilityFactoryClash {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return true;
|
||||
return AbilityFactoryClash.clashCanPlayAI(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -139,11 +129,6 @@ public final class AbilityFactoryClash {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean chkAIDrawback() {
|
||||
return true;
|
||||
@@ -168,6 +153,19 @@ public final class AbilityFactoryClash {
|
||||
return dbClash;
|
||||
}
|
||||
|
||||
private static boolean clashCanPlayAI(final SpellAbility sa) {
|
||||
final AbilityFactory af = sa.getAbilityFactory();
|
||||
final Target tgt = af.getAbTgt();
|
||||
if (tgt != null) {
|
||||
if (!AllZone.getHumanPlayer().canBeTargetedBy(sa)) {
|
||||
return false;
|
||||
}
|
||||
tgt.resetTargets();
|
||||
tgt.addTarget(AllZone.getHumanPlayer());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* clashResolve.
|
||||
|
||||
Reference in New Issue
Block a user