View Javadoc

1   /*
2   @See License.txt@
3    */
4   package spellcast.enchantment;
5   
6   import spellcast.beings.IBeing;
7   
8   
9   /***
10   * The Amnesia <code>Enchantment</code>.
11   *
12   * @author Barrie Treloar
13   * @version $Revision: 1.1 $
14   */
15  public class ConfusionEnchantment extends EnchantmentImpl {
16      /*** Use serialVersionUID for interoperability. */
17      private static final long serialVersionUID = 1L;
18  
19      /*** The duration for <code>ConfusionEnchantment</code>. */
20      private static final int DURATION = 1;
21  
22      /*** The description for <code>ConfusionEnchantment</code>. */
23      private static final String DESCRIPTION =
24          "If the subject of this spell is a wizard, next turn he writes "
25          + "down his gestures as usual and after exposing them, rolls 2 dice "
26          + "to determine which gesture is superseded due to his being confused. "
27          + "The first die indicates left hand on 1-3, right on 4-6. The second "
28          + "roll determines what the gesture for that hand shall be replaced "
29          + "with: 1=C, 2=D, 3=F, 4=P, 5=S, 6=W. If the subject of the spell is "
30          + "a monster, it attacks at random that turn. If the subject is also "
31          + "the subject of any of: 'amnesia', 'charm person', 'charm monster', "
32          + "'paralysis' or 'fear', none of the spells work.";
33  
34      /*** The name for <code>ConfusionEnchantment</code>. */
35      private static final String NAME = "Confusion";
36  
37      /***
38       * Provided for serialization, do not use as a constructor.
39       */
40      protected ConfusionEnchantment() {
41      }
42  
43      /***
44       * Creates a new <code>ConfusionEnchantment</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 ConfusionEnchantment(final IBeing theCaster, final IBeing theTarget) {
52          super(NAME, theCaster, theTarget);
53          setDuration(DURATION);
54          setDescription(DESCRIPTION);
55      }
56  }