mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Modified the enPump keyword's canPlay() method and this appears to correct the problem where the computer was casting the same aura multiple times.
This commit is contained in:
@@ -1394,13 +1394,13 @@ public class CardFactoryUtil {
|
|||||||
final SpellAbility enchant = new Spell(sourceCard) {
|
final SpellAbility enchant = new Spell(sourceCard) {
|
||||||
private static final long serialVersionUID = -8259560434384053776L;
|
private static final long serialVersionUID = -8259560434384053776L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlay() {
|
public boolean canPlay() {
|
||||||
return (sourceCard.getKeyword().contains("Flash") && (AllZone.GameAction.isCardInZone(sourceCard, AllZone.Human_Hand) ||
|
return (sourceCard.getKeyword().contains("Flash") && (AllZone.GameAction.isCardInZone(sourceCard, AllZone.Human_Hand) ||
|
||||||
AllZone.GameAction.isCardInZone(sourceCard, AllZone.Computer_Hand)) // for flash, which is not working through the keyword for some reason
|
AllZone.GameAction.isCardInZone(sourceCard, AllZone.Computer_Hand)) // for flash, which is not working through the keyword for some reason
|
||||||
||
|
|| // if not flash then limit to main 1 and 2 on controller's turn and card in hand
|
||||||
(! sourceCard.getKeyword().contains("Flash") && // if not flash then limit to main 1 and 2 on controller's turn
|
(! sourceCard.getKeyword().contains("Flash") && (sourceCard.getController().equals(AllZone.Phase.getActivePlayer()) &&
|
||||||
(sourceCard.getController().equals(AllZone.Phase.getActivePlayer()) &&
|
(AllZone.GameAction.isCardInZone(sourceCard, AllZone.Human_Hand) || AllZone.GameAction.isCardInZone(sourceCard, AllZone.Computer_Hand)) &&
|
||||||
(AllZone.Phase.getPhase().equals(Constant.Phase.Main1) || AllZone.Phase.getPhase().equals(Constant.Phase.Main2)))));
|
(AllZone.Phase.getPhase().equals(Constant.Phase.Main1) || AllZone.Phase.getPhase().equals(Constant.Phase.Main2)))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user