mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
more fixes
This commit is contained in:
parent
4d0a5c899e
commit
90fa953478
13 changed files with 24 additions and 15 deletions
|
@ -62,7 +62,7 @@ public class LilianaVess extends CardImpl<LilianaVess> {
|
|||
this.color.setBlack(true);
|
||||
this.loyalty = new MageInt(5);
|
||||
|
||||
LoyaltyAbility ability1 = new LoyaltyAbility(new DiscardTargetEffect(1), -1);
|
||||
LoyaltyAbility ability1 = new LoyaltyAbility(new DiscardTargetEffect(1), 1);
|
||||
ability1.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability1);
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ public class ProteanHydra extends CardImpl<ProteanHydra> {
|
|||
class ProteanHydraAbility extends TriggeredAbilityImpl<ProteanHydraAbility> {
|
||||
|
||||
public ProteanHydraAbility() {
|
||||
super(Zone.GRAVEYARD, new CreateDelayedTriggeredAbilityEffect(new ProteanHydraDelayedTriggeredAbility()), true);
|
||||
super(Zone.BATTLEFIELD, new CreateDelayedTriggeredAbilityEffect(new ProteanHydraDelayedTriggeredAbility()), true);
|
||||
}
|
||||
|
||||
public ProteanHydraAbility(final ProteanHydraAbility ability) {
|
||||
|
|
|
@ -104,4 +104,9 @@ class LeylineOfAnticipationEffect extends AsThoughEffectImpl<LeylineOfAnticipati
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Ability source) {
|
||||
return "You may cast nonland cards as though they had flash";
|
||||
}
|
||||
|
||||
}
|
|
@ -55,6 +55,7 @@ public class LeylineOfPunishment extends CardImpl<LeylineOfPunishment> {
|
|||
this.color.setRed(true);
|
||||
this.addAbility(LeylineAbility.getInstance());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LeylineOfPunishmentEffect1()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LeylineOfPunishmentEffect2()));
|
||||
}
|
||||
|
||||
public LeylineOfPunishment(final LeylineOfPunishment card) {
|
||||
|
|
|
@ -104,7 +104,6 @@ class LeylineOfTheVoidEffect extends ReplacementEffectImpl<LeylineOfTheVoidEffec
|
|||
if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).getToZone() == Zone.GRAVEYARD) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
|
||||
((ZoneChangeEvent)event).setToZone(Zone.EXILED);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -72,7 +72,7 @@ public class LilianasCaress extends CardImpl<LilianasCaress> {
|
|||
class LilianasCaressAbility extends TriggeredAbilityImpl<LilianasCaressAbility> {
|
||||
|
||||
public LilianasCaressAbility() {
|
||||
super(Zone.GRAVEYARD, new LoseLifeTargetEffect(2), true);
|
||||
super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), false);
|
||||
}
|
||||
|
||||
public LilianasCaressAbility(final LilianasCaressAbility ability) {
|
||||
|
|
|
@ -56,7 +56,7 @@ public class LilianasSpecter extends CardImpl<LilianasSpecter> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LilianasSpecterEffect(), true));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LilianasSpecterEffect(), false));
|
||||
}
|
||||
|
||||
public LilianasSpecter(final LilianasSpecter card) {
|
||||
|
|
|
@ -135,7 +135,7 @@ class VengevineWatcher extends WatcherImpl<VengevineWatcher> {
|
|||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.SPELL_CAST && event.getPlayerId().equals(controllerId)) {
|
||||
Spell spell = (Spell)game.getStack().getStackObject(event.getTargetId());
|
||||
if (spell.getCardType().contains(CardType.CREATURE)) {
|
||||
if (spell != null && spell.getCardType().contains(CardType.CREATURE)) {
|
||||
creatureSpellCount++;
|
||||
if (creatureSpellCount == 2)
|
||||
condition = true;
|
||||
|
|
|
@ -76,7 +76,7 @@ public class CantTargetControllerEffect extends ReplacementEffectImpl<CantTarget
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == EventType.TARGET && event.getTargetId().equals(source.getControllerId())) {
|
||||
StackObject sourceObject = game.getStack().getStackObject(source.getSourceId());
|
||||
StackObject sourceObject = game.getStack().getStackObject(event.getSourceId());
|
||||
if (sourceObject != null && filterSource.match(sourceObject)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public class CantTargetControllerEffect extends ReplacementEffectImpl<CantTarget
|
|||
@Override
|
||||
public String getText(Ability source) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("{this} can't be the targets of ");
|
||||
sb.append("You can't be the targets of ");
|
||||
sb.append(filterSource.getMessage());
|
||||
sb.append(" ").append(duration.toString());
|
||||
return sb.toString();
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.Outcome;
|
||||
|
@ -62,14 +63,17 @@ public class SearchLibraryPutOnLibraryEffect extends SearchEffect<SearchLibraryP
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
player.searchLibrary(target, game);
|
||||
List<Card> cards = new ArrayList<Card>();
|
||||
if (target.getTargets().size() > 0) {
|
||||
for (UUID cardId: (List<UUID>)target.getTargets()) {
|
||||
Card card = player.getLibrary().remove(cardId, game);
|
||||
if (card != null){
|
||||
card.moveToZone(Zone.LIBRARY, game, true);
|
||||
}
|
||||
if (card != null)
|
||||
cards.add(card);
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
for (Card card: cards) {
|
||||
card.moveToZone(Zone.LIBRARY, game, true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -355,7 +355,7 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
|||
Player player = getPlayer(playerId);
|
||||
for (Card card: player.getHand().getCards(this)) {
|
||||
if (card.getAbilities().containsKey(LeylineAbility.getInstance().getId())) {
|
||||
if (!player.chooseUse(Outcome.PutCardInPlay, "Do you wish to put " + card.getName() + " on the battlefield?", this)) {
|
||||
if (player.chooseUse(Outcome.PutCardInPlay, "Do you wish to put " + card.getName() + " on the battlefield?", this)) {
|
||||
player.getHand().remove(card);
|
||||
card.putOntoBattlefield(this, Zone.HAND, player.getId());
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ public abstract class PermanentImpl<T extends PermanentImpl<T>> extends CardImpl
|
|||
|
||||
@Override
|
||||
public void reset(Game game) {
|
||||
this.controllerId = ownerId;
|
||||
// this.controllerId = ownerId;
|
||||
this.maxBlocks = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -359,7 +359,7 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
//20091005 - 601.2a
|
||||
Card card = game.getCard(ability.getSourceId());
|
||||
if (card != null) {
|
||||
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, card.getId(), playerId))) {
|
||||
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, ability.getId(), playerId))) {
|
||||
game.bookmarkState();
|
||||
removeFromHand(card, game);
|
||||
game.getStack().push(new Spell(card, ability, playerId));
|
||||
|
@ -367,7 +367,7 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
for (KickerAbility kicker: card.getAbilities().getKickerAbilities()) {
|
||||
kicker.activate(game, false);
|
||||
}
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.SPELL_CAST, card.getId(), playerId));
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.SPELL_CAST, ability.getId(), playerId));
|
||||
game.fireInformEvent(name + " casts " + card.getName());
|
||||
game.removeLastBookmark();
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue