View Javadoc

1   /*
2   @See License.txt@
3    */
4   package spellcast.enchantment;
5   
6   import spellcast.beings.IBeing;
7   import spellcast.beings.IWizard;
8   
9   
10  /***
11   * The Delayed Effect <code>Enchantment</code>.
12   *
13   * @author Barrie Treloar
14   * @version $Revision: 1.1 $
15   */
16  public class DelayedEffectEnchantment extends EnchantmentImpl {
17      /*** Use serialVersionUID for interoperability. */
18      private static final long serialVersionUID = 1L;
19  
20      /*** The duration for <code>DelayedEffectEnchantment</code>. */
21      private static final int DURATION = 3;
22  
23      /*** The description for <code>DelayedEffectEnchantment</code>. */
24      private static final String DESCRIPTION =
25          "This spell only works if cast upon a wizard. The next spell he "
26          + "completes, provided it is on this turn or one of the next 3 is "
27          + "'banked' until needed, i.e. it fails to work until its caster "
28          + "desires. This next spell which is to be banked does not include "
29          + "the actual spell doing the banking. The spell must be written "
30          + "down to be used by its caster at the same time that he writes his "
31          + "gestures. Note that spells banked are those cast by the subject not "
32          + "those cast at him. If he casts more than one spell at the same time "
33          + "he chooses which is to be banked. Remember that P is a 'shield' "
34          + "spell, and surrender is not a spell. A wizard may only have one "
35          + "spell banked at any one time.";
36  
37      /*** The name of the <code>DelayedEffectEnchantment</code>. */
38      private static final String NAME = "Delayed Effect";
39  
40      /***
41       * Provided for serialization, do not use as a constructor.
42       */
43      protected DelayedEffectEnchantment() {
44      }
45  
46      /***
47       * Creates a new <code>DelayedEffectEnchantment</code> object.
48       *
49       * @param theCaster the <code>IBeing</code> casting the
50       *        <code>Enchantment</code>.
51       * @param theTarget the <code>Wizard</code> that is the target of the
52       *        <code>Enchantment</code>.
53       */
54      public DelayedEffectEnchantment(
55          final IBeing theCaster, final IWizard theTarget
56      ) {
57          super(NAME, theCaster, theTarget);
58          setDuration(DURATION);
59          setDescription(DESCRIPTION);
60      }
61  }