forked from External/mage
refactor: improved ETB rules generations, fixed some cards/abilities (related to #12791)
This commit is contained in:
parent
0d0661cc92
commit
19269b22b0
24 changed files with 129 additions and 41 deletions
|
|
@ -36,21 +36,25 @@ import java.util.*;
|
|||
public class HideawayAbility extends EntersBattlefieldTriggeredAbility {
|
||||
|
||||
private final int amount;
|
||||
private final String etbObjectDescription;
|
||||
|
||||
public HideawayAbility(int amount) {
|
||||
public HideawayAbility(Card card, int amount) {
|
||||
super(new HideawayExileEffect(amount));
|
||||
this.amount = amount;
|
||||
this.addWatcher(new HideawayWatcher());
|
||||
|
||||
this.etbObjectDescription = EntersBattlefieldTriggeredAbility.getThisObjectDescription(card);
|
||||
}
|
||||
|
||||
private HideawayAbility(final HideawayAbility ability) {
|
||||
super(ability);
|
||||
this.amount = ability.amount;
|
||||
this.etbObjectDescription = ability.etbObjectDescription;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Hideaway " + this.amount + " <i>(When this permanent enters the battlefield, look at the top "
|
||||
return "Hideaway " + this.amount + " <i>(When " + this.etbObjectDescription + " enters, look at the top "
|
||||
+ CardUtil.numberToText(this.amount) + " cards of your library, exile one face down, " +
|
||||
"then put the rest on the bottom of your library in a random order.)</i>";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue