Added the logic, that one continious effect in game state can be connected to multiple abilities. This fixes issue #198 and #196.

This commit is contained in:
LevelX2 2013-04-17 23:44:50 +02:00
parent e0bd0e3ffe
commit 1e5100e0d6
12 changed files with 402 additions and 206 deletions

View file

@ -79,6 +79,8 @@ public class PermanentCard extends PermanentImpl<PermanentCard> {
public void reset(Game game) {
// when the permanent is reset copy all original values from the card
// must copy card each reset so that the original values don't get modified
// game.getState().getContinuousEffects().removeGainedEffectsForSource(objectId);
// game.getState().resetTriggersForSourceId(this.getId());
copyFromCard(card, game);
super.reset(game);
}
@ -126,6 +128,7 @@ public class PermanentCard extends PermanentImpl<PermanentCard> {
protected void copyFromCard(Card card, Game game) {
this.name = card.getName();
// this.removeAllAbilities(objectId, game);
this.abilities.clear();
this.abilities.addAll(card.getAbilities());
this.abilities.setControllerId(this.controllerId);