Exemplo n.º 1
0
  public void skillOutput(boolean passive, boolean failed, boolean peaceful) {

    owner.getRoom().setSkillRedirect(true);

    if (passive) owner.passiveOutput(target, selfOut, targOut, grupOut, obsvOut);
    else owner.combatOutput(target, selfOut, targOut, grupOut, obsvOut);

    if (!failed) {
      if (peaceful) trainPeaceful();
      else train();
    }

    owner.getRoom().setSkillRedirect(false);
  }
Exemplo n.º 2
0
  public boolean tryDamageSkill(String rem, String cut, String output) {

    if (cut.length() > 0)
      if (rem.indexOf(cut) == 0) {
        rem = rem.substring(cut.length(), rem.length());
        rem = Utility.clearWhiteSpace(rem);
      }

    target = owner.getRoom().findEntity(owner, rem);

    if ((target == null) && (owner.getPlayerState() == Utility.PSTATE_FIGHTING))
      target = owner.getTarget();

    if (target == null) {
      owner.echo(output);
      return false;
    }

    if (!Combat.canAttack(owner, target, false, true)) return false;

    tn = target.getName();
    Tn = target.getPName();
    ty = Utility.possessive(tn);
    Ty = Utility.possessive(Tn);

    return true;
  }
Exemplo n.º 3
0
  public void trainPassive(Skill Sk) {

    owner.getRoom().setSkillRedirect(true);
    Sk.train();
    owner.getRoom().setSkillRedirect(false);
  }