- Bloodthirst is now multiplayer compatible.

This commit is contained in:
Sloth
2012-11-12 21:22:19 +00:00
parent dab6d2dce3
commit 6ded6de74f
2 changed files with 33 additions and 2 deletions

View File

@@ -4674,10 +4674,10 @@ public class CardFactoryUtil {
@Override
public void execute() {
if (card.getController().getOpponent().getAssignedDamage() > 0) {
if (card.getController().hasBloodthirst()) {
int toAdd = -1;
if (numCounters.equals("X")) {
toAdd = card.getController().getOpponent().getAssignedDamage();
toAdd = card.getController().getBloodthirstAmount();
} else {
toAdd = Integer.parseInt(numCounters);
}

View File

@@ -2286,6 +2286,37 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
final List<Card> list = this.getZone(ZoneType.Battlefield).getCardsAddedThisTurn(null);
return Iterables.any(list, CardPredicates.Presets.LANDS);
}
/**
* <p>
* hasBloodthirst.
* </p>
*
* @return a boolean.
*/
public final boolean hasBloodthirst() {
for (Player opp : this.getOpponents()) {
if (opp.getAssignedDamage() > 0) {
return true;
}
}
return false;
}
/**
* <p>
* getBloodthirstAmount.
* </p>
*
* @return a int.
*/
public final int getBloodthirstAmount() {
int blood = 0;
for (Player opp : this.getOpponents()) {
blood += opp.getAssignedDamage();
}
return blood;
}
/**
* <p>