home *** CD-ROM | disk | FTP | other *** search
- public class DisciplineDrawingOutBeast extends Discipline {
- private static final String DISCIPLINE_NAME = "DrawingOutBeast";
-
- public boolean cancast(int level, int casterGuid, int targetGuid, float x, float y, float z, boolean bIsPos) {
- if (!((Discipline)this).CheckCastParameters(level, casterGuid, "DrawingOutBeast")) {
- return false;
- } else if (!((Discipline)this).CheckCastTarget(targetGuid, "DrawingOutBeast")) {
- return false;
- } else if (super.targetThing.GetActorType() != 2 && super.targetThing.GetActorType() != 3) {
- return true;
- } else {
- ((Discipline)this).DisplayNoCast("RPG_DISC_NODRAWINGOUTTHEBEAST");
- return false;
- }
- }
-
- public int cast(int level, int casterGuid, int targetGuid) {
- if (!((Discipline)this).CheckCastParameters(level, casterGuid, "DrawingOutBeast")) {
- return 0;
- } else if (!((Discipline)this).CheckCastTarget(targetGuid, "DrawingOutBeast")) {
- return 0;
- } else if (((Discipline)this).Fizzled(level)) {
- ((Discipline)this).DisplayFizzle("DrawingOutBeast", level);
- super.casterThing.AddActorEffectByLevel("ef_disc_drawingoutbeast", 2000, level, casterGuid, 4);
- return 0;
- } else {
- try {
- ((Discipline)this).DisplayCast("DrawingOutBeast", level);
- if (super.targetThing.GetActorType() != 0 && super.targetThing.GetActorType() != 1) {
- ((Discipline)this).DisplayResist("DrawingOutBeast", level);
- } else {
- super.casterThing.AddActorEffectByLevel("ef_disc_quellbeast", 2000, level, casterGuid, 4);
- super.targetThing.AddActorEffectByLevel("ef_disc_drawingoutbeast", 2000, level, casterGuid, 4);
- }
-
- return 1;
- } catch (Exception var6) {
- CodexConsole.PrintException(((Throwable)var6).getMessage() + " in " + "DrawingOutBeast" + " [cast]");
- return 0;
- } catch (Error var7) {
- CodexConsole.PrintError(((Throwable)var7).getMessage() + " in " + "DrawingOutBeast" + " [cast]");
- return 0;
- }
- }
- }
- }
-