added getId
parent
a7b96f922a
commit
887e8d511e
|
@ -10,23 +10,24 @@ public class MagicSourceManaActivationResult implements MagicMappable {
|
||||||
public final MagicManaActivation activation;
|
public final MagicManaActivation activation;
|
||||||
|
|
||||||
public MagicSourceManaActivationResult(final MagicPermanent permanent,final MagicManaActivation activation) {
|
public MagicSourceManaActivationResult(final MagicPermanent permanent,final MagicManaActivation activation) {
|
||||||
|
|
||||||
this.permanent=permanent;
|
this.permanent=permanent;
|
||||||
this.activation=activation;
|
this.activation=activation;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object map(final MagicGame game) {
|
public Object map(final MagicGame game) {
|
||||||
|
|
||||||
return new MagicSourceManaActivationResult((MagicPermanent)permanent.map(game),activation);
|
return new MagicSourceManaActivationResult((MagicPermanent)permanent.map(game),activation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doActivation(final MagicGame game) {
|
public void doActivation(final MagicGame game) {
|
||||||
|
|
||||||
for (final MagicEvent costEvent : activation.getCostEvent(permanent)) {
|
for (final MagicEvent costEvent : activation.getCostEvent(permanent)) {
|
||||||
|
|
||||||
// Mana activation cost events do not have choices.
|
// Mana activation cost events do not have choices.
|
||||||
game.executeEvent(costEvent,MagicEvent.NO_CHOICE_RESULTS);
|
game.executeEvent(costEvent,MagicEvent.NO_CHOICE_RESULTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getId() {
|
||||||
|
return permanent.getId() * 31 + activation.hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue