Exemplo n.º 1
0
  @Override
  public boolean checkCondition() {
    Character actor = getActor();

    if (actor.isBattleStanced()) return false;

    return actor.getCurrentHp() < actor.getMaxHp();
  }
Exemplo n.º 2
0
  public static TargetHp getInstance(Character target, int type) {
    TargetHp packet = (TargetHp) instance.newInstance();

    packet.objectId = target.getObjectId();
    packet.subId = target.getSubId();
    packet.hp = target.getCurrentHp() / (float) target.getMaxHp();
    packet.type = type;

    return packet;
  }