net.sf.magicproject.clickable.ability
Class ActivatedAbility

java.lang.Object
  extended by net.sf.magicproject.clickable.ability.Ability
      extended by net.sf.magicproject.clickable.ability.UserAbility
          extended by net.sf.magicproject.clickable.ability.ActivatedAbility
All Implemented Interfaces:
Unregisterable, ResolveStackHandler
Direct Known Subclasses:
ActivatedAbilityPlayer

public class ActivatedAbility
extends UserAbility

An ability that can be manually played.

Author:
Fabrice Daugan

Field Summary
 
Fields inherited from class net.sf.magicproject.clickable.ability.Ability
optimizer, priority
 
Constructor Summary
ActivatedAbility(java.io.InputStream inputFile, MCard card)
          Creates a new instance of ActivatedAbility
Structure of InputStream : Data[size]
 
Method Summary
 Ability clone(MCard container)
          return a copy of this ability
TODO remove param container since it is not used in this constructor As default, return null
 java.lang.String getAbilityTitle()
          Return ability html title.
 java.lang.String getLog(ContextEventListener context)
          Return a String identifying this ability with the name and/or card name.
 void resolveStack()
          called when the stack is resolving
 
Methods inherited from class net.sf.magicproject.clickable.ability.UserAbility
actionList, checkObjectActions, checkTargetActions, clickOn, effectList, eventComing, getCard, isMatching, manaNeeded, mouseClicked, recheckTargets, toHtmlString, toString, triggerIt
 
Methods inherited from class net.sf.magicproject.clickable.ability.Ability
addLinkedAbility, equals, getCardCopy, getController, getName, getPictureName, getTargetable, getTriggeredClone, getTriggeredCloneChoice, hashCode, hasHighPriority, isAutoResolve, isHidden, isPlayAsSpell, optimizeRegisterToManager, registerToManager, removeFromManager, setEvent
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActivatedAbility

public ActivatedAbility(java.io.InputStream inputFile,
                        MCard card)
                 throws java.io.IOException
Creates a new instance of ActivatedAbility

Parameters:
inputFile -
card -
Throws:
java.io.IOException - if error occurred during the reading process from the specified input stream
Method Detail

clone

public Ability clone(MCard container)
Description copied from class: Ability
return a copy of this ability
TODO remove param container since it is not used in this constructor As default, return null

Specified by:
clone in class UserAbility
Parameters:
container - is not used here
Returns:
copy of this ability

resolveStack

public void resolveStack()
Description copied from interface: ResolveStackHandler
called when the stack is resolving

Specified by:
resolveStack in interface ResolveStackHandler
Overrides:
resolveStack in class Ability
See Also:
StackManager.resolveStack()

getLog

public java.lang.String getLog(ContextEventListener context)
Description copied from class: Ability
Return a String identifying this ability with the name and/or card name.

Specified by:
getLog in class Ability
Parameters:
context - the current context of this ability.
Returns:
a String identifying this ability with the name and/or card name.

getAbilityTitle

public java.lang.String getAbilityTitle()
Description copied from class: Ability
Return ability html title. Type of ability and a few other information

Overrides:
getAbilityTitle in class Ability
Returns:
ability html title. Type of ability and a few other information


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