|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent net.sf.magicproject.clickable.Clickable net.sf.magicproject.clickable.targetable.Targetable net.sf.magicproject.clickable.targetable.card.AbstractCard net.sf.magicproject.clickable.targetable.card.MCard
public class MCard
This class corresponds to the graphical element of a specified card, and
correponds to an actor. When loading a new card, first we take care that a
card with same name has not been already loaded in order to save memory, so
all cards having the same name share the same Image object.
IdCardColors
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
AbilityModifier |
abilityModifier
The ability modifiers on this object. |
int |
cachedIdCard
The modified idcard. |
int |
cachedIdColor
The modified color. |
java.util.Set<java.lang.Integer> |
cachedProperties
List of properties of this card. |
int[] |
cachedRegisters
The modified registers. |
ColorModifier |
colorModifier
The colors modifiers on this object. |
IdCardModifier |
idCardModifier
The idcard modifiers on this object. |
Player |
originalController
The original player. |
PlayableZoneModifier |
playableZoneModifier
The playable zone modifiers on this object. |
PropertyModifier |
propertyModifier
The properties modifiers on this object. |
boolean |
tapped
Indicates if this card should be tapped or not. |
Fields inherited from class net.sf.magicproject.clickable.targetable.card.AbstractCard |
---|
controller, reversed, visibility |
Fields inherited from class net.sf.magicproject.clickable.targetable.Targetable |
---|
cachedAbilities, controllerModifier, indirections, registerModifiers, registers |
Fields inherited from class net.sf.magicproject.clickable.Clickable |
---|
highLightColor, isHighLighted |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
MCard(MCard cardRef,
DatabaseCard database)
Create a new instance of Card exactly like cardRef instance. |
|
MCard(java.lang.String cardName,
java.io.InputStream inputFile,
Player controller,
Player owner,
java.util.Map<java.lang.String,java.lang.String> constraints)
Create a new instance of Card reading from a file. |
|
MCard(java.lang.String pictureName,
MCard cardRef)
Create a new instance of tokenized Card. |
Method Summary | |
---|---|
void |
addModifier(AbilityModifier modifier)
Add a modifier to this object |
void |
addModifier(ColorModifier modifier)
Add a modifier to this object |
void |
addModifier(ControllerModifier modifier)
Add a modifier to this object |
void |
addModifier(IdCardModifier modifier)
Add a modifier to this object |
void |
addModifier(PlayableZoneModifier modifier)
Add a modifier to this object |
void |
addModifier(PropertyModifier modifier)
Add a modifier to this object |
void |
addTimestampReference()
Add a reference to this targetable. |
void |
checkAllCardsOf(Test test,
java.util.List<Targetable> list,
Ability ability)
Checks all cards corresponding to this constraints |
void |
clearDamages()
remove all damages on this card |
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 |
int |
countAllCardsOf(Test test,
Ability ability,
boolean canBePreempted)
Checks all cards corresponding to the specified constraints |
void |
decrementTimestampReference(int timestamp)
Decrement the reference counter for the current timestamp of this card. |
boolean |
equals(java.lang.Object obj)
|
java.util.Collection<MCard> |
getAttachedCards()
Return the attached cards. |
int[] |
getBytes()
Return the int array representing this card. |
static MCard |
getCard(java.io.InputStream input)
Return the component from information read throw net.sf.magicproject.network |
CardModel |
getCardModel()
Returns the cardModel reference of this card. |
MZone |
getContainer()
Return the container of this card. |
Ability |
getDummyAbility()
Return a default ability associated to this card. |
int |
getIdCard()
returns all IdCards of this card |
int |
getIdColor()
returns all IdColors of this card |
int |
getIdZone()
Return the zone identifant of this card. |
static int |
getIdZone(int idZone,
boolean tapped)
Return a zone code representing the zone and the state of this card. |
static int |
getIdZone(int idZone,
ContextEventListener context)
Return the place where is this card. |
Targetable |
getLastKnownTargetable(int timeStamp)
Return this targetable as it was at the given timestamp. |
ModifierModel |
getModifierModels()
|
int |
getNbObjects(java.lang.String objectName,
Test objectTest)
Return occurences number of the given object with the given name attached to this card. |
DatabaseCard |
getOriginalDatabase()
Return the original database as imprinted. |
Player |
getOwner()
Return card's owner. |
java.util.Set<java.lang.Integer> |
getProperties()
Return all properties of this card |
int |
getTimestamp()
Return the timstamp value of this targetable. |
java.lang.String |
getTooltipString()
Return HTML tooltip string of this card. |
int |
getValue(int index)
Return the value corresponding to the true register index. |
int |
getValueIndirection(int index)
Return the value corresponding to the true register index. |
boolean |
hasDirtyDataBase()
Return true if this card has a database configuration
different from the original one. |
int |
hashCode()
|
boolean |
hasIdCard(int idCard)
Indicates if the specified sort of card idCard contains the card's sort. |
static boolean |
hasIdCard(int idCardBIG,
int idCardMatched)
Indicates if idCardBIG contains completely idCardMatched. |
boolean |
hasIdColor(int idColor)
Indicates if the specified color idColor contains the card's colors. |
static boolean |
hasIdColor(int idColorBIG,
int idColorMatched)
Indicates if the specified color idColorBIG contains the other specified color idColorMatched. |
boolean |
hasIdType(int idType)
indicates if this card has this idType |
boolean |
hasPropertyNotFromCreator(int idType,
MCard creator)
indicates if this card has this idType. |
void |
highLight(boolean... highlightedZones)
The border will be highligthed to yellow |
static boolean |
intersectionIdCard(int idCardBIG,
int idCardMatched)
Indicates if idCardBIG contains partially idCardMatched. |
boolean |
isAbility()
Is this targetable is an abilty or a spell |
boolean |
isACopy()
Indicates if the current card in the stack is a copy or not |
boolean |
isAttached()
Indicated if this card is attached or not. |
boolean |
isSameIdZone(int idZone)
Compare a zone with the current card'szone |
static boolean |
isSameIdZone(int idZone,
int other)
|
boolean |
isSamePosition(int position)
Indicates wether this card suits to the specified position code. |
boolean |
isSameState(int zoneConstaint)
Indicates if this card match with the specified place and constraint. |
boolean |
isSpell()
Is this targetable is an abilty or a spell |
static boolean |
isTapped(int idZone)
Indicates wether the card with the specified zone identifiant is tapped or not. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
|
void |
moveCard(int destinationZone,
Player newController,
boolean newIsTapped,
int idPosition)
Move this card to a new place tapped or not under the control of a player |
boolean |
needReverse()
Is this card need to be reversed to suit to the player view. |
boolean |
playableZone(int supposedZone,
int idZone)
Indicates this card can be played from a specified zone. |
void |
refreshAbilities()
Refresh the granted abilities of this card. |
void |
refreshController()
Refresh the controller of this card, and raise an event if the value has been changed. |
void |
refreshIdCard()
Refresh the idcard of this card, and raise an event if the value has been changed. |
void |
refreshIdColor()
Refresh the colors of this card, and raise an event if the value has been changed. |
void |
refreshProperties(int property)
Refresh the properties of this card, and raise an event if the value has been changed. |
void |
refreshRegisters(int index)
Refresh the registers of this card, and raise an event if the value has been changed. |
void |
registerAbilities(int zone)
Register abilities of this card, supposing card is in the specified zone. |
void |
registerReplacementAbilities(int zone)
Register abilities of this card, supposing card is in the specified zone. |
void |
removeModifier(AbilityModifier modifier)
Remove the specified ability-modifier |
void |
removeModifier(ColorModifier modifier)
Remove the specified color-modifier. |
void |
removeModifier(ControllerModifier modifier)
Remove the specified controller-modifier |
void |
removeModifier(IdCardModifier modifier)
Remove the specified idcard-modifier |
void |
removeModifier(PlayableZoneModifier modifier)
Remove the specified playable zone-modifier |
void |
removeModifier(PropertyModifier modifier)
Remove the specified property-modifier |
void |
removeModifier(RegisterIndirection indirection,
int index)
Remove a register-indirection modifier from this component. |
void |
removeModifier(RegisterModifier modifier,
int index)
Remove a register modifier from this component. |
void |
returnCard(Visibility visibility)
Show/hide the back face of the card. |
void |
reverse(boolean reversed)
Reverse this card if the specified parameter is true |
void |
sendClickToOpponent()
send to opponent the message indicating that we've clicked on this component |
void |
setDataBase(DatabaseCard database)
Update the card model. |
void |
setIdZone(int idZone)
Set a new zone for this card. |
void |
setOwner(Player owner)
Set the new owner of this card. |
void |
setValue(int index,
Operation operation,
int rightValue)
Set to the register of this card a value to a specified index. |
void |
tap(boolean tapped)
Tap/untap this component |
void |
targetize(boolean... highlightedZones)
The border will be highligthed to a color identifying it easily as a targetable component. |
void |
unregisterAbilities()
Unregister useless abilities from the eventManager. |
void |
updateAbilities()
[un]Register ActivatedAbilities depending on the current zone of this card |
Methods inherited from class net.sf.magicproject.clickable.targetable.card.AbstractCard |
---|
getCardName, getController, getDatabase, getMUI, getPreviewImage, image, isCard, mouseEntered, mouseExited, notifyChange, reverseAsNeeded, scaledImage, toString |
Methods inherited from class net.sf.magicproject.clickable.targetable.Targetable |
---|
actionPerformed, addModifier, addModifier, addPrivateNamedObject, clearPrivateNamedObject, getCreator, getId, getOriginalTargetable, getPrivateNamedObject, getPrivateNamedObjects, isPlayer, removePrivateNamedObject, setCreator, targetize, tokenize |
Methods inherited from class net.sf.magicproject.clickable.Clickable |
---|
disHighLight, disHighlight, mousePressed, mouseReleased |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int cachedIdCard
public int cachedIdColor
public int[] cachedRegisters
public final Player originalController
public boolean tapped
public ColorModifier colorModifier
public IdCardModifier idCardModifier
public AbilityModifier abilityModifier
public PropertyModifier propertyModifier
public PlayableZoneModifier playableZoneModifier
public java.util.Set<java.lang.Integer> cachedProperties
Constructor Detail |
---|
public MCard(java.lang.String cardName, java.io.InputStream inputFile, Player controller, Player owner, java.util.Map<java.lang.String,java.lang.String> constraints)
cardName
- the card nameinputFile
- is the file readed, containing informationcontroller
- is the controller of this cardowner
- is the owner of this cardconstraints
- the constraints of the card for database managementpublic MCard(MCard cardRef, DatabaseCard database)
cardRef
- is the model for this new instancedatabase
- the database of this new card.public MCard(java.lang.String pictureName, MCard cardRef)
pictureName
- is the picture name used to represent the copy. May be null.cardRef
- is the model for this instanceIdZones.STACK
Method Detail |
---|
public boolean isAbility()
Targetable
isAbility
in class Targetable
public boolean isSpell()
Targetable
isSpell
in class Targetable
public boolean isSamePosition(int position)
position
- the matching position code
IdPositions.ON_THE_BOTTOM
,
IdPositions.ON_THE_TOP
public MZone getContainer()
public boolean isACopy()
AbstractCard
isACopy
in class AbstractCard
public boolean hasIdCard(int idCard)
idCard
- are the sorts we match.
hasIdCard(int,int)
public static boolean hasIdCard(int idCardBIG, int idCardMatched)
idCardBIG
- are the set of types.idCardMatched
- are the type we match.
public static boolean intersectionIdCard(int idCardBIG, int idCardMatched)
idCardBIG
- are the set of types.idCardMatched
- are the type we match.
public boolean hasIdColor(int idColor)
idColor
- are the colors we match.
hasIdColor(int,int)
public static boolean hasIdColor(int idColorBIG, int idColorMatched)
idColorBIG
- are the colors that idColorMatched must haveidColorMatched
- are the colors we match.
public boolean isSameState(int zoneConstaint)
zoneConstaint
is ID__ANYWHERE, return true. zoneConstaint
is same as current zone of this card and
the constraint is validated, return true
zoneConstaint
- the zone id and optional tapped information.
zoneConstaint
is ID__ANYWHERE or
zoneConstaint
is same as current place of this card
and the constraint is verified.IdZones.PLAY_TAPPED
,
IdZones.PLAY_UNTAPPED
,
IdZones
public boolean isSameIdZone(int idZone)
idZone
- the other zone
public static boolean isSameIdZone(int idZone, int other)
idZone
- the other zoneother
- another zone
public int getIdZone()
IdZones
,
IdZones
public static int getIdZone(int idZone, ContextEventListener context)
idZone
- the zone identifiantt This identifiant may contain staus
information like "tapped", "untapped"context
- The optional context attached to the request.
IdZones
public static int getIdZone(int idZone, boolean tapped)
idZone
- the zone identifiantt without status information like "tapped",
"untapped"tapped
- indicate the state of this car.
IdZones
public int getIdColor()
IdCardColors
public int getIdCard()
public boolean hasIdType(int idType)
idType
- is the type required
public boolean hasPropertyNotFromCreator(int idType, MCard creator)
idType
- is the type requiredcreator
- the card that has created the modifier to ignore.
public boolean needReverse()
AbstractCard
needReverse
in class AbstractCard
public void moveCard(int destinationZone, Player newController, boolean newIsTapped, int idPosition)
AbstractCard
moveCard
in class AbstractCard
destinationZone
- the new place for this cardnewController
- new controler of this card. If null, the controler is the owner.newIsTapped
- dertermines if this card will come tapped or notidPosition
- from IdPositionspublic static boolean isTapped(int idZone)
idZone
- the zone id + tapped position information.
public void registerAbilities(int zone)
zone
- The supposed zone this card will go topublic Ability getDummyAbility()
public void registerReplacementAbilities(int zone)
zone
- The supposed zone this card will go topublic void unregisterAbilities()
public void tap(boolean tapped)
Tappable
tap
in interface Tappable
tapped
- if true the component will be tappedpublic void reverse(boolean reversed)
AbstractCard
reverse
in class AbstractCard
reversed
- if true the card will be tured as if your controled controls itpublic void returnCard(Visibility visibility)
visibility
- the visibility of this cardpublic void highLight(boolean... highlightedZones)
Clickable
highLight
in class Clickable
highlightedZones
- the set of highlighted zone.public void targetize(boolean... highlightedZones)
Targetable
targetize
in class Targetable
highlightedZones
- the set of highlighted zone.public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class Clickable
public void sendClickToOpponent()
Clickable
sendClickToOpponent
in class Clickable
public final int[] getBytes()
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 messagepublic static MCard getCard(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 messagepublic int getValue(int index)
Targetable
getValue
in class Targetable
index
- the register index
public int getValueIndirection(int index)
Targetable
getValueIndirection
in class Targetable
index
- the register index
public void addModifier(ColorModifier modifier)
modifier
- the color-modifier to add to this objectpublic void addModifier(IdCardModifier modifier)
modifier
- the idcard-modifier to add to this objectpublic void addModifier(AbilityModifier modifier)
modifier
- the ability-modifier to add to this objectpublic void addModifier(PropertyModifier modifier)
modifier
- the property-modifier to add to this objectpublic void addModifier(ControllerModifier modifier)
modifier
- the controller-modifier to add to this objectpublic void addModifier(PlayableZoneModifier modifier)
modifier
- the playable zone-modifier to add to this objectpublic void removeModifier(RegisterModifier modifier, int index)
Targetable
removeModifier
in class Targetable
modifier
- the register modifier to remove.index
- index of register to remove.public void removeModifier(RegisterIndirection indirection, int index)
Targetable
removeModifier
in class Targetable
indirection
- the register-indirection modifier to remove.index
- index of register indirection to remove.public void removeModifier(IdCardModifier modifier)
modifier
- the idcard-modifier to be removed from this objectpublic void removeModifier(AbilityModifier modifier)
modifier
- the ability-modifier to be removed from this objectpublic void removeModifier(ControllerModifier modifier)
modifier
- the controller-modifier to be removed from this objectpublic void removeModifier(PropertyModifier modifier)
modifier
- the property-modifier to be removed from this objectpublic void removeModifier(PlayableZoneModifier modifier)
modifier
- the playable zone-modifier to be removed from this objectpublic void removeModifier(ColorModifier modifier)
modifier
- the color-modifier to be removed from this objectpublic boolean isAttached()
public java.lang.String getTooltipString()
AbstractCard
getTooltipString
in class AbstractCard
public void refreshIdCard()
public void refreshAbilities()
public void refreshIdColor()
public void refreshProperties(int property)
property
- the property to refresh.public void refreshRegisters(int index)
index
- is the register index to refreshpublic void refreshController()
public int countAllCardsOf(Test test, Ability ability, boolean canBePreempted)
AbstractCard
countAllCardsOf
in class AbstractCard
test
- applied to count valid cardsability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.canBePreempted
- true
if the valid targets can be derterminated
before runtime.
public void checkAllCardsOf(Test test, java.util.List<Targetable> list, Ability ability)
AbstractCard
checkAllCardsOf
in class AbstractCard
test
- applied to count valid cardslist
- the list containing the founded cardsability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.public boolean playableZone(int supposedZone, int idZone)
supposedZone
- the zone where the this card would be played from.idZone
- the zone where this card can be played from.
public void updateAbilities()
public void setValue(int index, Operation operation, int rightValue)
index
- is the index of register to modifyoperation
- the operation to userightValue
- is the value to use as right operande for the operationpublic void setIdZone(int idZone)
idZone
- the new zone.public void addTimestampReference()
Targetable
addTimestampReference
in class Targetable
public void decrementTimestampReference(int timestamp)
Targetable
decrementTimestampReference
in class Targetable
timestamp
- is the reference to decrement.public java.util.Set<java.lang.Integer> getProperties()
public Targetable getLastKnownTargetable(int timeStamp)
Targetable
getLastKnownTargetable
in class Targetable
timeStamp
- the timestamp number.
public int getTimestamp()
Targetable
getTimestamp
in class Targetable
public int getNbObjects(java.lang.String objectName, Test objectTest)
objectName
- the object's name to find within the register modfiers chain.objectTest
- The test applied on specific modifier to be removed.
public void clearDamages()
Targetable
clearDamages
in class Targetable
public ModifierModel getModifierModels()
CardModel.getModifierModels()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public CardModel getCardModel()
public void setOwner(Player owner)
owner
- the new owner.public Player getOwner()
public void setDataBase(DatabaseCard database)
database
- the new database of this card.public boolean hasDirtyDataBase()
true
if this card has a database configuration
different from the original one.
true
if this card has a database configuration
different from the original one.public DatabaseCard getOriginalDatabase()
public java.util.Collection<MCard> getAttachedCards()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |