mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* Fixed that AI fired targeting event twice (fixes #7094).
This commit is contained in:
parent
dfa035d9dc
commit
2daa5aae50
3 changed files with 1 additions and 14 deletions
|
@ -1233,18 +1233,6 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
return true;
|
||||
} // end priorityPlay method
|
||||
|
||||
@Override
|
||||
public boolean activateAbility(ActivatedAbility ability, Game game) {
|
||||
if (!isTestMode()) { // Test player already sends target event as they select the target
|
||||
for (Target target : ability.getModes().getMode().getTargets()) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.TARGETED, targetId, ability, ability.getControllerId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.activateAbility(ability, game);
|
||||
}
|
||||
|
||||
protected void playLand(Game game) {
|
||||
log.debug("playLand");
|
||||
Set<Card> lands = new LinkedHashSet<>();
|
||||
|
|
|
@ -15,7 +15,6 @@ import mage.constants.SuperType;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
|
|
|
@ -1500,7 +1500,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
if ((ability.isUsesStack()
|
||||
|| ability.getRuleVisible())
|
||||
&& !game.isSimulation()) {
|
||||
game.informPlayers(getLogName() + ability.getGameLogMessage(game));
|
||||
game.informPlayers(getLogName() + " - " + ability.getGameLogMessage(game));
|
||||
}
|
||||
if (!ability.isUsesStack()) {
|
||||
ability.resolve(game);
|
||||
|
|
Loading…
Reference in a new issue