public override bool CanResolve(ActionCommand cmd) { var target = cmd.Owner.Target.TargetChar != null ? cmd.Owner.Target.TargetChar : cmd.Owner; cmd.CheckHit(_targetDefense, _bonusStat, target); return(true); }
public override bool CanResolve(ActionCommand cmd) { var center = cmd.Owner.Target.GetPositionP3; for (int i = 0; i < _radius; i++) { var pos = center; pos[_axisDirection] += i; var cell = CombatArenaMap.Current.Get(pos); if (cell.Unit == null) { continue; } if (_checkRequirements && !cmd.Action.Config.CanEffect(cmd.Action, cmd.Owner, cell.Unit)) { continue; } cmd.CheckHit(_targetDefense, _bonusStat, cell.Unit); } return(true); }
public override bool CanResolve(ActionCommand cmd) { var center = cmd.Owner.Position; for (int x = 0; x < _radius; x++) { for (int z = 0; z < _radius; z++) { var pos = center + new Point3(x, 0, z); var cell = CombatArenaMap.Current.Get(pos); if (cell.Unit == null || cell.Unit == cmd.Owner) { continue; } if (_checkRequirements && !cmd.Action.Config.CanEffect(cmd.Action, cmd.Owner, cell.Unit)) { continue; } cmd.CheckHit(_targetDefense, _bonusStat, cell.Unit); } } return(true); }