Hello everyone , i am trying to make the skill WarCry to be based on Battle Power and not on Steed (+) or Lineage and i have edited the skill but is stil not working like i want to could anyone look into what i have edited and to help with an ( idea , answer or something to guide me trough this ) .
Here is the skill .
Here is the skill .
Code:
#region WarCry
case 7003:
{//WarCry
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
ConquerItem attackedSteed = null, attackerSteed = null;
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null)
continue;
if (_obj.MapObjType == MapObjectType.Player && _obj.UID != attacker.UID)
{
attacked = _obj as Entity;
if ((attackedSteed = attacked.Owner.Equipment.TryGetItem(ConquerItem.St eed)) != null)
{
if ((attackerSteed = attacker.Owner.Equipment.TryGetItem(ConquerItem.St eed)) != null)
{
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= attackedSteed.Plus)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
suse.AddTarget(attacked.UID, 0, attack);
if (attacked.BattlePower < attacker.BattlePower)
attacked.RemoveFlag(Update.Flags.Ride);
else if (attacked.BattlePower == attacker.BattlePower)
attacked.RemoveFlag(Update.Flags.Ride);
else
suse.Targets[attacked.UID].Hit = false;
}
}
}
}
}
}
attacker.Owner.SendScreen(suse, true);
break;
}
#endregion