forked from External/mage
[BRO] Implemented Urza, Lord Protector / Urza, Planeswalker
This commit is contained in:
parent
5fa9a850b1
commit
9706274141
7 changed files with 241 additions and 3 deletions
|
|
@ -102,6 +102,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
protected List<MarkedDamageInfo> markedDamage;
|
||||
protected int markedLifelink;
|
||||
protected int timesLoyaltyUsed = 0;
|
||||
protected int loyaltyActivationsAvailable = 1;
|
||||
protected int transformCount = 0;
|
||||
protected Map<String, String> info;
|
||||
protected int createOrder;
|
||||
|
|
@ -169,6 +170,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
this.pairedPermanent = permanent.pairedPermanent;
|
||||
this.bandedCards.addAll(permanent.bandedCards);
|
||||
this.timesLoyaltyUsed = permanent.timesLoyaltyUsed;
|
||||
this.loyaltyActivationsAvailable = permanent.loyaltyActivationsAvailable;
|
||||
this.transformCount = permanent.transformCount;
|
||||
|
||||
this.morphed = permanent.morphed;
|
||||
|
|
@ -211,6 +213,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
this.maxBlockedBy = 0;
|
||||
this.copy = false;
|
||||
this.goadingPlayers.clear();
|
||||
this.loyaltyActivationsAvailable = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -462,6 +465,11 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incrementLoyaltyActivationsAvailable() {
|
||||
this.loyaltyActivationsAvailable++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLoyaltyUsed() {
|
||||
this.timesLoyaltyUsed++;
|
||||
|
|
@ -471,7 +479,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
public boolean canLoyaltyBeUsed(Game game) {
|
||||
Player controller = game.getPlayer(controllerId);
|
||||
if (controller != null) {
|
||||
return controller.getLoyaltyUsePerTurn() > timesLoyaltyUsed;
|
||||
return Math.max(controller.getLoyaltyUsePerTurn(), loyaltyActivationsAvailable) > timesLoyaltyUsed;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue