mr:levitation_buff
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:levitation_buff [2026/02/19 05:37] – Fix wiki pages: update mr: namespace pages with accurate code refs, remove duplicate levitation.txt, fix broken Gnoll King link in bossmobs.txt, add missing images Qwen Assistant | mr:levitation_buff [2026/02/19 05:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Levitation Buff - Code References ====== | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | * '' | ||
| + | * Extends: [[https:// | ||
| + | |||
| + | ===== Java Class Content ===== | ||
| + | <code java> | ||
| + | package com.watabou.pixeldungeon.actors.buffs; | ||
| + | |||
| + | import com.watabou.pixeldungeon.Dungeon; | ||
| + | import com.watabou.pixeldungeon.actors.Char; | ||
| + | import com.watabou.pixeldungeon.sprites.CharSprite; | ||
| + | import com.watabou.pixeldungeon.ui.BuffIndicator; | ||
| + | |||
| + | import org.jetbrains.annotations.NotNull; | ||
| + | |||
| + | public class Levitation extends FlavourBuff { | ||
| + | |||
| + | public static final float DURATION = 20f; | ||
| + | |||
| + | @Override | ||
| + | public boolean attachTo(@NotNull Char target ) { | ||
| + | if (super.attachTo( target )) { | ||
| + | Roots.detach( target, Roots.class ); | ||
| + | return true; | ||
| + | } else { | ||
| + | return false; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public void detach() { | ||
| + | super.detach(); | ||
| + | if(Dungeon.level != null) { | ||
| + | Dungeon.level.press(target.getPos(), | ||
| + | } | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public int icon() { | ||
| + | return BuffIndicator.LEVITATION; | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public CharSprite.State charSpriteStatus() { | ||
| + | return CharSprite.State.LEVITATING; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Key Constants ===== | ||
| + | * Duration: '' | ||
| + | * Buff Indicator: '' | ||
| + | * Sprite State: '' | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | No dedicated JSON configuration file found. Buff is implemented entirely in Java. | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | English ('' | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | Russian ('' | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | No Lua script implementation. This buff is implemented entirely in Java. | ||
| + | |||
| + | ===== Usage in Code ===== | ||
| + | Applied by: | ||
| + | * [[https:// | ||
| + | * Various spells and abilities | ||
| + | |||
| + | Key behaviors: | ||
| + | * Detaches '' | ||
| + | * Calls '' | ||
| + | * Sets sprite state to '' | ||
| + | * Uses '' | ||
| + | |||
| + | ===== Related Buffs ===== | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | |||
| + | ===== See Also ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
mr/levitation_buff.txt · Last modified: by 127.0.0.1
