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