mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
* Fixed bug in condition.
This commit is contained in:
parent
d284cc08b1
commit
1362637561
1 changed files with 4 additions and 6 deletions
|
@ -38,18 +38,16 @@ import mage.watchers.common.PlayerDamagedBySourceWatcher;
|
|||
*/
|
||||
public class DealtDamageToAnOpponent implements Condition {
|
||||
|
||||
public DealtDamageToAnOpponent() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (UUID opponentId: game.getOpponents(source.getControllerId())) {
|
||||
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
||||
PlayerDamagedBySourceWatcher watcher = (PlayerDamagedBySourceWatcher) game.getState().getWatchers().get(PlayerDamagedBySourceWatcher.class.getSimpleName(), opponentId);
|
||||
if (watcher != null) {
|
||||
return watcher.hasSourceDoneDamage(source.getSourceId(), game);
|
||||
if (watcher.hasSourceDoneDamage(source.getSourceId(), game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue