project-meteor-server/FFXIVClassic Map Server/actors/chara/ai/utils/BattleUtils.cs
Tahir Akhlaq 11bbb023d9 abilities now use correct animation id (<3 azia)
- did stuff with magicstate/attackstate
- fixed status effect tick
- added regen status (todo: actually populate the table and use that name instead of enum's)
- added baseStats to char (todo: add bonuses and stuff on top of those, set charaWork values to the calculated ones + bonus)
2017-08-25 03:52:43 +01:00

34 lines
1023 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FFXIVClassic_Map_Server.Actors;
namespace FFXIVClassic_Map_Server.actors.chara.ai.utils
{
static class BattleUtils
{
public static void DamageTarget(Character attacker, Character defender, int damage)
{
// todo: other stuff too
if (defender is BattleNpc)
{
if (!((BattleNpc)defender).hateContainer.HasHateForTarget(attacker))
{
((BattleNpc)defender).hateContainer.AddBaseHate(attacker);
}
((BattleNpc)defender).hateContainer.UpdateHate(attacker, damage);
}
defender.DelHP((short)damage);
}
public static int CalculateSpellDamage(Character attacker, Character defender, Ability spell)
{
// todo: spell formulas and stuff (stoneskin, mods, stats, etc)
return 69;
}
}
}