Example #1
0
 internal void AttemptBreach(Hackable toHack)
 {
     if (!hasUsedAction && GetBreach() > 0 && !toHack.IsHacked())
     {
         int breachRange = 1;
         if (GetKeywords().Contains("Remote"))
         {
             breachRange = GetRange();
         }
         List <DungeonTile> tempPath = DungeonManager.instance.grid.FindPath(myTile, toHack.myTile, breachRange, true);
         if (tempPath[tempPath.Count - 1] == toHack.myTile)
         {
             Breach newBreach = Instantiate(myBreach, gameObject.transform.position, Quaternion.identity).GetComponent <Breach>();
             newBreach.breach = GetBreach();
             newBreach.SetCourse(tempPath, toHack);
             Program.isTargetingBreach = false;
             movesLeft     = 0;
             hasUsedAction = true;
         }
     }
 }