made Intro state work with more PowerCards on the hand

This commit is contained in:
Fleischer Hanno
2024-12-09 18:11:21 +01:00
parent 68702f11a4
commit 0be25ecb29

View File

@@ -4,6 +4,7 @@
import pp.mdga.client.ClientState; import pp.mdga.client.ClientState;
import pp.mdga.client.gamestate.DetermineStartPlayerState; import pp.mdga.client.gamestate.DetermineStartPlayerState;
import pp.mdga.game.Player; import pp.mdga.game.Player;
import pp.mdga.game.card.PowerCard;
import pp.mdga.message.client.AnimationEndMessage; import pp.mdga.message.client.AnimationEndMessage;
import pp.mdga.notification.AcquireCardNotification; import pp.mdga.notification.AcquireCardNotification;
import pp.mdga.notification.ActivePlayerNotification; import pp.mdga.notification.ActivePlayerNotification;
@@ -48,10 +49,12 @@ public void enter() {
logic.getGame().getBoard().getInfield()[entry.getValue().getStartNodeIndex()].setOccupant(entry.getValue().getPieces()[0]); logic.getGame().getBoard().getInfield()[entry.getValue().getStartNodeIndex()].setOccupant(entry.getValue().getPieces()[0]);
entry.getValue().getWaitingArea()[0] = null; entry.getValue().getWaitingArea()[0] = null;
animationCounter++; animationCounter++;
if(entry.getKey() == logic.getOwnPlayerId()){ for (PowerCard card : entry.getValue().getHandCards()){
logic.addNotification(new AcquireCardNotification(entry.getValue().getHandCards().get(0).getCard())); if(entry.getKey() == logic.getOwnPlayerId()){
} else { logic.addNotification(new AcquireCardNotification(card.getCard()));
logic.addNotification(new DrawCardNotification(entry.getValue().getColor(), entry.getValue().getHandCards().get(0).getCard())); } else {
logic.addNotification(new DrawCardNotification(entry.getValue().getColor(), card.getCard()));
}
} }
} }
} }