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