mr:dash_spell
Differences
This shows you the differences between two versions of the page.
| mr:dash_spell [2025/12/24 21:03] – Update Dash spell page with comprehensive code references mike | mr:dash_spell [2025/12/24 21:11] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Dash Spell - Code References ====== | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | This entity is implemented in Lua and does not have a Java class implementation. | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | This entity does not use JSON configuration. | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | ''< | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | ''</ | ||
| + | |||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | ''< | ||
| + | local RPD = require " | ||
| + | |||
| + | local spell = require " | ||
| + | |||
| + | return spell.init{ | ||
| + | desc = function () | ||
| + | return { | ||
| + | image = 2, | ||
| + | imageFile | ||
| + | name = " | ||
| + | info = " | ||
| + | magicAffinity = " | ||
| + | targetingType = " | ||
| + | level = 3, | ||
| + | spellCost | ||
| + | cooldown | ||
| + | castTime | ||
| + | } | ||
| + | end, | ||
| + | castOnCell = function(self, | ||
| + | |||
| + | local level = caster: | ||
| + | |||
| + | local ownPos = caster: | ||
| + | |||
| + | local dist = level: | ||
| + | |||
| + | caster: | ||
| + | |||
| + | if ownPos == cell then | ||
| + | RPD.glogn(" | ||
| + | return false | ||
| + | end | ||
| + | |||
| + | if dist > 2 then | ||
| + | RPD.glogn(" | ||
| + | return false | ||
| + | end | ||
| + | |||
| + | local dst = RPD.Ballistica: | ||
| + | |||
| + | local char = RPD.Actor: | ||
| + | |||
| + | if char and char ~= caster then | ||
| + | RPD.affectBuff(char, | ||
| + | local newPos = char: | ||
| + | if char: | ||
| + | dst = newPos | ||
| + | else | ||
| + | dst = level: | ||
| + | end | ||
| + | end | ||
| + | |||
| + | if not level: | ||
| + | return true | ||
| + | end | ||
| + | |||
| + | local object = level: | ||
| + | |||
| + | if object then | ||
| + | local newPos = object: | ||
| + | if object: | ||
| + | dst = newPos | ||
| + | else | ||
| + | dst = level: | ||
| + | end | ||
| + | end | ||
| + | |||
| + | if not level: | ||
| + | return true | ||
| + | end | ||
| + | |||
| + | local items = caster: | ||
| + | |||
| + | local function hitCell(cell) | ||
| + | local victim = RPD.Actor: | ||
| + | if victim and victim ~= caster then | ||
| + | local dmg = caster: | ||
| + | if items.weapon then | ||
| + | dmg = dmg + items.weapon: | ||
| + | end | ||
| + | dmg = victim: | ||
| + | victim: | ||
| + | RPD.Sfx.Wound: | ||
| + | end | ||
| + | end | ||
| + | |||
| + | RPD.forCellsAround(dst, | ||
| + | |||
| + | RPD.playSound(" | ||
| + | RPD.zapEffect(ownPos, | ||
| + | caster: | ||
| + | caster: | ||
| + | |||
| + | return true | ||
| + | end | ||
| + | } | ||
| + | ''</ | ||
| + | |||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Related Code References ===== | ||
| + | * [[https:// | ||
mr/dash_spell.txt · Last modified: (external edit)
