User Tools

Site Tools


mr:zombie_mob

Zombie Mob - Code References

Zombie Mob

Java Classes

Implementation Details

  • HP: 33
  • Defense Skill: 10
  • Attack Skill: 10
  • Damage: 3-10
  • Defense Rating: 10
  • EXP for Kill: 6
  • Max Level: 15
  • Type: Undead (immune to many effects via `setUndead(true)`)
  • Special Attack: 33% chance (1 in 3) to poison target on hit for 2-4 seconds
  • Loot: Gold (2% drop chance)
  • Spawn Location: Necropolis levels (necro1, necro2, necro3)

JSON Configuration

Spawn configuration in Bestiary.json:

  • necro1: Zombie spawn rate 1.0
  • necro2: Zombie spawn rate 1.0 (with ExplodingSkull, EnslavedSoul, DeathKnight, DreadKnight)
  • necro3: Zombie spawn rate 2.0 (with ExplodingSkull, EnslavedSoul, DeathKnight, DreadKnight)

String Resources

English string resources:

<string name="Zombie_Name">zombie</string>
<string name="Zombie_Name_Objective">zombie</string>
<string name="Zombie_Desc">An animated corpse from the necropolis. It has quite a bit of health, and has a chance to poison the hero on hit. Like all undead creatures, it has immunity to many effects.</string>
<string name="Zombie_Gender">masculine</string>

String resources available in multiple languages:

Lua Scripts

This entity is implemented entirely in Java. No Lua script exists for Zombie.

Key Code Fragments

Java Implementation (Zombie.java):

public class Zombie extends Mob {
    {
        hp(ht(33));
        baseDefenseSkill = 10;
        baseAttackSkill  = 10;
        dmgMin = 3;
        dmgMax = 10;
        dr = 10;
 
        expForKill = 6;
        maxLvl = 15;
 
        setUndead(true);
        loot(Gold.class, 0.02f);
    }
 
    @Override
    public int attackProc(@NotNull Char enemy, int damage ) {
        //Poison proc - 33% chance (1 in 3)
        if (Random.Int(3) == 1){
            Buff.affect( enemy, Poison.class, Random.Int( 2, 4 ) * Poison.durationFactor( enemy ) );
        }
        return damage;
    }
}

mr/zombie_mob.txt · Last modified: by 127.0.0.1