mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
Implement cards: Dralnu's Pet, Malicious Advice, and Mask of Intolerance
This commit is contained in:
parent
2934942a78
commit
1ba5dbda97
4 changed files with 316 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ public class DomainValue implements DynamicValue {
|
|||
|
||||
private Integer amount;
|
||||
private boolean countTargetPlayer;
|
||||
private UUID player;
|
||||
|
||||
public DomainValue() {
|
||||
this(1);
|
||||
|
|
@ -33,9 +34,15 @@ public class DomainValue implements DynamicValue {
|
|||
this.countTargetPlayer = countTargetPlayer;
|
||||
}
|
||||
|
||||
public DomainValue(Integer amount, UUID player) {
|
||||
this(amount, false);
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
public DomainValue(final DomainValue dynamicValue) {
|
||||
this.amount = dynamicValue.amount;
|
||||
this.countTargetPlayer = dynamicValue.countTargetPlayer;
|
||||
this.player = dynamicValue.player;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -46,7 +53,10 @@ public class DomainValue implements DynamicValue {
|
|||
int haveSwamps = 0;
|
||||
int haveForests = 0;
|
||||
UUID targetPlayer;
|
||||
if (countTargetPlayer) {
|
||||
if(player != null) {
|
||||
targetPlayer = player;
|
||||
}
|
||||
else if(countTargetPlayer) {
|
||||
targetPlayer = sourceAbility.getTargets().getFirstTarget();
|
||||
} else {
|
||||
targetPlayer = sourceAbility.getControllerId();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue