forked from External/mage
[NEO] Implemented Bronze Cudgels
This commit is contained in:
parent
dece8da0ad
commit
b92128dd41
5 changed files with 96 additions and 15 deletions
|
|
@ -38,15 +38,13 @@ public class IfAbilityHasResolvedXTimesEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
AbilityResolvedWatcher watcher = game.getState().getWatcher(AbilityResolvedWatcher.class);
|
||||
if (watcher != null && watcher.getResolutionCount(game, source) == resolutionNumber) {
|
||||
if (effect instanceof OneShotEffect) {
|
||||
return effect.apply(game, source);
|
||||
} else {
|
||||
game.addEffect((ContinuousEffect) effect, source);
|
||||
return true;
|
||||
}
|
||||
if (AbilityResolvedWatcher.getResolutionCount(game, source) != resolutionNumber) {
|
||||
return true;
|
||||
}
|
||||
if (effect instanceof OneShotEffect) {
|
||||
return effect.apply(game, source);
|
||||
}
|
||||
game.addEffect((ContinuousEffect) effect, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue