mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Game log - Added sacrifice message, added some information to the log of combat.
This commit is contained in:
parent
f07d003bc3
commit
b83634605c
2 changed files with 12 additions and 5 deletions
|
@ -43,6 +43,7 @@ import mage.abilities.keyword.CanAttackOnlyAloneAbility;
|
|||
import mage.abilities.keyword.CantAttackAloneAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreatureForCombatBlock;
|
||||
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||
|
@ -304,7 +305,14 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
for(UUID attackingCreatureId : group.getAttackers()) {
|
||||
Permanent attackingCreature = game.getPermanent(attackingCreatureId);
|
||||
if (attackingCreature != null) {
|
||||
sb.append(attackingCreature.getName()).append(" ");
|
||||
sb.append(attackingCreature.getName()).append(" (");
|
||||
sb.append(attackingCreature.getPower().getValue()).append("/").append(attackingCreature.getToughness().getValue()).append(") ");
|
||||
} else {
|
||||
// creature left battlefield
|
||||
attackingCreature = (Permanent) game.getLastKnownInformation(attackingCreatureId, Zone.BATTLEFIELD);
|
||||
if (attackingCreature != null) {
|
||||
sb.append(attackingCreature.getName()).append(" [left battlefield)] ");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (group.getBlockers().size() > 0) {
|
||||
|
@ -312,7 +320,8 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
for(UUID blockingCreatureId : group.getBlockers()) {
|
||||
Permanent blockingCreature = game.getPermanent(blockingCreatureId);
|
||||
if (blockingCreature != null) {
|
||||
sb.append(blockingCreature.getName()).append(" ");
|
||||
sb.append(blockingCreature.getName()).append(" (");
|
||||
sb.append(blockingCreature.getPower().getValue()).append("/").append(blockingCreature.getToughness().getValue()).append(") ");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -564,7 +564,6 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
while (hand.size() > 0) {
|
||||
discard(hand.get(hand.iterator().next(), game), source, game);
|
||||
}
|
||||
game.fireInformEvent(name + " discards " + Integer.toString(discardAmount) + " card" + (discardAmount > 1?"s":""));
|
||||
return;
|
||||
}
|
||||
int numDiscarded = 0;
|
||||
|
@ -579,7 +578,6 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
numDiscarded++;
|
||||
}
|
||||
}
|
||||
game.fireInformEvent(name + " discards " + Integer.toString(numDiscarded) + " card" + (numDiscarded > 1?"s":""));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -588,7 +586,7 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
if (card != null) {
|
||||
removeFromHand(card, game);
|
||||
card.moveToZone(Zone.GRAVEYARD, source==null?null:source.getId(), game, false);
|
||||
|
||||
game.informPlayers(new StringBuilder(name).append(" discards ").append(card.getName()).toString());
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DISCARDED_CARD, card.getId(), source==null?null:source.getId(), playerId));
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue