mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
* Scroll of the Masters - Fixed activated ability (did add counter instaed of doing a boost until end of turn).
This commit is contained in:
parent
23d431a65a
commit
4b985b322f
2 changed files with 11 additions and 15 deletions
|
|
@ -22,16 +22,9 @@ public class CountersCount implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Permanent p = game.getPermanent(sourceAbility.getSourceId());
|
||||
// if permanent already leaves the battlefield, try to find counters count via last known information
|
||||
if (p == null) {
|
||||
MageObject o = game.getLastKnownInformation(sourceAbility.getSourceId(), Zone.BATTLEFIELD);
|
||||
if (o instanceof Permanent) {
|
||||
p = (Permanent) o;
|
||||
}
|
||||
}
|
||||
if (p != null) {
|
||||
return p.getCounters().getCount(counter);
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(sourceAbility.getSourceId());
|
||||
if (permanent != null) {
|
||||
return permanent.getCounters().getCount(counter);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue