mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Fixed Beastmaster Ascension not working. Try not to use names for counters, use CounterType instead.
This commit is contained in:
parent
60a865ed19
commit
86d306429c
3 changed files with 5 additions and 3 deletions
|
|
@ -39,6 +39,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
import mage.counters.CounterType;
|
||||||
import mage.counters.common.QuestCounter;
|
import mage.counters.common.QuestCounter;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
|
@ -118,7 +119,7 @@ class BeastmasterAscensionEffect extends BoostControlledEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||||
if (permanent != null && permanent.getCounters().getCount("quest") > 6) {
|
if (permanent != null && permanent.getCounters().getCount(CounterType.QUEST) > 6) {
|
||||||
super.apply(game, source);
|
super.apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class CountersCount implements DynamicValue {
|
||||||
p = (Permanent) game.getLastKnownInformation(sourceAbility.getSourceId(), Constants.Zone.BATTLEFIELD);
|
p = (Permanent) game.getLastKnownInformation(sourceAbility.getSourceId(), Constants.Zone.BATTLEFIELD);
|
||||||
}
|
}
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
return p.getCounters().getCount(counter.getName());
|
return p.getCounters().getCount(counter);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ import mage.abilities.common.ZoneChangeTriggeredAbility;
|
||||||
import mage.abilities.keyword.LevelAbility;
|
import mage.abilities.keyword.LevelAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.LevelerCard;
|
import mage.cards.LevelerCard;
|
||||||
|
import mage.counters.CounterType;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
|
|
@ -100,7 +101,7 @@ public class PermanentCard extends PermanentImpl<PermanentCard> {
|
||||||
this.power = card.getPower();
|
this.power = card.getPower();
|
||||||
this.toughness = card.getToughness();
|
this.toughness = card.getToughness();
|
||||||
if (card instanceof LevelerCard) {
|
if (card instanceof LevelerCard) {
|
||||||
LevelAbility level = ((LevelerCard)card).getLevel(this.getCounters().getCount("Level"));
|
LevelAbility level = ((LevelerCard)card).getLevel(this.getCounters().getCount(CounterType.LEVEL));
|
||||||
if (level != null) {
|
if (level != null) {
|
||||||
this.power.setValue(level.getPower());
|
this.power.setValue(level.getPower());
|
||||||
this.toughness.setValue(level.getToughness());
|
this.toughness.setValue(level.getToughness());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue