User Tools

Site Tools


mr:self_targeting_spell

Self Targeting Spell - Code References

Java Classes

JSON Configuration

This is a spell targeting type concept, no JSON configuration exists

Lua Scripts

Self-targeted spells are implemented in Lua with `targetingType = “self�`. Examples:

Targeting Type Constants (SpellHelper.java)

public static final String TARGET_SELF          = "self";
public static final String TARGET_CELL          = "cell";
public static final String TARGET_CHAR          = "char";
public static final String TARGET_CHAR_NOT_SELF = "char_not_self";
public static final String TARGET_ALLY          = "ally";
public static final String TARGET_ENEMY         = "enemy";
public static final String TARGET_NONE          = "none";

Self-Targeting Behavior

When `targetingType = “self�`:

  • Spell is cast on the caster directly
  • No target selection UI is shown
  • `CustomSpell.cast(Char chr)` is called (the no-argument version)
  • Lua `cast(self, spell, caster)` function receives only the caster
  • Typical for buffs, self-buffs, and area effects centered on caster

String Resources

Spell-specific strings for self-targeted spells (e.g., Smash):

<string name="SmashSpell_Name">Smash</string>
<string name="SmashSpell_Info">Jump upwards and create a powerful smash upon hitting the ground,that temporarily stuns enemies around and at the same time deals physical damage.</string>
<string name="SmashSpell_NeedWeapon">I need a weapon for this move.</string>

mr/self_targeting_spell.txt · Last modified: by 127.0.0.1