|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.magicproject.clickable.ability.Ability
net.sf.magicproject.clickable.ability.UserAbility
public abstract class UserAbility
A non-abstract ability.
| Field Summary |
|---|
| Fields inherited from class net.sf.magicproject.clickable.ability.Ability |
|---|
optimizer, priority |
| Constructor Summary | |
|---|---|
UserAbility(java.io.InputStream inputFile,
MCard card)
Create an instance of UserAbility Structure of InputStream : Data[size] event [Event] cost [Action[]] effect [Action[]] |
|
| Method Summary | |
|---|---|
MAction[] |
actionList()
Return list of actions to play to cast this ability |
boolean |
checkObjectActions()
Checks too the other actions requiring a particular state, such as the presence of an object. |
boolean |
checkTargetActions()
Verify in the 'cost' part there is no target action may cause abortion of this ability. |
static void |
clickOn(java.io.InputStream input)
This method is invoked when opponent has clicked on this object. this call should be done from the net.sf.magicproject.network listener |
abstract 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 |
MAction[] |
effectList()
Return list of actions effects of this ability |
MEventListener |
eventComing()
Return matched to activate this ability matched to activate this ability. |
MCard |
getCard()
Return card where is this ability. |
boolean |
isMatching()
compare the current event to the event activating this ability. |
int[] |
manaNeeded(ContextEventListener context)
return the amount of mana needed (constant part only) to play this ability |
void |
mouseClicked(int index)
is called when you click on me |
boolean |
recheckTargets()
Is this ability contains targeting action. |
java.lang.String |
toHtmlString(ContextEventListener context)
Return the HTML code representing this ability. |
java.lang.String |
toString()
|
boolean |
triggerIt(ContextEventListener context)
called when this ability is going to be triggered This method would add this ability to the triggered zone, or perform another play action |
| Methods inherited from class net.sf.magicproject.clickable.ability.Ability |
|---|
addLinkedAbility, equals, getAbilityTitle, getCardCopy, getController, getLog, getName, getPictureName, getTargetable, getTriggeredClone, getTriggeredCloneChoice, hashCode, hasHighPriority, isAutoResolve, isHidden, isPlayAsSpell, optimizeRegisterToManager, registerToManager, removeFromManager, resolveStack, setEvent |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UserAbility(java.io.InputStream inputFile,
MCard card)
throws java.io.IOException
inputFile - file containing this abilitycard - referenced card
java.io.IOException - if error occurred during the reading process from the specified
input stream| Method Detail |
|---|
public abstract Ability clone(MCard container)
Ability
clone in class Abilitycontainer - is not used here
public MCard getCard()
Ability
getCard in interface UnregisterablegetCard in class Abilitypublic final boolean checkTargetActions()
Ability
checkTargetActions in class Abilitypublic final boolean checkObjectActions()
Ability
checkObjectActions in class Abilitypublic final boolean recheckTargets()
Ability
recheckTargets in class Abilitypublic boolean isMatching()
Ability
isMatching in class Abilitypublic int[] manaNeeded(ContextEventListener context)
Ability
manaNeeded in class Abilitycontext - the current context of this ability.
public final java.lang.String toString()
toString in class Abilitypublic java.lang.String toHtmlString(ContextEventListener context)
Ability
toHtmlString in class Abilitycontext - the context needed by event activated
public final MEventListener eventComing()
Ability
eventComing in class Abilitypublic final MAction[] actionList()
Ability
actionList in class Abilitypublic final MAction[] effectList()
Ability
effectList in class Abilitypublic boolean triggerIt(ContextEventListener context)
Ability
triggerIt in class Abilitycontext - the context needed by event activated
public final void mouseClicked(int index)
index - is the index of this ability within the choice list of playable
abilities of the card owning this ability.
public static void clickOn(java.io.InputStream input)
throws java.io.IOException
input - input stream of our net.sf.magicproject.network connection
java.io.IOException - if error occurred when reading the message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||