blob: bf515062a5d77ab5a7b8c64840aa1d34f6a3fa72 (
plain) (
tree)
|
|
// The Mana World script
// Author: Jesusalva <jesusalva@themanaworld.org>
//
// Magic Script: SKILL_LUM (Level 1)
// School: Life 1
function script SK_Lum {
// In some cases it is... aborted
if (getunittype(@skillTarget) == UNITTYPE_PC) {
.@me=getcharid(3);
.@ok=true;
attachrid(@skillTarget);
// Kill the GM Event
if (isequipped(MagicGMTopHat))
.@ok=false;
// Ailments cannot prevent this one because the Lifestione, so...
// Already dead
if (Hp < 1)
.@ok=false;
// Finished
.@limit=MaxHp-Hp;
detachrid();
attachrid(.@me);
if (!.@ok) return;
} else {
if (getunitdata(@skillTarget, UDT_HP) < 1) return;
.@limit=getunitdata(@skillTarget, UDT_MAXHP)-
getunitdata(@skillTarget, UDT_HP);
}
// No need for healing?
if (.@limit <= 0) return;
// Real healing happens here
.@PW=90+(10*@skillLv);
.@dmg=AdjustSpellpower(.@PW);
sc_start(SC_G_LIFEPOTION, 5000, 1+.@dmg/5, 10000,
SCFLAG_NOAVOID|SCFLAG_FIXEDTICK|SCFLAG_FIXEDRATE, @skillTarget);
// Specifics
if (getskilllv(SKILL_MAGIC_DARK) >= 1)
SC_Bonus(2, SC_BLOODING, 1); // FIXME SC_REBOUND? SC_MAGICMUSHROOM?
// Gives EXP according to how much you healed
getexp min(.@dmg, .@limit)*getskilllv(SKILL_MAGIC_LIFE), .@PW/10;
GetManaExp(@skillId, 1);
return;
}
|