mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
- Bloodthirst is now multiplayer compatible.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user