Fixed NPC Death Bomb (4614) skill.

Thanks to ver.
This commit is contained in:
MobiusDevelopment
2022-03-23 23:40:48 +00:00
parent 7bc8e2da10
commit e723bfd82d
9 changed files with 35 additions and 8 deletions

View File

@@ -880,6 +880,11 @@ public class AttackableAI extends CreatureAI
if (((sk.getSkillType() == SkillType.BUFF) || (sk.getSkillType() == SkillType.HEAL) || inRange) && !_actor.isSkillDisabled(sk) && (_actor.getCurrentMp() >= _actor.getStat().getMpConsume(sk)) && !sk.isPassive() && (Rnd.get(100) <= 5))
{
if (sk.isSuicideAttack() && ((_actor.getCurrentHp() > (_actor.getMaxHp() / 3)) || (Rnd.get(100) > sk.getMaxChance())))
{
continue;
}
if ((sk.getSkillType() == SkillType.BUFF) || (sk.getSkillType() == SkillType.HEAL))
{
if ((sk.getSkillType() == SkillType.HEAL) && (_actor.getCurrentHp() > (int) (_actor.getMaxHp() / 1.5)))
@@ -962,12 +967,18 @@ public class AttackableAI extends CreatureAI
_actor.setTarget(_actor);
}
}
// GeoData Los Check here
if (!useSkillSelf && !GeoEngine.getInstance().canSeeTarget(_actor, _actor.getTarget()))
{
return;
}
if (sk.isSuicideAttack() && ((_actor.getCurrentHp() > (_actor.getMaxHp() / 3)) || (Rnd.get(100) > sk.getMaxChance())))
{
continue;
}
final WorldObject oldTarget = _actor.getTarget();
clientStopMoving(null);
_accessor.doCast(sk);

View File

@@ -137,8 +137,8 @@ public class Mdam implements ISkillHandler
if (skill.isSuicideAttack())
{
creature.doDie(null);
creature.setCurrentHp(0);
creature.doDie(null);
}
}

View File

@@ -342,10 +342,10 @@ public class Pdam implements ISkillHandler
creature.removeSs();
}
if (skill.isSuicideAttack() && !creature.isInvul())
if (skill.isSuicideAttack())
{
creature.doDie(null);
creature.setCurrentHp(0);
creature.doDie(null);
}
}