mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
Fixed Computer Player treating unprevented moves as unplayable.
(First time contributing so please excuse my noobness) Card not prevented by an effect should be playable ("&& !prevented"), but currently AI says card not prevented is NOT playable ("&& prevented"). Also, not sure why AI doesn't add to unplayable even though its not contained by playableInstants or playableNonInstants. I'm not even sure if we're maintaining ComputerPlayer's decision logic (as opposed to Computer Player7).
This commit is contained in:
parent
de07960ee5
commit
56eef2b563
1 changed files with 1 additions and 1 deletions
|
@ -1303,7 +1303,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
if (mana.enough(avail)) {
|
||||
SpellAbility ability = card.getSpellAbility();
|
||||
if (ability != null && ability.canActivate(playerId, game).canActivate()
|
||||
&& game.getContinuousEffects().preventedByRuleModification(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, ability.getSourceId(), ability.getSourceId(), playerId), ability, game, true)) {
|
||||
&& !game.getContinuousEffects().preventedByRuleModification(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, ability.getSourceId(), ability.getSourceId(), playerId), ability, game, true)) {
|
||||
if (card.getCardType().contains(CardType.INSTANT)
|
||||
|| card.hasAbility(FlashAbility.getInstance().getId(), game)) {
|
||||
playableInstant.add(card);
|
||||
|
|
Loading…
Reference in a new issue