mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
New implementation for LevelUpAbility. All tests ok.
This commit is contained in:
parent
c2ea8246d2
commit
f39d5dbca1
26 changed files with 433 additions and 322 deletions
|
|
@ -35,8 +35,6 @@ import mage.game.Game;
|
|||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
|
|
@ -45,7 +43,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public class PermanentCard extends PermanentImpl<PermanentCard> {
|
||||
|
||||
protected List<String> levelerRules;
|
||||
protected int maxLevelCounters;
|
||||
protected Card card;
|
||||
|
||||
|
|
@ -67,7 +64,6 @@ public class PermanentCard extends PermanentImpl<PermanentCard> {
|
|||
this.loyalty = new MageInt(card.getLoyalty().getValue());
|
||||
}*/
|
||||
if (card instanceof LevelerCard) {
|
||||
levelerRules = ((LevelerCard) card).getRules();
|
||||
maxLevelCounters = ((LevelerCard) card).getMaxLevelCounters();
|
||||
}
|
||||
}
|
||||
|
|
@ -239,14 +235,4 @@ public class PermanentCard extends PermanentImpl<PermanentCard> {
|
|||
return this.maxLevelCounters;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getRules() {
|
||||
if (levelerRules == null)
|
||||
return super.getRules();
|
||||
List<String> rules = new ArrayList<String>();
|
||||
rules.addAll(super.getRules());
|
||||
rules.addAll(levelerRules);
|
||||
return rules;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue