Skip to content

Commit

Permalink
Auto Attack
Browse files Browse the repository at this point in the history
  • Loading branch information
betairylia committed Jul 6, 2023
1 parent aa46106 commit c7a8178
Show file tree
Hide file tree
Showing 175 changed files with 122,454 additions and 83,053 deletions.
70 changes: 35 additions & 35 deletions .idea/.idea.miniRAID-HD2D/.idea/workspace.xml

Large diffs are not rendered by default.

108 changes: 0 additions & 108 deletions Assets/AddressableAssetsData/link.xml

This file was deleted.

17 changes: 17 additions & 0 deletions Assets/Databackend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ public static float GetHealth(int lvl, float VIT)
return lvl * 2 + VIT * 4;
}

public static float HealerSelfFocusThresholdHPPercentage = 0.4f;
public static float HealerSelfFocusPriorityBoost = 1.5f;

public enum UnitGroup
{
Player = 0,
Expand Down Expand Up @@ -1052,6 +1055,20 @@ public void RegisterState(BackendState state)
allStates.Add(state);
}

public void AimOnTarget(MobData targetMob)
{
// TODO: Enemy?
var mobs = Globals.backend.allMobs.Where(x => x.unitGroup == Consts.UnitGroup.Player);
SpellTarget target = new SpellTarget(targetMob.Position);
foreach (MobData mob in mobs)
{
if (mob.mainWeapon?.GetRegularAttackSpell()?.data.CheckWithTargets(mob, target) ?? false)
{
mob.lastTurnTarget = targetMob;
}
}
}

#endregion
}
}
Loading

0 comments on commit c7a8178

Please sign in to comment.