Yes, that is important information. With this, everyone will have this cross. I used the ShootAction
because movement isn’t exactly ‘kill’. Anyway, the easiest would be to create a new ShootAction
and put that one on the players in that one team, instead of the existing ShootAction
. But you don’t have to redo everything. You can have a derived ShootAction
that will only have the changed stuff. You’d need to change GetValidActionGridPositionList
to be virtual
public virtual List<GridPosition> GetValidActionGridPositionList(GridPosition unitGridPosition)
{
// ... all the original code
}
Then create a new derived shoot action and override that method
public class CrossShootAction : ShootAction
{
public override List<GridPosition> GetValidActionGridPositionList(GridPosition unitGridPosition)
{
// ... all the original code, but with the 'ignored diagonals' code included
}
}
This new action should behave the same as the old one, but will not allow diagonal shooting. Replace the ShootAction
on the relevant units with this new one