public void ProcessAction(int skillIndex, long targetID) { Skill s = Engine.CurrentState.ActiveCharacter.Skills[skillIndex]; TargettingInfo info = TargettingInfo.From(Engine.CurrentState.ActivePlayerID, targetID); Engine.ProcessActivePlayerAction(new TargettedSkill(s, info)); CheckForNewLevel(); }
public static TargettingInfo FindBestDamageTarget(GameState state, ItemResolver <Character> c) { Character lowestHealth = state.GetOpponents(c).OrderBy(x => x.Health.Current / (double)x.Health.Max).First(); return(TargettingInfo.From(c.Item.ID, lowestHealth.ID)); }