net.sf.magicproject.clickable.targetable.card
Interface CardModel

All Superinterfaces:
java.lang.Comparable<CardModel>
All Known Implementing Classes:
CardModelImpl

public interface CardModel
extends java.lang.Comparable<CardModel>

Since:
0.90
Author:
Fabrice Daugan , Stefano "Kismet" Lenzi

Method Summary
 int compareTo(CardModel o)
           
 Ability[] getAbilities()
          Return the list of actions when casting
 Attachment getAttachment()
          Returns the optional attachment condition and modifiers brought by this card.
 java.lang.String getCardName()
          Returns the english name of this card.
 int getIdCard()
          Return the type of this card
 int getIdColor()
          Return the printed Colors of this card.
 java.lang.String getKeyName()
          Returns the file-serializable card name.
 java.lang.String getLanguage()
          Returns the language used for this card.
 java.lang.String getLocalName()
          Returns the translated name.
 ModifierModel getModifierModels()
          Return the shared modifier models.
 int[] getProperties()
          Return the properties of this card.
 java.lang.String getRulesCredit()
          XML rule designer of loaded cards.
 int[] getStaticRegisters()
          Return shared registers of this targetable.
 boolean hasKeywords(java.lang.String keyword)
          Indicates this card contains or not the specified keyword.
 void setLocalName(java.lang.String localName)
          Set the translated card name.
 void setModifierModels(ModifierModel modifierModels)
          Set the shared modifier models.
 void setRulesCredits(java.lang.String cardRulesCredits)
          Set XML rule designer of this card.
 

Method Detail

getLanguage

java.lang.String getLanguage()
Returns the language used for this card.

Returns:
the language used for this card.

getKeyName

java.lang.String getKeyName()
Returns the file-serializable card name.

Returns:
the file-serializable card name.

getCardName

java.lang.String getCardName()
Returns the english name of this card. May contain any character. If null or empty, it would be equals to the card name (id).

Returns:
the english card name.

getRulesCredit

java.lang.String getRulesCredit()
XML rule designer of loaded cards.

Returns:
XML rule designer of loaded cards.

hasKeywords

boolean hasKeywords(java.lang.String keyword)
Indicates this card contains or not the specified keyword. Keywords are not case sensitive.

Parameters:
keyword - the tested keyword.
Returns:
true if the keyword is known by this card.

getLocalName

java.lang.String getLocalName()
Returns the translated name. If null or empty, it would be equals to the given english name.

Returns:
the translated card name.

setLocalName

void setLocalName(java.lang.String localName)
Set the translated card name.

Parameters:
localName - the new local name.

setRulesCredits

void setRulesCredits(java.lang.String cardRulesCredits)
Set XML rule designer of this card.

Parameters:
cardRulesCredits - the XML rule designer of loaded cards.

getIdCard

int getIdCard()
Return the type of this card

Returns:
Card type of this card
Since:
0.91

getIdColor

int getIdColor()
Return the printed Colors of this card.

Returns:
printed Colors of this card.
Since:
0.91

getStaticRegisters

int[] getStaticRegisters()
Return shared registers of this targetable. This register would never be modifier.

Returns:
shared registers of this targetable.
Since:
0.91

getProperties

int[] getProperties()
Return the properties of this card. These properties are these one readable on card itself.

Returns:
the properties for this card.
Since:
0.91

getAbilities

Ability[] getAbilities()
Return the list of actions when casting

Returns:
List of actions when casting

setModifierModels

void setModifierModels(ModifierModel modifierModels)
Set the shared modifier models. All cards with same id have the same modifier models objects

Parameters:
modifierModels - The new modifierModels to set.
Since:
0.91

getModifierModels

ModifierModel getModifierModels()
Return the shared modifier models. All cards with same id have the same modifier models objects

Returns:
the shared modifier models.
Since:
0.91

getAttachment

Attachment getAttachment()
Returns the optional attachment condition and modifiers brought by this card.

Returns:
the optional attachment condition and modifiers brought by this card. Return null if there is no attachment brought by this card.

compareTo

int compareTo(CardModel o)
Specified by:
compareTo in interface java.lang.Comparable<CardModel>


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