net.sf.magicproject.stack
Interface StackContext

All Known Implementing Classes:
StackManager, TriggeredCard, TriggeredCardChoice

public interface StackContext

Since:
0.90
Author:
Fabrice Daugan

Method Summary
 void abortion(AbstractCard card, Ability source)
          Remove the specified card from the stack.
 ContextEventListener getAbilityContext()
          Return the current context.
 Ability getAbortingAbility()
          Return the ability causing the abortion of this ability.
 ActionManager getActionManager()
          Return the action manager of this context.
 MCard getSourceCard()
          Return the card source of the current capcity/spell in the stack
 TargetedList getTargetedList()
          Return the target option of the current spell. this target option is owned by the current spell.
 

Method Detail

getTargetedList

TargetedList getTargetedList()
Return the target option of the current spell. this target option is owned by the current spell. May be reseted, changed by the spell itself.

Returns:
the targeted list of this context.

getAbilityContext

ContextEventListener getAbilityContext()
Return the current context. Null if current ability is not a triggered one.

Returns:
the current context. Null if current ability is not a triggered one.

getActionManager

ActionManager getActionManager()
Return the action manager of this context.

Returns:
the action manager of this context.

getSourceCard

MCard getSourceCard()
Return the card source of the current capcity/spell in the stack

Returns:
the card source of the current capcity/spell in the stack

getAbortingAbility

Ability getAbortingAbility()
Return the ability causing the abortion of this ability.

Returns:
the ability causing the abortion of this ability.

abortion

void abortion(AbstractCard card,
              Ability source)
Remove the specified card from the stack. If it's a spell, it goes to the abortion place, otherwise it would be simply removed. After calling this method, caller should call the normal 'resolveStack' method.

Parameters:
card - the card to make abort.
source - the ability source.


Copyright © 2003-2007 Magic-Project. All Rights Reserved.