1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-03 01:08:59 -09:00

Fixed MasterOfTheWildHunt, now target controller gets custom message while selecting targets to response.

This commit is contained in:
magenoxx 2011-06-26 15:32:02 +04:00
parent d52ff8e221
commit 370d042858
8 changed files with 5 additions and 4 deletions
Mage.Server.Plugins
Mage.Player.AI/src/main/java/mage/player/ai
Mage.Player.Human/src/mage/player/human
Mage.Server/plugins
Mage.Sets/src/mage/sets/magic2010
Mage/src/mage/players

View file

@ -867,7 +867,7 @@ public class ComputerPlayer<T extends ComputerPlayer<T>> extends PlayerImpl<T> i
}
@Override
public void assignDamage(int damage, List<UUID> targets, UUID sourceId, Game game) {
public void assignDamage(int damage, List<UUID> targets, String singleTargetName, UUID sourceId, Game game) {
logger.debug("assignDamage");
//TODO: improve this
game.getPermanent(targets.get(0)).damage(damage, sourceId, game, true, false);

View file

@ -485,10 +485,11 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
}
@Override
public void assignDamage(int damage, List<UUID> targets, UUID sourceId, Game game) {
public void assignDamage(int damage, List<UUID> targets, String singleTargetName, UUID sourceId, Game game) {
int remainingDamage = damage;
while (remainingDamage > 0) {
Target target = new TargetCreatureOrPlayer();
if (singleTargetName != null) target.setTargetName(singleTargetName);
choose(Outcome.Damage, target, game);
if (targets.size() == 0 || targets.contains(target.getFirstTarget())) {
int damageAmount = getAmount(0, remainingDamage, "Select amount", game);

View file

@ -118,7 +118,7 @@ class MasterOfTheWildHuntEffect extends OneShotEffect<MasterOfTheWildHuntEffect>
wolves.add(permanent.getId());
}
Player player = game.getPlayer(target.getControllerId());
player.assignDamage(target.getPower().getValue(), wolves, target.getId(), game);
player.assignDamage(target.getPower().getValue(), wolves, "Wolf", target.getId(), game);
return true;
}
return false;

View file

@ -159,7 +159,7 @@ public interface Player extends MageItem, Copyable<Player> {
public abstract void selectAttackers(Game game);
public abstract void selectBlockers(Game game);
public abstract UUID chooseBlockerOrder(List<Permanent> blockers, Game game);
public abstract void assignDamage(int damage, List<UUID> targets, UUID sourceId, Game game);
public abstract void assignDamage(int damage, List<UUID> targets, String singleTargetName, UUID sourceId, Game game);
public abstract int getAmount(int min, int max, String message, Game game);
public abstract void sideboard(Match match, Deck deck);
public abstract void construct(Tournament tournament, Deck deck);