mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 12:49:39 -08:00
[AI] enhanced targeting. card fixes
This commit is contained in:
parent
2200fb8572
commit
eefedc03b9
10 changed files with 91 additions and 5 deletions
|
|
@ -88,7 +88,7 @@ class BowerPassageEffect extends RestrictionEffect<BowerPassageEffect> {
|
|||
|
||||
@Override
|
||||
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
|
||||
if (attacker.getControllerId().equals(source.getControllerId()) && blocker.getAbilities().contains(FlyingAbility.getInstance())) {
|
||||
if (attacker != null && attacker.getControllerId().equals(source.getControllerId()) && blocker.getAbilities().contains(FlyingAbility.getInstance())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class HuntedGhoulEffect extends RestrictionEffect<HuntedGhoulEffect> {
|
|||
|
||||
@Override
|
||||
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
|
||||
if (attacker.getSubtype().contains("Human")) {
|
||||
if (attacker != null && attacker.getSubtype().contains("Human")) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
|
|
@ -44,6 +43,8 @@ import mage.players.Player;
|
|||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
|
|
@ -93,6 +94,7 @@ class GraveyardShovelEffect extends OneShotEffect<GraveyardShovelEffect> {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (targetPlayer != null && controller != null) {
|
||||
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard();
|
||||
target.setRequired(true);
|
||||
if (targetPlayer.chooseTarget(Outcome.Exile, target, source, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue