mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
Added framework method for copying a StackAbility without casting it.
Modified the effects doing so with the new method.
This commit is contained in:
parent
b9ab16d945
commit
8823839a42
34 changed files with 158 additions and 313 deletions
|
|
@ -48,6 +48,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.StackAbility;
|
||||
import mage.player.ai.ComputerPlayer;
|
||||
|
|
@ -173,6 +174,7 @@ public class RandomPlayer extends ComputerPlayer {
|
|||
if (ability.isUsesStack()) {
|
||||
game.getStack().push(new StackAbility(ability, playerId));
|
||||
if (ability.activate(game, false)) {
|
||||
game.fireEvent(new GameEvent(GameEvent.EventType.TRIGGERED_ABILITY, ability.getId(), ability.getSourceId(), ability.getControllerId()));
|
||||
actionCount++;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue