mirror of
https://github.com/magefree/mage.git
synced 2025-12-29 23:12:10 -08:00
* Cycling effects - Added missing reveal effect, added missing reminder text.
This commit is contained in:
parent
5a54488a0d
commit
294567ec3e
3 changed files with 16 additions and 12 deletions
|
|
@ -28,15 +28,14 @@
|
|||
|
||||
package mage.abilities.effects.common.search;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.SearchEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
|
@ -93,7 +92,7 @@ public class SearchLibraryPutInHandEffect extends SearchEffect<SearchLibraryPutI
|
|||
if (player.searchLibrary(target, game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
Cards cards = new CardsImpl();
|
||||
for (UUID cardId: (List<UUID>)target.getTargets()) {
|
||||
for (UUID cardId: target.getTargets()) {
|
||||
Card card = player.getLibrary().remove(cardId, game);
|
||||
if (card != null){
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, false);
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ import mage.target.common.TargetCardInLibrary;
|
|||
*/
|
||||
public class CyclingAbility extends ActivatedAbilityImpl<CyclingAbility> {
|
||||
|
||||
private Cost cost;
|
||||
private String text;
|
||||
private final Cost cost;
|
||||
private final String text;
|
||||
|
||||
public CyclingAbility(Cost cost) {
|
||||
super(Zone.HAND, new DrawCardControllerEffect(1), cost);
|
||||
|
|
@ -56,7 +56,7 @@ public class CyclingAbility extends ActivatedAbilityImpl<CyclingAbility> {
|
|||
}
|
||||
|
||||
public CyclingAbility(Cost cost, FilterCard filter, String text){
|
||||
super(Zone.HAND, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter)), cost);
|
||||
super(Zone.HAND, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true), cost);
|
||||
this.addCost(new DiscardSourceCost());
|
||||
this.cost = cost;
|
||||
this.text = text;
|
||||
|
|
@ -75,14 +75,15 @@ public class CyclingAbility extends ActivatedAbilityImpl<CyclingAbility> {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
String rule;
|
||||
StringBuilder rule = new StringBuilder(this.text);
|
||||
if(cost instanceof ManaCosts){
|
||||
rule = this.text + " " + cost.getText() + " <i>(" + super.getRule() + ")</i>";
|
||||
rule.append(" ");
|
||||
}
|
||||
else{
|
||||
rule = this.text + "-" + cost.getText() + " <i>(" + super.getRule() + ")</i>";
|
||||
rule.append(" - ");
|
||||
}
|
||||
return rule;
|
||||
rule.append(cost.getText()).append(" <i>(").append(super.getRule(true)).append(")</i>");
|
||||
return rule.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue