mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
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:
parent
e0bd0e3ffe
commit
1e5100e0d6
12 changed files with 402 additions and 206 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue