home *** CD-ROM | disk | FTP | other *** search
/ Level 2000 August / Level_2000-08_cd1.bin / Demos / Vampire / Vampire_Demo.exe / Codex.nob / DisciplineDecay.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-22  |  1.4 KB  |  27 lines

  1. public class DisciplineDecay extends Discipline {
  2.    private static final String DISCIPLINE_NAME = "Decay";
  3.  
  4.    public int cast(int level, int casterGuid, int targetGuid) {
  5.       if (!((Discipline)this).CheckCastParameters(level, casterGuid, "Decay")) {
  6.          return 0;
  7.       } else if (!((Discipline)this).CheckCastTarget(targetGuid, "Decay")) {
  8.          return 0;
  9.       } else if (((Discipline)this).Fizzled(level)) {
  10.          ((Discipline)this).DisplayFizzle("Decay", level);
  11.          return 0;
  12.       } else {
  13.          try {
  14.             super.targetThing.AddActorEffectByLevel("ef_disc_decay", 5000, level, casterGuid, 4);
  15.             ((Discipline)this).DisplayCast("Decay", level);
  16.             return 1;
  17.          } catch (Exception var6) {
  18.             CodexConsole.PrintException(((Throwable)var6).getMessage() + " in " + "Decay" + " [cast]");
  19.             return 0;
  20.          } catch (Error var7) {
  21.             CodexConsole.PrintError(((Throwable)var7).getMessage() + " in " + "Decay" + " [cast]");
  22.             return 0;
  23.          }
  24.       }
  25.    }
  26. }
  27.