mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 04:12:14 -08:00
Added some test and some minor fixes to effect ability handling.
This commit is contained in:
parent
961e292bc9
commit
53396a44f2
11 changed files with 256 additions and 76 deletions
|
|
@ -972,9 +972,11 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
|
||||
@Override
|
||||
public boolean activateAbility(ActivatedAbility ability, Game game) {
|
||||
for (Target target: ability.getModes().getMode().getTargets()) {
|
||||
for (UUID targetId: target.getTargets()) {
|
||||
game.fireEvent(GameEvent.getEvent(EventType.TARGETED, targetId, ability.getId(), ability.getControllerId()));
|
||||
if (!isTestMode()) { // Test player already sends target event as he selects the target
|
||||
for (Target target: ability.getModes().getMode().getTargets()) {
|
||||
for (UUID targetId: target.getTargets()) {
|
||||
game.fireEvent(GameEvent.getEvent(EventType.TARGETED, targetId, ability.getId(), ability.getControllerId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.activateAbility(ability, game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue