[SOK] Added 3 cards.

This commit is contained in:
LevelX2 2014-12-17 17:03:00 +01:00
parent 4d658909ee
commit bd5ac3756d
6 changed files with 496 additions and 9 deletions

View file

@ -923,15 +923,15 @@ public class Combat implements Serializable, Copyable<Combat> {
return null;
}
public int totalUnblockedDamage(Game game) {
int total = 0;
for (CombatGroup group : groups) {
if (group.getBlockers().isEmpty()) {
total += group.totalAttackerDamage(game);
}
}
return total;
}
// public int totalUnblockedDamage(Game game) {
// int total = 0;
// for (CombatGroup group : groups) {
// if (group.getBlockers().isEmpty()) {
// total += group.totalAttackerDamage(game);
// }
// }
// return total;
// }
public boolean attacksAlone() {
return (groups.size() == 1 && groups.get(0).getAttackers().size() == 1);

View file

@ -605,6 +605,15 @@ public class CombatGroup implements Serializable, Copyable<CombatGroup> {
}
}
/**
* There are effects, that set an attacker to be blcoked.
* Therefore this setter can be used.
* @param blocked
*/
public void setBlocked(boolean blocked) {
this.blocked = blocked;
}
@Override
public CombatGroup copy() {
return new CombatGroup(this);

View file

@ -96,6 +96,14 @@ public class CastSpellLastTurnWatcher extends Watcher {
public Map<UUID, Integer> getAmountOfSpellsCastOnCurrentTurn() {
return amountOfSpellsCastOnCurrentTurn;
}
public int getAmountOfSpellsAllPlayersCastOnCurrentTurn() {
int totalAmount = 0;
for(Integer amount: amountOfSpellsCastOnCurrentTurn.values()) {
totalAmount += amount;
}
return totalAmount;
}
public int getAmountOfSpellsPlayerCastOnCurrentTurn(UUID playerId) {
Integer value = amountOfSpellsCastOnCurrentTurn.get(playerId);