1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package net.sf.magicproject.clickable.targetable.card;
22
23 import net.sf.magicproject.clickable.ability.Ability;
24 import net.sf.magicproject.modifier.ModifierModel;
25
26 /***
27 * @since 0.90
28 * @author <a href="mailto:fabdouglas@users.sourceforge.net">Fabrice Daugan </a>
29 * @author <a href="mailto:kismet-sl@users.sourceforge.net">Stefano "Kismet"
30 * Lenzi</a>
31 */
32 public interface CardModel extends Comparable<CardModel> {
33
34 /***
35 * Returns the language used for this card.
36 *
37 * @return the language used for this card.
38 */
39 String getLanguage();
40
41 /***
42 * Returns the file-serializable card name.
43 *
44 * @return the file-serializable card name.
45 */
46 String getKeyName();
47
48 /***
49 * Returns the english name of this card. May contain any character. If null
50 * or empty, it would be equals to the card name (id).
51 *
52 * @return the english card name.
53 */
54 String getCardName();
55
56 /***
57 * XML rule designer of loaded cards.
58 *
59 * @return XML rule designer of loaded cards.
60 */
61 String getRulesCredit();
62
63 /***
64 * Indicates this card contains or not the specified keyword. Keywords are not
65 * case sensitive.
66 *
67 * @param keyword
68 * the tested keyword.
69 * @return true if the keyword is known by this card.
70 */
71 boolean hasKeywords(String keyword);
72
73 /***
74 * Returns the translated name. If null or empty, it would be equals to the
75 * given english name.
76 *
77 * @return the translated card name.
78 */
79 String getLocalName();
80
81 /***
82 * Set the translated card name.
83 *
84 * @param localName
85 * the new local name.
86 */
87 void setLocalName(String localName);
88
89 /***
90 * Set XML rule designer of this card.
91 *
92 * @param cardRulesCredits
93 * the XML rule designer of loaded cards.
94 */
95 void setRulesCredits(String cardRulesCredits);
96
97 /***
98 * Return the type of this card
99 *
100 * @return Card type of this card
101 * @since 0.91
102 */
103 int getIdCard();
104
105 /***
106 * Return the printed Colors of this card.
107 *
108 * @return printed Colors of this card.
109 * @since 0.91
110 */
111 int getIdColor();
112
113 /***
114 * Return shared registers of this targetable. This register would never be
115 * modifier.
116 *
117 * @return shared registers of this targetable.
118 * @since 0.91
119 */
120 int[] getStaticRegisters();
121
122 /***
123 * Return the properties of this card. These properties are these one readable
124 * on card itself.
125 *
126 * @return the properties for this card.
127 * @since 0.91
128 */
129 int[] getProperties();
130
131 /***
132 * Return the list of actions when casting
133 *
134 * @return List of actions when casting
135 */
136 Ability[] getAbilities();
137
138 /***
139 * Set the shared modifier models. All cards with same id have the same
140 * modifier models objects
141 *
142 * @param modifierModels
143 * The new modifierModels to set.
144 * @since 0.91
145 */
146 void setModifierModels(ModifierModel modifierModels);
147
148 /***
149 * Return the shared modifier models. All cards with same id have the same
150 * modifier models objects
151 *
152 * @since 0.91
153 * @return the shared modifier models.
154 */
155 ModifierModel getModifierModels();
156
157 /***
158 * Returns the optional attachment condition and modifiers brought by this
159 * card.
160 *
161 * @return the optional attachment condition and modifiers brought by this
162 * card. Return <code>null</code> if there is no attachment brought
163 * by this card.
164 */
165 Attachment getAttachment();
166
167 int compareTo(CardModel o);
168
169 }