mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
Fixed issue #96 Nissa's choosen
This commit is contained in:
parent
ec5b5845ef
commit
8f19e94dc0
1 changed files with 7 additions and 7 deletions
|
@ -60,7 +60,7 @@ public class NissasChosen extends CardImpl<NissasChosen> {
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new NissasChosenEffect()));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NissasChosenEffect()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public NissasChosen(final NissasChosen card) {
|
public NissasChosen(final NissasChosen card) {
|
||||||
|
@ -97,7 +97,7 @@ class NissasChosenEffect extends ReplacementEffectImpl<NissasChosenEffect> {
|
||||||
@Override
|
@Override
|
||||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||||
Card card = game.getCard(event.getTargetId());
|
Card card = game.getCard(event.getTargetId());
|
||||||
if ( card != null && event.getTargetId().equals(source.getSourceId()) ) {
|
if ( card != null ) {
|
||||||
return card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
|
return card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -105,7 +105,7 @@ class NissasChosenEffect extends ReplacementEffectImpl<NissasChosenEffect> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
if ( event.getType() == EventType.ZONE_CHANGE )
|
if ( event.getType() == EventType.ZONE_CHANGE && event.getTargetId().equals(source.getSourceId()) )
|
||||||
{
|
{
|
||||||
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
|
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
|
||||||
if ( zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD ) {
|
if ( zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD ) {
|
||||||
|
|
Loading…
Reference in a new issue