mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Bloodthirst is now multiplayer compatible.
This commit is contained in:
@@ -4674,10 +4674,10 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
if (card.getController().getOpponent().getAssignedDamage() > 0) {
|
if (card.getController().hasBloodthirst()) {
|
||||||
int toAdd = -1;
|
int toAdd = -1;
|
||||||
if (numCounters.equals("X")) {
|
if (numCounters.equals("X")) {
|
||||||
toAdd = card.getController().getOpponent().getAssignedDamage();
|
toAdd = card.getController().getBloodthirstAmount();
|
||||||
} else {
|
} else {
|
||||||
toAdd = Integer.parseInt(numCounters);
|
toAdd = Integer.parseInt(numCounters);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2287,6 +2287,37 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
|
|||||||
return Iterables.any(list, CardPredicates.Presets.LANDS);
|
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>
|
* <p>
|
||||||
* hasProwl.
|
* hasProwl.
|
||||||
|
|||||||
Reference in New Issue
Block a user