Beispiel #1
0
  @Override
  public void applyEffect(Effect effect) {
    super.applyEffect(effect);
    final Player effector = (Player) effect.getEffector();

    // Move Effector to Effected
    Skill skill = effect.getSkill();
    World.getInstance()
        .updatePosition(effector, skill.getX(), skill.getY(), skill.getZ(), skill.getH());
  }
  @Override
  public void applyEffect(Effect effect) {
    super.applyEffect(effect);
    int value = 0;
    // TODO figure out logId
    if (HPpercent > 0) {
      value = effect.getReserved1() * HPpercent / 100;
      effect.getEffector().getLifeStats().increaseHp(TYPE.HP, value, effect.getSkillId(), 170);
    }

    if (MPpercent > 0) {
      value = effect.getReserved1() * MPpercent / 100;
      effect.getEffector().getLifeStats().increaseMp(TYPE.MP, value, effect.getSkillId(), 170);
    }
  }
  @Override
  public void applyEffect(Effect effect) {
    super.applyEffect(effect);

    Creature effected = effect.getEffected();
    Effect placedSignet = effected.getEffectController().getAnormalEffect(signet);
    int nextSignetlvl = 1;
    if (placedSignet != null) {
      nextSignetlvl = placedSignet.getSkillId() - this.signetid + 2;
      if (nextSignetlvl > signetlvl || nextSignetlvl > 5) return;
      placedSignet.endEffect();
    }

    SkillTemplate template = DataManager.SKILL_DATA.getSkillTemplate(signetid + nextSignetlvl - 1);
    int effectsDuration = template.getEffectsDuration();
    Effect newEffect =
        new Effect(
            effect.getEffector(), effect.getEffected(), template, nextSignetlvl, effectsDuration);
    newEffect.initialize();
    newEffect.applyEffect();
  }
Beispiel #4
0
 @Override
 public void calculate(Effect effect) {
   super.calculate(effect, DamageType.PHYSICAL, true);
 }