mr:root_spell
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:root_spell [2026/03/25 21:20] – Wiki maintenance: Enhance mr: namespace pages with comprehensive code references Qwen Assistant | mr:root_spell [2026/03/25 21:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Root Spell - Code References ====== | ||
| + | |||
| + | {{ rpd: | ||
| + | |||
| + | **Root** is an elemental spell that immobilizes targets by rooting them in place. | ||
| + | |||
| + | ===== Entity Type ===== | ||
| + | Spell (Java implementation) | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | * [[https:// | ||
| + | * Package: `com.nyrds.pixeldungeon.mechanics.spells` | ||
| + | * Constructor configuration: | ||
| + | * `targetingType = SpellHelper.TARGET_CHAR_NOT_SELF` - Cannot target self | ||
| + | * `magicAffinity = SpellHelper.AFFINITY_ELEMENTAL` - Elemental magic affinity | ||
| + | * `level = 2` - Spell level requirement | ||
| + | * `image = 2` - Sprite index | ||
| + | * `spellCost = 2` - SP cost to cast | ||
| + | * Cast method applies `Roots` buff for 10 ticks | ||
| + | * Visual effects: EarthParticle emitter burst (5 particles) + light blue burst (3 particles) | ||
| + | * Sound effect: `Assets.SND_PUFF` | ||
| + | * Used in: [[https:// | ||
| + | * Texture: `spellsIcons/ | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | This entity is implemented in Java, no JSON configuration exists | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | English (values/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | Russian (values-ru/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | Spanish (values-es/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | French (values-fr/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | German (values-de/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | This entity is implemented in Java, no Lua script exists | ||
| + | |||
| + | ===== Related mr Entities ===== | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | |||
| + | ===== Game Mechanics ===== | ||
| + | * **Target**: Any character except self | ||
| + | * **Duration**: | ||
| + | * **Effect**: Prevents target movement | ||
| + | * **Magic Affinity**: Elemental | ||
| + | * **SP Cost**: 2 spell points | ||
| + | * **Level Requirement**: | ||
| + | * **Visual Effects**: Earth particles + light blue burst | ||
| + | * **Sound**: Puff sound effect | ||
| + | |||
| + | ===== Code Fragments ===== | ||
| + | <code java> | ||
| + | // RootSpell.java constructor | ||
| + | RootSpell() { | ||
| + | targetingType = SpellHelper.TARGET_CHAR_NOT_SELF; | ||
| + | magicAffinity = SpellHelper.AFFINITY_ELEMENTAL; | ||
| + | level = 2; | ||
| + | image = 2; | ||
| + | spellCost = 2; | ||
| + | } | ||
| + | |||
| + | // Cast method | ||
| + | @Override | ||
| + | public boolean cast(@NotNull Char chr, @NotNull Char target){ | ||
| + | if(target.valid()) { | ||
| + | target.getSprite().emitter().burst( EarthParticle.FACTORY, | ||
| + | target.getSprite().burst( 0xFF99FFFF, 3 ); | ||
| + | Buff.prolong( target, Roots.class, | ||
| + | Sample.INSTANCE.play( Assets.SND_PUFF ); | ||
| + | castCallback(chr); | ||
| + | return true; | ||
| + | } | ||
| + | return false; | ||
| + | } | ||
| + | </ | ||
mr/root_spell.txt · Last modified: by 127.0.0.1
