1
2
3
4 package spellcast.enchantment;
5
6 import spellcast.beings.IBeing;
7
8 import spellcast.damage.DamageType;
9
10
11 /***
12 * The Resist Cold <code>Enchantment</code>.
13 *
14 * @author Barrie Treloar
15 * @version $Revision: 1.1 $
16 */
17 public class ResistColdEnchantment extends EnchantmentImpl {
18 /*** Use serialVersionUID for interoperability. */
19 private static final long serialVersionUID = 1L;
20
21 /*** The duration for <code>ResistColdEnchantment</code>. */
22 private static final int DURATION = 0;
23
24 /*** The description for <code>ResistColdEnchantment</code>. */
25 private static final String DESCRIPTION =
26 "The effects of this spell are identical to 'resist heat' but "
27 + "resistance is to cold ('ice storm' and ice elementals) and it "
28 + "destroys ice elementals if they are the subject of the spell "
29 + "but doesn't affect fire elementals";
30
31 /*** The name of the <code>ResistColdEnchantment</code>. */
32 private static final String NAME = "Resist Cold";
33
34 /***
35 * Provided for serialization, do not use as a constructor.
36 */
37 protected ResistColdEnchantment() {
38 }
39
40 /***
41 * Creates a new <code>ResistColdEnchantment</code> object.
42 *
43 * @param theCaster the <code>IBeing</code> casting the
44 * <code>Enchantment</code>.
45 * @param theTarget the <code>IBeing</code> that is the target of the
46 * <code>Enchantment</code>.
47 */
48 public ResistColdEnchantment(final IBeing theCaster, final IBeing theTarget) {
49 super(NAME, theCaster, theTarget);
50 setDuration(DURATION);
51 setDescription(DESCRIPTION);
52 setResistance(DamageType.getColdDamageType());
53 setPermanent(true);
54 }
55 }