mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
a check of isHuman was masked beyound call to LobbyPlayer
+ missing part for pump
This commit is contained in:
@@ -737,6 +737,10 @@ public class AiController {
|
||||
case Shuffle: // ai could analyze parameter denoting the player to shuffle
|
||||
return true;
|
||||
|
||||
case Pump: //TODO Add logic here if necessary but I think the AI won't cast
|
||||
//the spell in the first place if it would curse its own creature
|
||||
//and the pump isn't mandatory
|
||||
return true;
|
||||
default:
|
||||
}
|
||||
String exMsg = String.format("AI confirmAction does not know what to decide about %s API with %s mode.", api, mode);
|
||||
|
||||
@@ -16,7 +16,6 @@ import forge.game.GameType;
|
||||
import forge.game.MatchController;
|
||||
import forge.game.PlayerStartConditions;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.player.PlayerType;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.gui.GuiChoose;
|
||||
import forge.gui.SOverlayUtils;
|
||||
@@ -146,7 +145,7 @@ public class ControlWinLose {
|
||||
if( !fromGame.hasWon()) continue; // not a loser
|
||||
|
||||
// offer to winner, if he is local human
|
||||
if (fromGame.getLobbyPlayer().getType() == PlayerType.HUMAN) {
|
||||
if (fromGame.isHuman()) {
|
||||
List<CardPrinted> chosen = GuiChoose.noneOrMany("Select cards to add to your deck", losses);
|
||||
if (null != chosen) {
|
||||
PlayerStartConditions psc = match.getPlayers().get(i).getValue();
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Map;
|
||||
|
||||
import forge.Card;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.control.FControl;
|
||||
import forge.game.event.BlockerAssignedEvent;
|
||||
import forge.game.event.CardDamagedEvent;
|
||||
import forge.game.event.CardDestroyedEvent;
|
||||
@@ -27,7 +28,6 @@ import forge.game.event.SetTappedEvent;
|
||||
import forge.game.event.ShuffleEvent;
|
||||
import forge.game.event.SpellResolvedEvent;
|
||||
import forge.game.event.TokenCreatedEvent;
|
||||
import forge.game.player.PlayerType;
|
||||
|
||||
/**
|
||||
* This class is in charge of converting any forge.game.event.Event to a SoundEffectType.
|
||||
@@ -81,7 +81,7 @@ public class EventVisualizer {
|
||||
return getSoundEffectForTapState(((SetTappedEvent) evt).Tapped);
|
||||
}
|
||||
if (evt instanceof DuelOutcomeEvent) {
|
||||
return getSoundEffectForDuelOutcome(((DuelOutcomeEvent) evt).result.getWinner().getType() == PlayerType.HUMAN);
|
||||
return getSoundEffectForDuelOutcome(((DuelOutcomeEvent) evt).result.getWinner() == FControl.SINGLETON_INSTANCE.getLobby().getGuiPlayer());
|
||||
}
|
||||
|
||||
return fromMap;
|
||||
|
||||
Reference in New Issue
Block a user