mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Fix so poison counters show up properly
This commit is contained in:
@@ -39,6 +39,7 @@ import com.google.common.collect.Maps;
|
||||
|
||||
import forge.game.GameEntityView;
|
||||
import forge.game.card.CardView;
|
||||
import forge.game.card.CounterType;
|
||||
import forge.game.player.PlayerView;
|
||||
import forge.gui.SOverlayUtils;
|
||||
import forge.toolbox.FButton;
|
||||
@@ -429,7 +430,7 @@ public class VAssignDamage {
|
||||
if (card == null) {
|
||||
if (defender instanceof PlayerView) {
|
||||
final PlayerView p = (PlayerView)defender;
|
||||
lethalDamage = attackerHasInfect ? matchUI.getGameView().getPoisonCountersToLose() - p.getPoisonCounters() : p.getLife();
|
||||
lethalDamage = attackerHasInfect ? matchUI.getGameView().getPoisonCountersToLose() - p.getCounters(CounterType.POISON) : p.getLife();
|
||||
}
|
||||
else if (defender instanceof CardView) { // planeswalker
|
||||
final CardView pw = (CardView)defender;
|
||||
|
||||
@@ -29,6 +29,7 @@ import javax.swing.border.LineBorder;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.assets.FSkinProp;
|
||||
import forge.game.card.CounterType;
|
||||
import forge.game.player.PlayerView;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.gui.framework.DragCell;
|
||||
@@ -238,7 +239,7 @@ public class VField implements IVDoc<CField> {
|
||||
}
|
||||
|
||||
// Update poison counters
|
||||
final int poison = player.getPoisonCounters();
|
||||
final int poison = player.getCounters(CounterType.POISON);
|
||||
if (poison > 0) {
|
||||
addLblPoison();
|
||||
lblPoison.setText(String.valueOf(poison));
|
||||
|
||||
Reference in New Issue
Block a user