mr:senior_mob
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mr:senior_mob [2026/02/26 00:41] – Wiki maintenance: Fix broken links and improve multi-language consistency Qwen Assistant | mr:senior_mob [2026/04/08 16:39] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Senior Mob - Code References ====== | ||
| + | |||
| + | {{ rpd: | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | * **Main Class**: [[https:// | ||
| + | * **Package**: | ||
| + | * **Parent Class**: [[https:// | ||
| + | * **Registration**: | ||
| + | |||
| + | ===== Java Class Content ===== | ||
| + | <code java> | ||
| + | package com.watabou.pixeldungeon.actors.mobs; | ||
| + | |||
| + | import com.watabou.pixeldungeon.actors.Char; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Buff; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Stun; | ||
| + | import com.watabou.utils.Callback; | ||
| + | import com.watabou.utils.Random; | ||
| + | |||
| + | import org.jetbrains.annotations.NotNull; | ||
| + | |||
| + | public class Senior extends Monk { | ||
| + | |||
| + | { | ||
| + | spriteClass = " | ||
| + | dmgMin = 12; | ||
| + | dmgMax = 20; | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public int attackProc(@NotNull Char enemy, int damage ) { | ||
| + | if (Random.Int( 10 ) == 0) { | ||
| + | Buff.prolong( enemy, Stun.class, 1.1f ); | ||
| + | } | ||
| + | return super.attackProc( enemy, damage ); | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public boolean actMeleeAttack(Char enemy) { | ||
| + | if (Random.Float() < 0.3f) { | ||
| + | // Play kick animation with callback to trigger attack logic | ||
| + | getSprite().playExtra(" | ||
| + | @Override | ||
| + | public void call() { | ||
| + | // After kick animation completes, perform the actual attack | ||
| + | if (isAlive()) { | ||
| + | onAttackComplete(); | ||
| + | } | ||
| + | } | ||
| + | }); | ||
| + | getSprite().turnTo(getPos(), | ||
| + | spend(attackDelay()); | ||
| + | return false; | ||
| + | } else { | ||
| + | return super.actMeleeAttack(enemy); | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Key Properties from Code ===== | ||
| + | * **HP**: Inherits from Monk parent class | ||
| + | * **Damage**: 12-20 (damage range) | ||
| + | * **Special Ability**: 10% chance to apply Stun buff for 1.1 seconds on attack | ||
| + | * **Animation**: | ||
| + | * **Sprite Configuration**: | ||
| + | * **Inheritance**: | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | This entity has JSON configuration for sprite: | ||
| + | * [[https:// | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | <code xml> | ||
| + | <!-- English (values/ | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- Russian (values-ru/ | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | This entity is implemented in Java, no Lua script exists | ||
| + | |||
| + | ===== Entity Kind ===== | ||
| + | * getEntityKind(): | ||
| + | |||
| + | ===== Additional Code References ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * Used in Badges.java to recognize Senior mob kills for rare mob badge | ||
| + | * Found in temple areas alongside other monk-type enemies | ||
| + | |||
| + | ===== Related Entities ===== | ||
| + | * **Monk**: [[mr: | ||
| + | * **Stun Buff**: [[mr: | ||
| + | * **English Page**: [[en: | ||
| + | * **Russian Page**: [[ru: | ||
| + | |||
| + | {{tag> rpd mobs monks mr}} | ||
