- Better fix for granted abilities (more in line with drdevs changes).

- Also Fixed Border color of detail panel.
This commit is contained in:
Sloth
2014-10-29 13:51:26 +00:00
parent 84500caf71
commit 04659d111b
3 changed files with 5 additions and 6 deletions

View File

@@ -766,9 +766,6 @@ public class GameAction {
TrackableObject.unfreeze(); TrackableObject.unfreeze();
if (runEvents && !affectedCards.isEmpty()) { if (runEvents && !affectedCards.isEmpty()) {
for (Card c : affectedCards) {
c.updateKeywords();
}
game.fireEvent(new GameEventCardStatsChanged(affectedCards)); game.fireEvent(new GameEventCardStatsChanged(affectedCards));
} }

View File

@@ -1034,6 +1034,7 @@ public class Card extends GameEntity implements Comparable<Card>, IIdentifiable
CardColor.increaseTimestamp(); CardColor.increaseTimestamp();
} }
currentState.getCardColor().add(new CardColor(s, addToColors)); currentState.getCardColor().add(new CardColor(s, addToColors));
currentState.getView().updateColors(this);
return CardColor.getTimestamp(); return CardColor.getTimestamp();
} }
@@ -1047,11 +1048,13 @@ public class Card extends GameEntity implements Comparable<Card>, IIdentifiable
if (removeCol != null) { if (removeCol != null) {
currentState.getCardColor().remove(removeCol); currentState.getCardColor().remove(removeCol);
currentState.getView().updateColors(this);
} }
} }
public final void setColor(final Iterable<CardColor> colors) { public final void setColor(final Iterable<CardColor> colors) {
currentState.setCardColor(colors); currentState.setCardColor(colors);
currentState.getView().updateColors(this);
} }
public final Iterable<CardColor> getColor() { public final Iterable<CardColor> getColor() {
@@ -1867,10 +1870,12 @@ public class Card extends GameEntity implements Comparable<Card>, IIdentifiable
public final void addSpellAbility(final SpellAbility a) { public final void addSpellAbility(final SpellAbility a) {
a.setHostCard(this); a.setHostCard(this);
currentState.addSpellAbility(a); currentState.addSpellAbility(a);
currentState.getView().updateAbilityText(this, currentState);
} }
public final void removeSpellAbility(final SpellAbility a) { public final void removeSpellAbility(final SpellAbility a) {
currentState.removeSpellAbility(a); currentState.removeSpellAbility(a);
currentState.getView().updateAbilityText(this, currentState);
} }
public final FCollectionView<SpellAbility> getSpellAbilities() { public final FCollectionView<SpellAbility> getSpellAbilities() {

View File

@@ -873,9 +873,6 @@ public class PhaseHandler implements java.io.Serializable {
} while (game.getStack().addAllTriggeredAbilitiesToStack()); //loop so long as something was added to stack } while (game.getStack().addAllTriggeredAbilitiesToStack()); //loop so long as something was added to stack
if (!allAffectedCards.isEmpty()) { if (!allAffectedCards.isEmpty()) {
for (Card c : allAffectedCards) {
c.updateKeywords();
}
game.fireEvent(new GameEventCardStatsChanged(allAffectedCards)); game.fireEvent(new GameEventCardStatsChanged(allAffectedCards));
allAffectedCards.clear(); allAffectedCards.clear();
} }