[FSoD] Custom Ability
So basically I wanted an ability similar to the Ninja's ability, but for it to drain HP instead of MP with a few other changes. I pinpointed where the coding for the Ninja's ability was and I tried to alter it to take HP, but because I have no idea how to script I failed miserably. If anybody could give me advice (or the code) on how to do this I'd appreciate it. Here's the Ninja's ability code I found if you need it:
Code:
case ActivateEffects.ShurikenAbility:
{
if (!ninjaShoot)
{
ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Speedy,
DurationMS = -1
});
ninjaFreeTimer = true;
ninjaShoot = true;
}
else
{
ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Speedy,
DurationMS = 0
});
ushort obj;
Manager.GameData.IdToObjectType.TryGetValue(item.ObjectId, out obj);
if (Mp >= item.MpEndCost)
{
ActivateShoot(time, item, pkt.ItemUsePos);
Mp -= (int)item.MpEndCost;
}
targetlink = target;
ninjaShoot = false;
}
}
break;
