mirror of
https://github.com/correl/mage.git
synced 2025-01-11 11:05:23 +00:00
Some minor changes / formatting.
This commit is contained in:
parent
51965b4bad
commit
19679c9f6e
5 changed files with 30 additions and 32 deletions
|
@ -1617,7 +1617,6 @@ public class ComputerPlayer<T extends ComputerPlayer<T>> extends PlayerImpl<T> i
|
|||
* 3. get card colors as chosen starting from most rated card
|
||||
*/
|
||||
protected List<ColoredManaSymbol> chooseDeckColorsIfPossible() {
|
||||
log.warn(this.getName() + " choose Deck Colors.");
|
||||
if (pickedCards.size() > 2) {
|
||||
// sort by score and color mana symbol count in descending order
|
||||
Collections.sort(pickedCards, new Comparator<PickedCard>() {
|
||||
|
|
|
@ -100,7 +100,7 @@ public class RateCard {
|
|||
if (effect.getOutcome().equals(Outcome.DestroyPermanent)) {
|
||||
for (Target target : ability.getTargets()) {
|
||||
if (target instanceof TargetCreaturePermanent) {
|
||||
log.info("Found destroyer: " + card.getName());
|
||||
log.debug("Found destroyer: " + card.getName());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,13 +25,11 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.commander;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
|
@ -69,13 +67,13 @@ public class KaaliaOfTheVast extends CardImpl<KaaliaOfTheVast> {
|
|||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flying
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card
|
||||
// from your hand onto the battlefield tapped and attacking that opponent.
|
||||
this.addAbility(new KaaliaOfTheVastAttacksAbility());
|
||||
|
||||
// Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card
|
||||
// from your hand onto the battlefield tapped and attacking that opponent.
|
||||
this.addAbility(new KaaliaOfTheVastAttacksAbility());
|
||||
}
|
||||
|
||||
public KaaliaOfTheVast(final KaaliaOfTheVast card) {
|
||||
|
@ -90,29 +88,29 @@ public class KaaliaOfTheVast extends CardImpl<KaaliaOfTheVast> {
|
|||
}
|
||||
|
||||
class KaaliaOfTheVastAttacksAbility extends TriggeredAbilityImpl<KaaliaOfTheVastAttacksAbility> {
|
||||
|
||||
|
||||
public KaaliaOfTheVastAttacksAbility() {
|
||||
super(Zone.BATTLEFIELD, new KaaliaOfTheVastEffect(), false);
|
||||
}
|
||||
|
||||
|
||||
public KaaliaOfTheVastAttacksAbility(final KaaliaOfTheVastAttacksAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId()) ) {
|
||||
Player opponent = game.getPlayer(event.getTargetId());
|
||||
if( opponent != null ) {
|
||||
return true;
|
||||
}
|
||||
if (event.getType() == EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId())) {
|
||||
Player opponent = game.getPlayer(event.getTargetId());
|
||||
if (opponent != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent.";
|
||||
return "Whenever {this} attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent.";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -150,8 +148,8 @@ class KaaliaOfTheVastEffect extends OneShotEffect<KaaliaOfTheVastEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null || !player.chooseUse(Outcome.PutCreatureInPlay, "Put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking?", game)) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
TargetCardInHand target = new TargetCardInHand(filter);
|
||||
if (target.canChoose(player.getId(), game) && target.choose(getOutcome(), player.getId(), source.getSourceId(), game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
|
@ -159,11 +157,15 @@ class KaaliaOfTheVastEffect extends OneShotEffect<KaaliaOfTheVastEffect> {
|
|||
Card card = game.getCard(cardId);
|
||||
if (card != null && game.getCombat() != null) {
|
||||
UUID defenderId = game.getCombat().getDefendingPlayerId(source.getSourceId(), game);
|
||||
if(defenderId != null) {
|
||||
if (defenderId != null) {
|
||||
player.getHand().remove(card);
|
||||
card.moveToZone(Zone.BATTLEFIELD, source.getId(), game, true);
|
||||
game.getCombat().declareAttacker(card.getId(), defenderId, game);
|
||||
return true;
|
||||
player.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId());
|
||||
Permanent creature = game.getPermanent(cardId);
|
||||
if (creature != null) {
|
||||
game.getCombat().declareAttacker(card.getId(), defenderId, game);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,10 +55,7 @@ class IntimidateEffect extends RestrictionEffect<IntimidateEffect> implements Ma
|
|||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
if (permanent.getAbilities().containsKey(IntimidateAbility.getInstance().getId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return permanent.getAbilities().containsKey(IntimidateAbility.getInstance().getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -70,9 +70,9 @@ public abstract class DraftCube {
|
|||
|
||||
private static final Logger logger = Logger.getLogger(DraftCube.class);
|
||||
|
||||
private static Random rnd = new Random();
|
||||
private String name;
|
||||
private int boosterSize = 15;
|
||||
private static final Random rnd = new Random();
|
||||
private final String name;
|
||||
private final int boosterSize = 15;
|
||||
|
||||
protected List<CardIdentity> cubeCards = new ArrayList<CardIdentity>();
|
||||
protected List<CardIdentity> leftCubeCards = new ArrayList<CardIdentity>();
|
||||
|
@ -118,7 +118,7 @@ public abstract class DraftCube {
|
|||
booster.add(cardInfo.getCard());
|
||||
done = true;
|
||||
} else {
|
||||
logger.error(new StringBuilder(this.getName()).append(" - Card not found: ").append(cardId.getName()).append(":").append(cardId.extension));
|
||||
logger.warn(new StringBuilder(this.getName()).append(" - Card not found: ").append(cardId.getName()).append(":").append(cardId.extension));
|
||||
notValid++;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue