mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
Implemented Carnival // Carnage
This commit is contained in:
parent
958503cff2
commit
1f24af8716
6 changed files with 105 additions and 6 deletions
|
|
@ -1,9 +1,6 @@
|
|||
|
||||
package mage.game.permanent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -14,6 +11,10 @@ import mage.game.Controllable;
|
|||
import mage.game.Game;
|
||||
import mage.game.GameState;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface Permanent extends Card, Controllable {
|
||||
|
||||
void setControllerId(UUID controllerId);
|
||||
|
|
@ -106,6 +107,8 @@ public interface Permanent extends Card, Controllable {
|
|||
|
||||
int getDamage();
|
||||
|
||||
int damage(int damage, UUID sourceId, Game game);
|
||||
|
||||
int damage(int damage, UUID sourceId, Game game, boolean combat, boolean preventable);
|
||||
|
||||
int damage(int damage, UUID sourceId, Game game, boolean combat, boolean preventable, List<UUID> appliedEffects);
|
||||
|
|
|
|||
|
|
@ -711,6 +711,11 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
return this.damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damage(int damage, UUID sourceId, Game game) {
|
||||
return damage(damage, sourceId, game, true, false, false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damage(int damage, UUID sourceId, Game game, boolean combat, boolean preventable) {
|
||||
return damage(damage, sourceId, game, preventable, combat, false, null);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package mage.players;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import mage.MageItem;
|
||||
import mage.MageObject;
|
||||
import mage.MageObjectReference;
|
||||
|
|
@ -39,6 +37,9 @@ import mage.target.TargetCard;
|
|||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.util.Copyable;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
|
@ -84,6 +85,8 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
|
||||
int gainLife(int amount, Game game, UUID sourceId);
|
||||
|
||||
int damage(int damage, UUID sourceId, Game game);
|
||||
|
||||
int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable);
|
||||
|
||||
int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable, List<UUID> appliedEffects);
|
||||
|
|
|
|||
|
|
@ -1919,6 +1919,11 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damage(int damage, UUID sourceId, Game game) {
|
||||
return doDamage(damage, sourceId, game, true, false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable) {
|
||||
return doDamage(damage, sourceId, game, combatDamage, preventable, null);
|
||||
|
|
@ -2491,7 +2496,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public void lookAtAllLibraries(Ability source, Game game) {
|
||||
for(UUID playerId : game.getState().getPlayersInRange(this.getId(), game)){
|
||||
for (UUID playerId : game.getState().getPlayersInRange(this.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
String playerName = this.getName().equals(player.getName()) ? "Your " : player.getName() + "'s ";
|
||||
playerName += "library";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue