mr:terror_buff
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:terror_buff [2026/03/25 18:44] – Wiki maintenance: Fix links, update mr:terror_buff with code references, and correct string resource line numbers Qwen Assistant | mr:terror_buff [2026/03/25 18:46] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Terror Buff - Code References ====== | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | * Main Implementation: | ||
| + | * AI Handler: RemixedDungeon/ | ||
| + | |||
| + | ===== Class Details ===== | ||
| + | <code java> | ||
| + | package com.watabou.pixeldungeon.actors.buffs; | ||
| + | |||
| + | public class Terror extends FlavourBuff { | ||
| + | public static final float DURATION = 10f; | ||
| + | |||
| + | @Override | ||
| + | public int icon() { | ||
| + | return BuffIndicator.TERROR; | ||
| + | } | ||
| + | |||
| + | public static void recover(Char target) { | ||
| + | Terror terror = target.buff(Terror.class); | ||
| + | if (terror != null && terror.cooldown() < DURATION) { | ||
| + | target.remove(terror); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public boolean attachTo(@NotNull Char target) { | ||
| + | if(super.attachTo(target)) { | ||
| + | if(target instanceof Mob && target.fraction!=Fraction.NEUTRAL) { | ||
| + | Mob tgt = (Mob)target; | ||
| + | tgt.releasePet(); | ||
| + | } | ||
| + | return true; | ||
| + | } | ||
| + | return false; | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public void attachVisual() { | ||
| + | target.showStatus(CharSprite.NEGATIVE, | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Key Methods ===== | ||
| + | * **attachTo(Char target)**: Attaches the Terror buff to a character. If the target is a non-neutral Mob, releases any pet. | ||
| + | * **recover(Char target)**: Removes Terror buff if cooldown is less than DURATION (10f). | ||
| + | * **attachVisual()**: | ||
| + | * **icon()**: Returns BuffIndicator.TERROR for the buff icon. | ||
| + | |||
| + | ===== Constants ===== | ||
| + | * **DURATION**: | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | This entity does not have JSON configuration files. It is fully implemented in Java. | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | <code xml> | ||
| + | <!-- English strings --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- Russian strings --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== String Resource References ===== | ||
| + | * English: RemixedDungeon/ | ||
| + | - Char_StaFrightened (line ~335) | ||
| + | - TerrorBuff_Info (line ~615) | ||
| + | * Russian: RemixedDungeon/ | ||
| + | - Char_StaFrightened (line ~335) | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | This entity is implemented in Java, no Lua script exists. | ||
| + | |||
| + | ===== Usage in Code ===== | ||
| + | * **Immunity**: | ||
| + | - IceGuardian, | ||
| + | - YogsHeart, YogsBrain, YogsEye, BurningFist, | ||
| + | * **AI Behavior**: The Horrified AI class handles terrorized mob behavior | ||
| + | * **Status Display**: Uses CharSprite.NEGATIVE for visual feedback | ||
| + | * **Pet Release**: Automatically releases pets when applied to non-neutral mobs | ||
| + | |||
| + | ===== Related Classes ===== | ||
| + | * FlavourBuff (parent class) | ||
| + | * BuffIndicator (icon system) | ||
| + | * Horrified (AI handler for terrorized mobs) | ||
| + | * CharSprite (visual status display) | ||
| + | * Fraction (mob faction system) | ||
| + | |||
| + | ===== Source Code Links ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
mr/terror_buff.txt · Last modified: by 127.0.0.1
