mr:freeze_globe_spell
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:freeze_globe_spell [2026/02/28 19:47] – Wiki maintenance: Fix image references, update mr: pages, complete fan page Qwen Assistant | mr:freeze_globe_spell [2026/02/28 19:49] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Freeze Globe Spell - Code References ====== | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Class Implementation Details ===== | ||
| + | <code java> | ||
| + | public class FreezeGlobe extends Spell { | ||
| + | FreezeGlobe() { | ||
| + | targetingType = SpellHelper.TARGET_CELL; | ||
| + | magicAffinity = SpellHelper.AFFINITY_ELEMENTAL; | ||
| + | level = 3; | ||
| + | image = 3; | ||
| + | spellCost = 4; | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public boolean cast(@NotNull Char chr, int cell) { | ||
| + | if(!Dungeon.level.cellValid(cell)) { | ||
| + | return false; | ||
| + | } | ||
| + | boolean triggered = false; | ||
| + | if(Ballistica.cast(chr.getPos(), | ||
| + | Char ch = Actor.findChar(cell); | ||
| + | if (ch != null) { | ||
| + | ch.getSprite().emitter().burst(SnowParticle.FACTORY, | ||
| + | ch.getSprite().burst(0xFF99FFFF, | ||
| + | Buff.affect(ch, | ||
| + | Buff.affect(ch, | ||
| + | Sample.INSTANCE.play(Assets.SND_SHATTER); | ||
| + | triggered = true; | ||
| + | } | ||
| + | if(triggered) { | ||
| + | castCallback(chr); | ||
| + | } | ||
| + | return true; | ||
| + | } | ||
| + | return false; | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public String texture() { | ||
| + | return " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Key Properties ===== | ||
| + | * **Targeting Type**: TARGET_CELL (targets a specific cell, not a character) | ||
| + | * **Magic Affinity**: AFFINITY_ELEMENTAL (elemental magic) | ||
| + | * **Spell Level**: 3 (Advanced spell) | ||
| + | * **Image ID**: 3 (sprite index in elemental spells atlas) | ||
| + | * **Spell Cost**: 4 (mana cost to cast) | ||
| + | * **Texture**: | ||
| + | |||
| + | ===== Effects Applied ===== | ||
| + | * **Frost Buff**: Applies Frost.class with Frost.duration(ch) - freezes target in place | ||
| + | * **Slow Buff**: Applies Slow.class with Slow.duration(ch) - reduces movement speed | ||
| + | * **Visual Effects**: | ||
| + | - Snow particle burst (5 particles) | ||
| + | - Light blue color burst (0xFF99FFFF, | ||
| + | * **Sound Effect**: Assets.SND_SHATTER (shattering sound) | ||
| + | |||
| + | ===== Targeting Mechanics ===== | ||
| + | * Uses Ballistica.cast() for path validation | ||
| + | * Requires clear line of sight to target cell | ||
| + | * Only affects characters if present on target cell | ||
| + | * Validates cell through Dungeon.level.cellValid() | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | This entity is implemented in Java, no JSON configuration exists. | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | This entity is implemented in Java, no Lua script exists. | ||
| + | |||
| + | ===== Related Entities ===== | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | |||
| + | ===== Usage in Code ===== | ||
| + | * Registered in Spell system via SpellFactory | ||
| + | * Cast on cells, affects any character occupying that cell | ||
| + | * Requires line of sight validation via Ballistica | ||
| + | * Part of elemental magic spell family | ||
mr/freeze_globe_spell.txt · Last modified: by 127.0.0.1
