net.sf.magicproject.action.handler
Interface ChoosenAction

All Superinterfaces:
Replayable
All Known Implementing Classes:
AbstractTarget, ChoosenTarget, ModifyTargetableRegister, PayMana, RealTarget, SilentTarget, SingletonTarget

public interface ChoosenAction
extends Replayable

Since:
0.86
Author:
Fabrice Daugan

Method Summary
 boolean choose(ActionContextWrapper actionContext, ContextEventListener context, Ability ability)
          No generated event.
 void disactivate(ActionContextWrapper actionContext, ContextEventListener context, Ability ability)
          No generated event.
 boolean replay(ActionContextWrapper actionContext, ContextEventListener context, Ability ability)
          Generate event associated to this action.
 java.lang.String toHtmlString(Ability ability, ContextEventListener context, ActionContextWrapper actionContext)
          Return the HTML code representing this action.
 

Method Detail

choose

boolean choose(ActionContextWrapper actionContext,
               ContextEventListener context,
               Ability ability)
No generated event. Let the active player playing this action.

Parameters:
actionContext - the context containing data saved by this action during the 'choose" proceess.
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
context - is the context attached to this action.
Returns:
true if the stack can be resolved just after this call.

disactivate

void disactivate(ActionContextWrapper actionContext,
                 ContextEventListener context,
                 Ability ability)
No generated event. Unset this action as current one.

Parameters:
actionContext - the context containing data saved by this action during the 'choose" proceess.
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
context - is the context attached to this action.

replay

boolean replay(ActionContextWrapper actionContext,
               ContextEventListener context,
               Ability ability)
Generate event associated to this action. Only one or several events are generated and may be collected by event listeners. Then play this action

Specified by:
replay in interface Replayable
Parameters:
actionContext - the context containing data saved by this action during the 'choose" proceess.
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
context - is the context attached to this action.
Returns:
true if the stack can be resolved just after this call.

toHtmlString

java.lang.String toHtmlString(Ability ability,
                              ContextEventListener context,
                              ActionContextWrapper actionContext)
Return the HTML code representing this action. If this action is named, it's name will be returned. If not, if existing, the picture associated to this action is returned. Otherwise, built-in action's text will be returned.

Parameters:
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
context - is the context attached to this action.
actionContext - the context of this action.
Returns:
the HTML code representing this action. If this action is named, it's name will be returned. If not, if existing, the picture associated to this action is returned. Otherwise, built-in action's text will be returned.
Since:
0.86


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