mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
update GameEventCardRegenerated
This commit is contained in:
@@ -25,7 +25,6 @@ import java.util.Map;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
import forge.card.CardStateName;
|
||||
import forge.game.GameEntity;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class RegenerationEffect extends SpellAbilityEffect {
|
||||
}
|
||||
|
||||
// Play the Regen sound
|
||||
game.fireEvent(new GameEventCardRegenerated());
|
||||
game.fireEvent(new GameEventCardRegenerated(c));
|
||||
|
||||
if (host.isImmutable()) {
|
||||
c.subtractShield(host);
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
package forge.game.event;
|
||||
|
||||
import forge.game.card.Card;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
||||
public class GameEventCardRegenerated extends GameEvent {
|
||||
|
||||
public final Collection<Card> cards;
|
||||
public GameEventCardRegenerated(Card affected) {
|
||||
cards = Arrays.asList(affected);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T visit(IGameEventVisitor<T> visitor) {
|
||||
return visitor.visit(this);
|
||||
|
||||
@@ -456,6 +456,13 @@ public class FControlGameEventHandler extends IGameEventVisitor.Base<Void> {
|
||||
return processCards(event.cards, cardsUpdate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visit(final GameEventCardRegenerated event) {
|
||||
refreshFieldUpdate = true;
|
||||
processCards(event.cards, cardsRefreshDetails);
|
||||
return processCards(event.cards, cardsUpdate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visit(final GameEventShuffle event) {
|
||||
if (GuiBase.getInterface().isLibgdxPort()) {
|
||||
|
||||
Reference in New Issue
Block a user