mr:wand_of_regrowth_item
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:wand_of_regrowth_item [2026/03/21 13:42] – Wiki standards compliance fixes for randomly selected pages Qwen Assistant | mr:wand_of_regrowth_item [2026/03/21 13:45] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Wand Of Regrowth Item - Code References ====== | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | * '' | ||
| + | * Extends: [[https:// | ||
| + | * Registered in: [[https:// | ||
| + | |||
| + | ===== Java Class Content ===== | ||
| + | <code java> | ||
| + | package com.watabou.pixeldungeon.items.wands; | ||
| + | |||
| + | import com.nyrds.pixeldungeon.ml.R; | ||
| + | import com.nyrds.platform.audio.Sample; | ||
| + | import com.nyrds.platform.util.StringsManager; | ||
| + | import com.watabou.pixeldungeon.Assets; | ||
| + | import com.watabou.pixeldungeon.Dungeon; | ||
| + | import com.watabou.pixeldungeon.actors.Char; | ||
| + | import com.watabou.pixeldungeon.actors.blobs.Blob; | ||
| + | import com.watabou.pixeldungeon.actors.blobs.Regrowth; | ||
| + | import com.watabou.pixeldungeon.effects.MagicMissile; | ||
| + | import com.watabou.pixeldungeon.levels.Level; | ||
| + | import com.watabou.pixeldungeon.levels.Terrain; | ||
| + | import com.watabou.pixeldungeon.mechanics.Ballistica; | ||
| + | import com.watabou.pixeldungeon.scenes.GameScene; | ||
| + | import com.watabou.pixeldungeon.utils.GLog; | ||
| + | import com.watabou.utils.Callback; | ||
| + | |||
| + | public class WandOfRegrowth extends SimpleWand { | ||
| + | |||
| + | @Override | ||
| + | protected void onZap( int cell, Char ch ) { | ||
| + | |||
| + | final Level level = Dungeon.level; | ||
| + | |||
| + | for (int i = 1; i < Ballistica.distance-1; | ||
| + | int p = Ballistica.trace[i]; | ||
| + | int c = level.map[p]; | ||
| + | if (c == Terrain.EMPTY || | ||
| + | c == Terrain.EMBERS || | ||
| + | c == Terrain.EMPTY_DECO) { | ||
| + | |||
| + | level.set( p, Terrain.GRASS ); | ||
| + | |||
| + | } | ||
| + | } | ||
| + | |||
| + | int c = level.map[cell]; | ||
| + | if (c == Terrain.EMPTY || | ||
| + | c == Terrain.EMBERS || | ||
| + | c == Terrain.EMPTY_DECO || | ||
| + | c == Terrain.GRASS || | ||
| + | c == Terrain.HIGH_GRASS) { | ||
| + | |||
| + | GameScene.add( Blob.seed( cell, (effectiveLevel() + 2) * 20, Regrowth.class ) ); | ||
| + | |||
| + | } else { | ||
| + | GLog.i(StringsManager.getVar(R.string.WandOfRegrowth_Info1)); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | protected void fx( int cell, Callback callback ) { | ||
| + | MagicMissile.foliage( getOwner().getSprite().getParent(), | ||
| + | Sample.INSTANCE.play( Assets.SND_ZAP ); | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public String desc() { | ||
| + | return StringsManager.getVar(R.string.WandOfRegrowth_Info); | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Key Mechanics ===== | ||
| + | * **Terrain Conversion: | ||
| + | * **Regrowth Blob:** Seeds regrowth blob with power = (effectiveLevel() + 2) * 20 | ||
| + | * **Visual Effect:** Uses MagicMissile.foliage() for zap animation | ||
| + | * **Sound:** Plays Assets.SND_ZAP on zap | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | No dedicated JSON configuration file found. Wand is implemented entirely in Java. | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | English ('' | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | Russian ('' | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | No Lua script implementation. This wand is implemented entirely in Java. | ||
| + | |||
| + | ===== Related Effects ===== | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | |||
| + | ===== See Also ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
mr/wand_of_regrowth_item.txt · Last modified: (external edit)
