WRFan
07-09-2009, 01:50 AM
I have an idea. Why does a Jedi Master with Light Mastery have to use dark side powers? Why not light side force energy to kill his enemies? So how about turning Death Field into Light Field, dealing Light side damage, similar to the Solari lightsabre crystal? Here's the code that I added to the Death Field script. It turns dark side energy into light side and gives you the force points back so that the power costs the same amount of force points as Master Heal:
int align = GetGoodEvilValue(OBJECT_SELF);
if(align == 100)
{
SWFP_DAMAGE_TYPE = DAMAGE_TYPE_LIGHT_SIDE;
int regainamount = GetSpellForcePointCost()- GetSpellBaseForcePointCost(GetSpellId()) + GetSpellBaseForcePointCost(GetSpellId())/2;
effect oHeal = EffectHealForcePoints( regainamount );
ApplyEffectToObject(DURATION_TYPE_INSTANT, oHeal, OBJECT_SELF);
}
else
{
SWFP_DAMAGE_TYPE = DAMAGE_TYPE_DARK_SIDE;
}
int align = GetGoodEvilValue(OBJECT_SELF);
if(align == 100)
{
SWFP_DAMAGE_TYPE = DAMAGE_TYPE_LIGHT_SIDE;
int regainamount = GetSpellForcePointCost()- GetSpellBaseForcePointCost(GetSpellId()) + GetSpellBaseForcePointCost(GetSpellId())/2;
effect oHeal = EffectHealForcePoints( regainamount );
ApplyEffectToObject(DURATION_TYPE_INSTANT, oHeal, OBJECT_SELF);
}
else
{
SWFP_DAMAGE_TYPE = DAMAGE_TYPE_DARK_SIDE;
}