mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
refactored a few classes
This commit is contained in:
parent
8b40d19d56
commit
6a722a33db
2 changed files with 20 additions and 20 deletions
|
@ -28,7 +28,7 @@ public final class MausoleumSecrets extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
|
||||
|
||||
// Undergrowth — Search your library for a black card with converted mana cost equal to or less than the number of creature cards in your graveyard, reveal it, put it into your hand, then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new SecretsOfTheMausoleumEffect());
|
||||
this.getSpellAbility().addEffect(new MausoleumSecretsEffect());
|
||||
}
|
||||
|
||||
public MausoleumSecrets(final MausoleumSecrets card) {
|
||||
|
@ -41,9 +41,9 @@ public final class MausoleumSecrets extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class SecretsOfTheMausoleumEffect extends OneShotEffect {
|
||||
class MausoleumSecretsEffect extends OneShotEffect {
|
||||
|
||||
public SecretsOfTheMausoleumEffect() {
|
||||
public MausoleumSecretsEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "<i>Undergrowth</i> — Search your library "
|
||||
+ "for a black card with converted mana cost less than "
|
||||
|
@ -51,13 +51,13 @@ class SecretsOfTheMausoleumEffect extends OneShotEffect {
|
|||
+ "reveal it, put it into your hand, then shuffle your library.";
|
||||
}
|
||||
|
||||
public SecretsOfTheMausoleumEffect(final SecretsOfTheMausoleumEffect effect) {
|
||||
public MausoleumSecretsEffect(final MausoleumSecretsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SecretsOfTheMausoleumEffect copy() {
|
||||
return new SecretsOfTheMausoleumEffect(this);
|
||||
public MausoleumSecretsEffect copy() {
|
||||
return new MausoleumSecretsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,7 +33,7 @@ public final class WhisperingSnitch extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// When you surveil for the first time in a turn, Whispering Spy deals 1 damage to each opponent and you gain 1 life.
|
||||
this.addAbility(new WhisperingSpyTriggeredAbility());
|
||||
this.addAbility(new WhisperingSnitchTriggeredAbility());
|
||||
}
|
||||
|
||||
public WhisperingSnitch(final WhisperingSnitch card) {
|
||||
|
@ -46,15 +46,15 @@ public final class WhisperingSnitch extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class WhisperingSpyTriggeredAbility extends TriggeredAbilityImpl {
|
||||
class WhisperingSnitchTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public WhisperingSpyTriggeredAbility() {
|
||||
public WhisperingSnitchTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DamagePlayersEffect(1, TargetController.OPPONENT), false);
|
||||
this.addEffect(new GainLifeEffect(1));
|
||||
this.addWatcher(new WhisperingSpyWatcher());
|
||||
this.addWatcher(new WhisperingSnitchWatcher());
|
||||
}
|
||||
|
||||
public WhisperingSpyTriggeredAbility(final WhisperingSpyTriggeredAbility ability) {
|
||||
public WhisperingSnitchTriggeredAbility(final WhisperingSnitchTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
@ -65,13 +65,13 @@ class WhisperingSpyTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
WhisperingSpyWatcher watcher = (WhisperingSpyWatcher) game.getState().getWatchers().get(WhisperingSpyWatcher.class.getSimpleName());
|
||||
WhisperingSnitchWatcher watcher = (WhisperingSnitchWatcher) game.getState().getWatchers().get(WhisperingSnitchWatcher.class.getSimpleName());
|
||||
return watcher != null && watcher.getTimesSurveiled(getControllerId()) == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WhisperingSpyTriggeredAbility copy() {
|
||||
return new WhisperingSpyTriggeredAbility(this);
|
||||
public WhisperingSnitchTriggeredAbility copy() {
|
||||
return new WhisperingSnitchTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,21 +81,21 @@ class WhisperingSpyTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class WhisperingSpyWatcher extends Watcher {
|
||||
class WhisperingSnitchWatcher extends Watcher {
|
||||
|
||||
private final Map<UUID, Integer> timesSurveiled = new HashMap<>();
|
||||
|
||||
public WhisperingSpyWatcher() {
|
||||
super(WhisperingSpyWatcher.class.getSimpleName(), WatcherScope.GAME);
|
||||
public WhisperingSnitchWatcher() {
|
||||
super(WhisperingSnitchWatcher.class.getSimpleName(), WatcherScope.GAME);
|
||||
}
|
||||
|
||||
public WhisperingSpyWatcher(final WhisperingSpyWatcher watcher) {
|
||||
public WhisperingSnitchWatcher(final WhisperingSnitchWatcher watcher) {
|
||||
super(watcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WhisperingSpyWatcher copy() {
|
||||
return new WhisperingSpyWatcher(this);
|
||||
public WhisperingSnitchWatcher copy() {
|
||||
return new WhisperingSnitchWatcher(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue