mr:berserker_subclass
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:berserker_subclass [2026/02/25 21:27] – Wiki standards compliance fixes for 5 random pages Qwen Assistant | mr:berserker_subclass [2026/02/25 21:30] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Berserker Subclass - Code References ====== | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Full Java Class Content ===== | ||
| + | |||
| + | **HeroSubClass.java - BERSERKER Definition: | ||
| + | <code java> | ||
| + | // Enum definition (line 44) | ||
| + | BERSERKER(R.string.HeroSubClass_NameBers, | ||
| + | </ | ||
| + | |||
| + | **Fury Buff Activation (from HeroSubClass.java): | ||
| + | <code java> | ||
| + | @Override | ||
| + | public int charGotDamage(int damage, NamedEntityKind src, Char target) { | ||
| + | switch (this) { | ||
| + | case BERSERKER: | ||
| + | // Activate Fury when HP drops to 40% or below (Fury.LEVEL = 0.4f) | ||
| + | if (0 < target.hp() && target.hp() <= target.ht() * Fury.LEVEL) { | ||
| + | if (!target.hasBuff(BuffFactory.FURY)) { | ||
| + | Buff.affect(target, | ||
| + | } | ||
| + | } | ||
| + | break; | ||
| + | } | ||
| + | return damage; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | **Fury.java - Buff Implementation: | ||
| + | <code java> | ||
| + | package com.watabou.pixeldungeon.actors.buffs; | ||
| + | |||
| + | public class Fury extends Buff { | ||
| + | // Fury activates when HP is at or below 40% of max HP | ||
| + | public static final float LEVEL = 0.4f; | ||
| + | |||
| + | @Override | ||
| + | public boolean act() { | ||
| + | // Detach Fury when HP rises above 40% | ||
| + | if (target.hp() > target.ht() * LEVEL) { | ||
| + | detach(); | ||
| + | } | ||
| + | spend(TICK * 10); | ||
| + | return true; | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public int attackProc(Char attacker, Char defender, int damage) { | ||
| + | // Double damage while in Fury state | ||
| + | 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 ===== | ||
| + | English (values/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | Russian (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
