1
2
3
4 package spellcast.enchantment;
5
6 import spellcast.beings.IBeing;
7
8
9 /***
10 * The Invisible <code>Enchantment</code>.
11 *
12 * @author Barrie Treloar
13 * @version $Revision: 1.1 $
14 */
15 public class InvisibleEnchantment extends EnchantmentImpl {
16 /*** Use serialVersionUID for interoperability. */
17 private static final long serialVersionUID = 1L;
18
19 /*** The duration for <code>InvisibleEnchantment</code>. */
20 private static final int DURATION = 3;
21
22 /*** The description for <code>InvisibleEnchantment</code>. */
23 private static final String DESCRIPTION =
24 "This spell is similar to 'blindness' only the subject of the "
25 + "spell becomes invisible to his opponent and his monsters for "
26 + "3 turns. All spells he creates, though not gestures, can be seen "
27 + "by his opponent and identified. The subject cannot be attacked by "
28 + "any monsters although they can be directed at him in case he "
29 + "becomes visible prematurely. Wizards can still stab and direct "
30 + "spells at him, with the same hope. Any monster made invisible "
31 + "is destroyed due to the unstable nature of such magically created "
32 + "creatures.";
33
34 /*** The name for <code>InvisibleEnchantment</code>. */
35 private static final String NAME = "Invisible";
36
37 /***
38 * Provided for serialization, do not use as a constructor.
39 */
40 protected InvisibleEnchantment() {
41 }
42
43 /***
44 * Creates a new <code>InvisibleEnchantment</code> object.
45 *
46 * @param theCaster the <code>IBeing</code> casting the
47 * <code>Enchantment</code>.
48 * @param theTarget the <code>IBeing</code> that is the target of the
49 * <code>Enchantment</code>.
50 */
51 public InvisibleEnchantment(final IBeing theCaster, final IBeing theTarget) {
52 super(NAME, theCaster, theTarget);
53 setDuration(DURATION);
54 setDescription(DESCRIPTION);
55 }
56 }