net.sf.magicproject.modifier
Interface ObjectModifierModel

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
ObjectAbilityModifierModel

public interface ObjectModifierModel
extends java.lang.Cloneable

Since:
0.85
Author:
Fabrice Daugan

Method Summary
 void addModifierFromModel(Ability ability, MCard target)
          Create modifier(s) on the specified target.
 java.lang.Object clone()
          Creates and returns a copy of this object.
 int getNbObject(MCard card, Test objectTest)
          Return occurences number of the given object with the given name.
 java.lang.String getObjectName()
          Return the object name
 void removeObject(MCard fromCard, Test objectTest)
          Remove one instance of this object from the given card.
 

Method Detail

addModifierFromModel

void addModifierFromModel(Ability ability,
                          MCard target)
Create modifier(s) on the specified target.

Parameters:
ability - is the ability owning causin the creation of this modifier. The card component of this ability should correspond to the card owning this test too.
target - is the card this new modifier would be attached to.

clone

java.lang.Object clone()
Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object.

Returns:
a clone of this instance.
See Also:
Cloneable

removeObject

void removeObject(MCard fromCard,
                  Test objectTest)
Remove one instance of this object from the given card.

Parameters:
fromCard -
objectTest - The test applied on specific modifier to be removed.

getObjectName

java.lang.String getObjectName()
Return the object name

Returns:
the object name

getNbObject

int getNbObject(MCard card,
                Test objectTest)
Return occurences number of the given object with the given name.

Parameters:
card - the card on which objects will be counted.
objectTest - The test applied on specific modifier to be removed.
Returns:
occurences number of this object attached to the given card.


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