====== Raise Dead Spell - Code References ====== {{ rpd:images:raise_dead_spell.png|Raise Dead Spell }} ===== Overview ===== Raise Dead is a necromancy spell that summons the spirit of the most recently killed hostile mob as a temporary pet. ===== Java Classes ===== This entity is implemented in Lua, no Java class exists for this spell. ===== JSON Configuration ===== This entity is implemented in Lua, no JSON configuration exists for this spell. ===== String Resources ===== Raise Dead Attempt to raise the latest (Ritual requires quite a fresh material) slain creature. When using this dark art, remember: almost any creature can be raised, but not everyone's will is easy to bend. Raise Dead failed because there is no free space nearby. You need to kill someone before attempting to raise it. Поднять мертвеца Попытка поднять недавно (Ритуал требует только свежайший материал) убитое существо. При использовании этого темного искусства не забывайте: почти любое существо можно поднять из мертвых, но далеко не всех можно подчинить своей воле. Вам нужно сначала убить кого-то, прежде чем пытаться оживить его труп. Поднятие мертвеца не удалось потому что здесь нет свобдного места. ===== Lua Scripts ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/spells/RaiseDead.lua|RaiseDead.lua]] - Main spell implementation * Uses `scripts/lib/storage.lua` for tracking latest killed mob * Uses `scripts/lib/mob.lua` for mob manipulation * Uses `scripts/lib/spell.lua` for spell base functionality ===== Implementation Details ===== * **Spell Level:** 4 * **Magic Affinity:** Necromancy * **Cast Time:** 3 turns * **Spell Cost:** 15 mana * **Targeting Type:** none (self-cast) * **Storage Key:** __latest_dead_mob (stores the last killed mob that can be a pet) ===== Code Mechanics ===== * Uses storage system to track the latest killed mob that can become a pet * Only mobs that ''canBePet()'' and are not MirrorImage can be raised * Raised mobs become undead and are converted to pets * Requires valid cell position near the caster * Applies shadow particle curse effects on both caster and raised mob * Plays cursed sound effect on successful cast * Strips all items from raised mob before converting to pet * Uses ''mob:loot()'' to potentially drop gold from raised mob ===== Related mr Entities ===== * [[mr:necromancer_class|Necromancer (Class)]] * [[mr:exhumation_spell|Exhumation (Spell)]] * [[mr:dark_sacrifice_spell|Dark Sacrifice (Spell)]] {{tag> rpd spells necromancy mr}}