mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Fix for crash in GameAction when QuestEvent is not a QuestChallenge
This commit is contained in:
@@ -1100,8 +1100,11 @@ public class GameAction {
|
|||||||
AllZone.getComputerPlayer().setLife(computerLife, null);
|
AllZone.getComputerPlayer().setLife(computerLife, null);
|
||||||
AllZone.getHumanPlayer().setLife(humanLife, null);
|
AllZone.getHumanPlayer().setLife(humanLife, null);
|
||||||
|
|
||||||
if (qe != null && ((QuestChallenge)qe).getEventType().equals("challenge")) {
|
if (qe != null && qe instanceof QuestChallenge){
|
||||||
computer.addAll(forge.quest.data.QuestUtil.getComputerStartingCards(AllZone.getQuestData(), AllZone.getQuestEvent()));
|
QuestChallenge challenge = (QuestChallenge)qe;
|
||||||
|
if (challenge.getEventType().equals("challenge")) {
|
||||||
|
computer.addAll(forge.quest.data.QuestUtil.getComputerStartingCards(AllZone.getQuestData(), AllZone.getQuestEvent()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Card c : human) {
|
for (Card c : human) {
|
||||||
|
|||||||
Reference in New Issue
Block a user