Пример #1
0
  @Override
  public void doRegen() {
    Character actor = getActor();

    actor.setCurrentHp(actor.getCurrentHp() + actor.getRegenHp());
    actor.updateHp();
  }
Пример #2
0
  @Override
  public boolean checkCondition() {
    Character actor = getActor();

    if (actor.isBattleStanced()) return false;

    return actor.getCurrentHp() < actor.getMaxHp();
  }
Пример #3
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;
  }