* Some minor updates.

This commit is contained in:
LevelX2 2015-03-20 18:31:44 +01:00
parent 5975074cc0
commit e09141b1fc
2 changed files with 14 additions and 10 deletions

View file

@ -79,17 +79,21 @@ class MaelstromNexusTriggeredAbility extends TriggeredAbilityImpl {
super(ability);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.SPELL_CAST;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.SPELL_CAST) {
Spell spell = game.getStack().getSpell(event.getTargetId());
FirstSpellCastThisTurnWatcher watcher = (FirstSpellCastThisTurnWatcher) game.getState().getWatchers().get("FirstSpellCastThisTurn", this.getSourceId());
if (spell != null
&& watcher != null
&& watcher.conditionMet()) {
this.getEffects().get(0).setTargetPointer(new FixedTarget(spell.getSourceId()));
return true;
}
Spell spell = game.getStack().getSpell(event.getTargetId());
FirstSpellCastThisTurnWatcher watcher = (FirstSpellCastThisTurnWatcher) game.getState().getWatchers().get("FirstSpellCastThisTurn", this.getSourceId());
if (spell != null
&& watcher != null
&& watcher.conditionMet()) {
this.getEffects().get(0).setTargetPointer(new FixedTarget(spell.getSourceId()));
return true;
}
return false;
}

View file

@ -60,7 +60,7 @@ public enum CardRepository {
// raise this if db structure was changed
private static final long CARD_DB_VERSION = 36;
// raise this if new cards were added to the server
private static final long CARD_CONTENT_VERSION = 8;
private static final long CARD_CONTENT_VERSION = 9;
private final Random random = new Random();
private Dao<CardInfo, Object> cardDao;