* @param killer Creature
*/
@Override
protected void onEvtDead(Creature killer)
{
final NpcInstance actor = getActor();
boolean isOverhit = false;
if (actor instanceof MonsterInstance)
{
isOverhit = ((MonsterInstance) actor).getOverhitDamage() > 0;
}
final int npcId = actor.getNpcId();
int nextId = 0;
int type = 0;
if ((npcId != getNextDoppler(npcId)) && (npcId != getNextVoid(npcId)))
{
type = 1;
if (isOverhit)
{
if (Rnd.chance(70))
{
nextId = getNextDoppler(npcId);
}
else if (Rnd.chance(80))
{
nextId = getNextVoid(npcId);
}
}
else if (Rnd.chance(65))
{
nextId = getNextDoppler(npcId);
}
}
else if (npcId == getNextDoppler(npcId))
{
type = 2;
if (isOverhit)
{
if (Rnd.chance(60))
{
nextId = getNextDoppler(npcId);
}
else if (Rnd.chance(90))
{
nextId = getNextVoid(npcId);
}
}
else if (Rnd.chance(40))
{
nextId = getNextDoppler(npcId);
}
else if (Rnd.chance(50))
{
nextId = getNextVoid(npcId);
}
}
else if (npcId == getNextVoid(npcId))
{
type = 3;
if (isOverhit)
{
if (Rnd.chance(80))
{
nextId = getNextVoid(npcId);
}
}
else if (Rnd.chance(50))
{
nextId = getNextVoid(npcId);
}
}
final Reflection r = actor.getReflection();
boolean spawnPossible = true;
if (r instanceof KamalokaNightmare)
{
final KamalokaNightmare kama = (KamalokaNightmare) r;
kama.addKilledKanabion(type);