- Added AI support for Cipher.

This commit is contained in:
Sloth
2013-02-23 15:53:03 +00:00
parent 503dda8753
commit 4e4182e8f6
3 changed files with 56 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -13724,6 +13724,7 @@ src/main/java/forge/card/ability/ai/DiscardAi.java -text
src/main/java/forge/card/ability/ai/DrainManaAi.java -text
src/main/java/forge/card/ability/ai/DrawAi.java svneol=native#text/plain
src/main/java/forge/card/ability/ai/EffectAi.java -text
src/main/java/forge/card/ability/ai/EncodeAi.java -text
src/main/java/forge/card/ability/ai/EndTurnAi.java -text
src/main/java/forge/card/ability/ai/FightAi.java -text
src/main/java/forge/card/ability/ai/FogAi.java -text

View File

@@ -51,7 +51,7 @@ public enum ApiType {
Draw (DrawEffect.class, DrawAi.class),
EachDamage (DamageEachEffect.class, DamageEachAi.class),
Effect (EffectEffect.class, EffectAi.class),
Encode (EncodeEffect.class, CannotPlayAi.class),
Encode (EncodeEffect.class, EncodeAi.class),
EndTurn (EndTurnEffect.class, EndTurnAi.class),
ExchangeLife (LifeExchangeEffect.class, LifeExchangeAi.class),
ExchangeControl (ControlExchangeEffect.class, ControlExchangeAi.class),

View File

@@ -0,0 +1,54 @@
/*
* Forge: Play Magic: the Gathering.
* Copyright (C) 2011 Forge Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package forge.card.ability.ai;
import forge.card.spellability.SpellAbility;
import forge.card.ability.SpellAbilityAi;
import forge.game.player.AIPlayer;
/**
* <p>
* AbilityFactoryBond class.
* </p>
*
* @author Forge
* @version $Id: AbilityFactoryBond.java 15090 2012-04-07 12:50:31Z Max mtg $
*/
public final class EncodeAi extends SpellAbilityAi {
/**
* <p>
* bondCanPlayAI.
* </p>
* @param sa
* a {@link forge.card.spellability.SpellAbility} object.
* @param af
* a {@link forge.card.ability.AbilityFactory} object.
*
* @return a boolean.
*/
@Override
protected boolean canPlayAI(AIPlayer aiPlayer, SpellAbility sa) {
return true;
}
@Override
public boolean chkAIDrawback(SpellAbility sa, AIPlayer ai) {
return true;
}
}