mr:mimic_amulet_mob
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:mimic_amulet_mob [2026/02/14 00:42] – Wiki maintenance: Updated selected pages for compliance with standards NYRDS Bot | mr:mimic_amulet_mob [2026/02/14 00:44] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Mimic Amulet Mob - Code References ====== | ||
| + | |||
| + | ===== Java Class ===== | ||
| + | <code java> | ||
| + | RemixedDungeon/ | ||
| + | package com.nyrds.pixeldungeon.mobs.guts; | ||
| + | |||
| + | import com.nyrds.Packable; | ||
| + | import com.watabou.pixeldungeon.Dungeon; | ||
| + | import com.watabou.pixeldungeon.actors.blobs.ToxicGas; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Buff; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Levitation; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Paralysis; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Stun; | ||
| + | import com.watabou.pixeldungeon.actors.mobs.Mob; | ||
| + | import com.watabou.pixeldungeon.items.keys.SkeletonKey; | ||
| + | import com.watabou.utils.Bundle; | ||
| + | |||
| + | public class MimicAmulet extends Mob { | ||
| + | |||
| + | @Packable | ||
| + | public int level; | ||
| + | |||
| + | public MimicAmulet() { | ||
| + | baseSpeed = 1.25f; | ||
| + | |||
| + | flying = true; | ||
| + | carcassChance = 0; | ||
| + | |||
| + | level = Dungeon.depth; | ||
| + | adjustStats(level); | ||
| + | addImmunity( ToxicGas.class ); | ||
| + | addImmunity( Paralysis.class ); | ||
| + | addImmunity( Stun.class ); | ||
| + | |||
| + | var prize = new SkeletonKey(); | ||
| + | collect(prize); | ||
| + | } | ||
| + | |||
| + | |||
| + | @Override | ||
| + | public void restoreFromBundle( Bundle bundle ) { | ||
| + | super.restoreFromBundle(bundle); | ||
| + | |||
| + | if(getBelongings().getItem(SkeletonKey.class)==null) { | ||
| + | collect(new SkeletonKey()); | ||
| + | } | ||
| + | |||
| + | adjustStats(level); | ||
| + | } | ||
| + | |||
| + | |||
| + | @Override | ||
| + | public boolean act() { | ||
| + | if(!hasBuff(Levitation.class)) { | ||
| + | Buff.affect(this, | ||
| + | } | ||
| + | return super.act(); | ||
| + | } | ||
| + | |||
| + | public void adjustStats( int level ) { | ||
| + | this.level = level; | ||
| + | |||
| + | hp(ht((3 + level) * 5)); | ||
| + | expForKill = 2 + 2 * (level - 1) / 5; | ||
| + | baseAttackSkill = 9 + level; | ||
| + | baseDefenseSkill = 2 * attackSkill + 1; | ||
| + | |||
| + | dmgMin = ht()/10; | ||
| + | dmgMax = ht()/4; | ||
| + | |||
| + | enemySeen = true; | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public boolean canBePet() { | ||
| + | return false; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | <code json> | ||
| + | RemixedDungeon/ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | This entity is implemented in Java, no Lua script exists | ||
| + | |||
| + | ===== Entity Kind ===== | ||
| + | MimicAmulet | ||
| + | |||
| + | ===== Additional Info ===== | ||
| + | - Package: com.nyrds.pixeldungeon.mobs.guts | ||
| + | - Inherits from: Mob | ||
| + | - Implemented as a mimic that appears as a floating amulet | ||
mr/mimic_amulet_mob.txt · Last modified: (external edit)
