mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
[SWS] Fixed some bugs of starwars cards.
This commit is contained in:
parent
81b74c1519
commit
ca414417e3
16 changed files with 140 additions and 76 deletions
|
|
@ -9,7 +9,7 @@ import mage.game.events.GameEvent;
|
|||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
public class BeginningOfCombatTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
|
||||
private TargetController targetController;
|
||||
private boolean setTargetPointer;
|
||||
|
||||
|
|
@ -46,27 +46,27 @@ public class BeginningOfCombatTriggeredAbility extends TriggeredAbilityImpl {
|
|||
boolean yours = event.getPlayerId().equals(this.controllerId);
|
||||
if (yours && setTargetPointer) {
|
||||
if (getTargets().isEmpty()) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
this.getEffects().stream().forEach((effect) -> {
|
||||
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return yours;
|
||||
case OPPONENT:
|
||||
if (game.getPlayer(this.controllerId).hasOpponent(event.getPlayerId(), game)) {
|
||||
if (setTargetPointer) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
this.getEffects().stream().forEach((effect) -> {
|
||||
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||
}
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case ANY:
|
||||
if (setTargetPointer) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
this.getEffects().stream().forEach((effect) -> {
|
||||
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||
}
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,19 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff
|
|||
this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, targetZoneLookedCards, putOnTop, reveal, upTo, Zone.HAND, false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param numberOfCards
|
||||
* @param mayShuffleAfter
|
||||
* @param numberToPick
|
||||
* @param pickFilter
|
||||
* @param targetZoneLookedCards
|
||||
* @param putOnTop
|
||||
* @param reveal
|
||||
* @param upTo
|
||||
* @param targetZonePickedCards
|
||||
* @param optional
|
||||
*/
|
||||
public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, DynamicValue numberToPick,
|
||||
FilterCard pickFilter, Zone targetZoneLookedCards, boolean putOnTop, boolean reveal, boolean upTo, Zone targetZonePickedCards, boolean optional) {
|
||||
super(Outcome.DrawCard, numberOfCards, mayShuffleAfter, targetZoneLookedCards, putOnTop);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect {
|
|||
if (player != null && targetPlayer != null && sourceObject != null) {
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(targetPlayer.getLibrary().getTopCards(game, amount));
|
||||
player.lookAtCards(sourceObject.getName(), cards, game);
|
||||
player.lookAtCards(sourceObject.getIdName(), cards, game);
|
||||
if (putToGraveyard) {
|
||||
for (Card card : cards.getCards(game)) {
|
||||
if (player.chooseUse(outcome, "Do you wish to put card into the player's graveyard?", source, game)) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
*/
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -37,11 +37,10 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class RemoveFromCombatSourceEffect extends OneShotEffect {
|
||||
|
||||
public RemoveFromCombatSourceEffect() {
|
||||
super(Outcome.Detriment);
|
||||
super(Outcome.AIDontUseIt);
|
||||
staticText = setText();
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +62,6 @@ public class RemoveFromCombatSourceEffect extends OneShotEffect {
|
|||
return new RemoveFromCombatSourceEffect(this);
|
||||
}
|
||||
|
||||
|
||||
private String setText() {
|
||||
return "Remove {this} from combat";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue