net.sf.magicproject.clickable.ability
Class TriggeredStaticModifierAbility

java.lang.Object
  extended by net.sf.magicproject.clickable.ability.Ability
      extended by net.sf.magicproject.clickable.ability.AbstractAbility
          extended by net.sf.magicproject.clickable.ability.TriggeredStaticModifierAbility
All Implemented Interfaces:
Unregisterable, ResolveStackHandler

public class TriggeredStaticModifierAbility
extends AbstractAbility

Author:
Fabrice Daugan

Field Summary
 
Fields inherited from class net.sf.magicproject.clickable.ability.Ability
optimizer, priority
 
Constructor Summary
TriggeredStaticModifierAbility(TriggeredEvent event, AddModifierFromStaticModifier refreshAction, MCard trigger, ModifierModel... modifiers)
          Creates a new instance of TriggeredStaticModifierAbility
 
Method Summary
 java.lang.String getAbilityTitle()
          Return ability html title.
 MCard getCard()
          Return card where is this ability.
 java.lang.String getLog(ContextEventListener context)
          Return a String identifying this ability with the name and/or card name.
 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.AbstractAbility
actionList, effectList, isMatching, recheckTargets
 
Methods inherited from class net.sf.magicproject.clickable.ability.Ability
addLinkedAbility, checkObjectActions, checkTargetActions, clone, equals, eventComing, getCardCopy, getController, getName, getPictureName, getTargetable, getTriggeredClone, getTriggeredCloneChoice, hashCode, hasHighPriority, isAutoResolve, isHidden, isPlayAsSpell, manaNeeded, optimizeRegisterToManager, registerToManager, removeFromManager, resolveStack, setEvent, toHtmlString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TriggeredStaticModifierAbility

public TriggeredStaticModifierAbility(TriggeredEvent event,
                                      AddModifierFromStaticModifier refreshAction,
                                      MCard trigger,
                                      ModifierModel... modifiers)
Creates a new instance of TriggeredStaticModifierAbility

Parameters:
event - the event attached to this ability.
refreshAction -
trigger -
modifiers -
Method Detail

triggerIt

public boolean triggerIt(ContextEventListener context)
Description copied from class: Ability
called when this ability is going to be triggered This method would add this ability to the triggered zone, or perform another play action

Overrides:
triggerIt in class Ability
Parameters:
context - the context needed by event activated
Returns:
true if this ability has been added to the triggered buffer zone, return false otherwise

getCard

public MCard getCard()
Description copied from class: Ability
Return card where is this ability. As default, it return null.

Specified by:
getCard in interface Unregisterable
Overrides:
getCard in class AbstractAbility
Returns:
true card where is this ability

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.