mirror of
https://github.com/magefree/mage.git
synced 2025-12-29 23:12:10 -08:00
[SOK] Added 3 cards.
This commit is contained in:
parent
4d658909ee
commit
bd5ac3756d
6 changed files with 496 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue