mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
- Fixed #8101. also little fix of Ranar the Ever Watchful for some side-cases.
This commit is contained in:
parent
3406ef6b4e
commit
c1772cbe9c
2 changed files with 7 additions and 3 deletions
|
@ -156,6 +156,9 @@ class CharmedPendantManaEffect extends ManaEffect {
|
||||||
for (Mana manaOption : manaOptions) {
|
for (Mana manaOption : manaOptions) {
|
||||||
manaChoice.getChoices().add(manaOption.toString());
|
manaChoice.getChoices().add(manaOption.toString());
|
||||||
}
|
}
|
||||||
|
if (manaChoice.getChoices().isEmpty()) { // no mana choices available
|
||||||
|
return mana;
|
||||||
|
}
|
||||||
if (controller.choose(outcome, manaChoice, game)) {
|
if (controller.choose(outcome, manaChoice, game)) {
|
||||||
for (Mana manaOption : manaOptions) {
|
for (Mana manaOption : manaOptions) {
|
||||||
if (manaChoice.getChoice().equals(manaOption.toString())) {
|
if (manaChoice.getChoice().equals(manaOption.toString())) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ public final class RanarTheEverWatchful extends CardImpl {
|
||||||
|
|
||||||
// The first card you foretell each turn costs 0 to foretell
|
// The first card you foretell each turn costs 0 to foretell
|
||||||
Ability ability = new SimpleStaticAbility(new RanarTheEverWatchfulCostReductionEffect());
|
Ability ability = new SimpleStaticAbility(new RanarTheEverWatchfulCostReductionEffect());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability, new ForetoldWatcher());
|
||||||
|
|
||||||
// Whenever you exile one or more cards from your hand and/or permanents from the battlefield, create a 1/1 white Spirit creature token with flying.
|
// Whenever you exile one or more cards from your hand and/or permanents from the battlefield, create a 1/1 white Spirit creature token with flying.
|
||||||
this.addAbility(new RanarTheEverWatchfulTriggeredAbility());
|
this.addAbility(new RanarTheEverWatchfulTriggeredAbility());
|
||||||
|
@ -87,7 +87,7 @@ class RanarTheEverWatchfulCostReductionEffect extends CostModificationEffectImpl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||||
ForetoldWatcher watcher = game.getState().getWatcher(ForetoldWatcher.class, source.getControllerId());
|
ForetoldWatcher watcher = game.getState().getWatcher(ForetoldWatcher.class);
|
||||||
return (watcher != null
|
return (watcher != null
|
||||||
&& watcher.countNumberForetellThisTurn() == 0
|
&& watcher.countNumberForetellThisTurn() == 0
|
||||||
&& abilityToModify.isControlledBy(source.getControllerId())
|
&& abilityToModify.isControlledBy(source.getControllerId())
|
||||||
|
@ -125,7 +125,8 @@ class RanarTheEverWatchfulTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
}
|
}
|
||||||
switch (zEvent.getFromZone()) {
|
switch (zEvent.getFromZone()) {
|
||||||
case BATTLEFIELD:
|
case BATTLEFIELD:
|
||||||
return controllerId.equals(zEvent.getSource().getControllerId())
|
return zEvent.getSource() != null // source ability/spell that exiled the permanent
|
||||||
|
&& controllerId.equals(zEvent.getSource().getControllerId())
|
||||||
&& numberExiled > 0; // must include both card permanents and tokens on the battlefield
|
&& numberExiled > 0; // must include both card permanents and tokens on the battlefield
|
||||||
case HAND:
|
case HAND:
|
||||||
return zEvent
|
return zEvent
|
||||||
|
|
Loading…
Reference in a new issue