mr:berserker_subclass
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:berserker_subclass [2026/09/06 00:54] – Wiki maintenance: Fix compliance issues for 5 random pages Wiki Maintenance | mr:berserker_subclass [2026/09/06 00:56] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Berserker Subclass - Code References ====== | ||
| + | ===== Java Classes ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Enum Definition ===== | ||
| + | From HeroSubClass.java (line 41): | ||
| + | <code java> | ||
| + | BERSERKER(R.string.HeroSubClass_NameBers, | ||
| + | </ | ||
| + | |||
| + | ===== Fury Activation Logic ===== | ||
| + | From HeroSubClass.java (lines 198-212): | ||
| + | <code java> | ||
| + | @Override | ||
| + | public int charGotDamage(int damage, NamedEntityKind src, Char target) { | ||
| + | switch (this) { | ||
| + | case BERSERKER: | ||
| + | if (0 < target.hp() && target.hp() <= target.ht() * Fury.LEVEL) { | ||
| + | if (!target.hasBuff(BuffFactory.FURY)) { | ||
| + | Buff.affect(target, | ||
| + | } | ||
| + | } | ||
| + | break; | ||
| + | } | ||
| + | return damage; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Fury Buff Class ===== | ||
| + | From Fury.java: | ||
| + | <code java> | ||
| + | package com.watabou.pixeldungeon.actors.buffs; | ||
| + | |||
| + | import com.nyrds.LuaInterface; | ||
| + | import com.nyrds.pixeldungeon.ml.R; | ||
| + | import com.nyrds.platform.util.StringsManager; | ||
| + | import com.watabou.pixeldungeon.actors.Char; | ||
| + | import com.watabou.pixeldungeon.actors.CharUtils; | ||
| + | import com.watabou.pixeldungeon.sprites.CharSprite; | ||
| + | import com.watabou.pixeldungeon.ui.BuffIndicator; | ||
| + | import com.watabou.pixeldungeon.utils.GLog; | ||
| + | import org.jetbrains.annotations.NotNull; | ||
| + | |||
| + | @LuaInterface | ||
| + | public class Fury extends Buff { | ||
| + | |||
| + | public static final float LEVEL = 0.4f; | ||
| + | |||
| + | @Override | ||
| + | public void act() { | ||
| + | if (target.hp() > target.ht() * LEVEL) { | ||
| + | detach(); | ||
| + | } | ||
| + | |||
| + | spend( TICK * 10 ); | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public boolean attachTo(@NotNull Char target) { | ||
| + | if (CharUtils.isVisible(target)) { | ||
| + | GLog.w(StringsManager.getVar(R.string.Brute_Enraged), | ||
| + | target.showStatus( CharSprite.NEGATIVE, | ||
| + | } | ||
| + | return super.attachTo(target); | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public int attackProc(Char attacker, Char defender, int damage) { | ||
| + | return damage * 2; | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public int icon() { | ||
| + | return BuffIndicator.FURY; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Stats from code ===== | ||
| + | * Fury Activation Threshold: 40% of max HP (Fury.LEVEL = 0.4f) | ||
| + | * Fury Damage Bonus: 2x (damage * 2) | ||
| + | * Fury Duration: Persistent while HP <= 40% | ||
| + | * Associated Armor: " | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | This entity is implemented in Java, no JSON configuration exists | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | From values/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | From values-ru/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | This entity is implemented in Java, no Lua script exists | ||
| + | |||
| + | ===== Related mr Entities ===== | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
mr/berserker_subclass.txt · Last modified: by 127.0.0.1
