====== Dark Sacrifice Spell - Code References ====== {{ rpd:images:dark_sacrifice_spell.png|Dark Sacrifice Spell }} ===== Lua Script Implementation ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/scripts/spells/DarkSacrifice.lua|DarkSacrifice.lua]] **Script Details:** * File: ''scripts/spells/DarkSacrifice.lua'' * Type: Spell (Necromancy affinity) * Targeting: Character targeting * Level requirement: 3 * Mana cost: 3 * Cast time: 0.5 seconds **Spell Mechanics (from Lua code):** return spell.init{ desc = function () return { image = 1, imageFile = "spellsIcons/necromancy.png", name = "DarkSacrifice_Name", info = "DarkSacrifice_Info", magicAffinity = "Necromancy", targetingType = "char", level = 3, spellCost = 3, castTime = 0.5 } end, castOnChar = function(self, spell, caster, sacrifice) -- Sacrifices a owned minion to create liquid flame explosion -- Explosion damage based on minion HP and caster skill level end } **Behavior:** * Targets a character (must be owned by the caster) * Sacrifices the targeted minion * Creates a Liquid Flame blob at the sacrifice location * Explosion damage scales with: ''sacrifice:hp() * caster:skillLevel()'' * Plays cursed sound effect on successful sacrifice * Shows shadow particle curse effect on sacrifice sprite ===== String Resources ===== **English (values/strings_all.xml):** Dark Sacrifice Sacrifice your loyal minion to cause an explosion. The area covered by the explosion will depend on the remaining health of the servant and your skill level. My life is yours! You have no power over me Choose your loyal servant to sacrifice! **Russian (values-ru/strings_all.xml):** Тёмная жертва Пожертвуйте своим верным прислужником, чтобы вызвать взрыв. Площадь, охваченная взрывом, будет зависеть от оставшегося здоровья слуги и вашего уровня мастерства. Моя жизнь принадлежит тебе! Ты не имеешь власти надо мной Выберите верного слугу для жертвоприношения! **Other Languages:** * German (values-de): ''Dunkle Opferung'' * Ukrainian (values-uk): ''Темна жертва'' * Greek (values-el): ''Σκοτεινή θυσία'' * Indonesian (values-in): ''Pengorbanan Gelap'' ===== Related Code References ===== * Spell base class: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/lib/spell.lua|spell.lua]] * Common classes: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/lib/commonClasses.lua|commonClasses.lua]] * Liquid Flame blob: Used for explosion effect * Sound effect: ''snd_cursed'' * Particle effect: ''RPD.Sfx.ShadowParticle.CURSE'' ===== Game Mechanics References ===== * Magic Affinity: [[en:rpd:spell_affinities#necromancy|Necromancy]] * Spell system: [[en:rpd:spell_system|Spell System]] * Spells overview: [[en:rpd:spells_overview|Spells Overview]] {{tag> mr spell necromancy code-reference lua}}