mr:frost_arrow_item
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| mr:frost_arrow_item [2025/12/25 18:23] – auto lint fix Mikhael | mr:frost_arrow_item [2025/12/29 00:20] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Frost Arrow Item - Machine Readable Data ====== | ||
| + | This page contains raw code fragments, configuration excerpts, and string resource references for the Frost Arrow item. | ||
| + | |||
| + | ==== Java Implementation (FrostArrow.java) ==== | ||
| + | ``` | ||
| + | package com.watabou.pixeldungeon.items.weapon.missiles; | ||
| + | |||
| + | import com.watabou.pixeldungeon.actors.Char; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Buff; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Slow; | ||
| + | |||
| + | public class FrostArrow extends Arrow { | ||
| + | |||
| + | public static final float DURATION = 5f; | ||
| + | |||
| + | public FrostArrow() { | ||
| + | this( 1 ); | ||
| + | } | ||
| + | |||
| + | public FrostArrow( int number ) { | ||
| + | super(); | ||
| + | quantity(number); | ||
| + | |||
| + | baseMin = 0; | ||
| + | baseMax = 6; | ||
| + | baseDly = 0.75; | ||
| + | |||
| + | image = FROST_ARROW_IMAGE; | ||
| + | |||
| + | updateStatsForInfo(); | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public int price() { | ||
| + | return quantity() * 5; | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public void attackProc(Char attacker, Char defender, int damage ) { | ||
| + | if(activateSpecial(attacker, | ||
| + | Buff.prolong( defender, Slow.class, DURATION ); | ||
| + | } | ||
| + | super.attackProc( attacker, defender, damage ); | ||
| + | } | ||
| + | } | ||
| + | ``` | ||
| + | |||
| + | ==== Base Class Implementation (Arrow.java) ==== | ||
| + | ``` | ||
| + | // From Arrow.java base class | ||
| + | public static final int FROST_ARROW_IMAGE = 6; | ||
| + | |||
| + | // Image definition | ||
| + | case FROST_ARROW_IMAGE: | ||
| + | image = ItemSpriteSheet.AMMO; | ||
| + | index = FROST_ARROW_IMAGE; | ||
| + | break; | ||
| + | ``` | ||
| + | |||
| + | ==== String Resources (English) ==== | ||
| + | ``` | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | ``` | ||
| + | |||
| + | ==== String Resources (Russian) ==== | ||
| + | ``` | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | ``` | ||
| + | |||
| + | ==== Related Code Files ==== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | {{tag> mr frost arrow item code }} | ||
