Skip to content

Commit

Permalink
Merge pull request #32 from codebroken/beta
Browse files Browse the repository at this point in the history
Fix not declaring array
  • Loading branch information
codebroken committed May 20, 2015
2 parents 189f793 + 5eb9057 commit 5aed785
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
Binary file modified BrokenBot.exe
Binary file not shown.
16 changes: 8 additions & 8 deletions COCBot/functions/Strategies/Standard/Attack.au3
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ Func Standard_Attack($AttackMethod = 1)
Case 1
$DropX = $FurthestTopLeft[0][0]
$DropY = $FurthestTopLeft[0][1]
$DropArray[5][2]=[[$DropX, $DropY], [0, 0], [0, 0], [0, 0], [$DropX, $DropY]]
Local $DropArray[5][2]=[[$DropX, $DropY], [0, 0], [0, 0], [0, 0], [$DropX, $DropY]]
Case 2
$m = (537 - 238) / (535 - 128)
$m2 = (9 - 314) / (430 - 28)
Expand All @@ -453,11 +453,11 @@ Func Standard_Attack($AttackMethod = 1)
$DropYa = Round($m2 * $DropXa + $b2)
$DropXb = (($b - $b2) / ($m2 - $m)) + 20
$DropYb = Round($m2 * $DropXb + $b2)
$DropArray[5][2]=[[$DropXa, $DropYa], [0, 0], [0, 0], [0, 0], [$DropXb, $DropYb]]
Local $DropArray[5][2]=[[$DropXa, $DropYa], [0, 0], [0, 0], [0, 0], [$DropXb, $DropYb]]
Case 3
$DropX = $FurthestTopLeft[4][0]
$DropY = $FurthestTopLeft[4][1]
$DropArray[5][2]=[[$DropX, $DropY], [0, 0], [0, 0], [0, 0], [$DropX, $DropY]]
Local $DropArray[5][2]=[[$DropX, $DropY], [0, 0], [0, 0], [0, 0], [$DropX, $DropY]]
Case 4
$m = (85 - 388) / (527 - 130)
$m2 = (612 - 314) / (440 - 28)
Expand All @@ -467,7 +467,7 @@ Func Standard_Attack($AttackMethod = 1)
$DropYa = Round($m2 * $DropXa + $b2)
$DropXb = (($b - $b2) / ($m2 - $m)) + 20
$DropYb = Round($m2 * $DropXb + $b2)
$DropArray[5][2]=[[$DropXa, $DropYa], [0, 0], [0, 0], [0, 0], [$DropXb, $DropYb]]
Local $DropArray[5][2]=[[$DropXa, $DropYa], [0, 0], [0, 0], [0, 0], [$DropXb, $DropYb]]
Case 6
$m = (85 - 388) / (527 - 130)
$m2 = (612 - 314) / (440 - 28)
Expand All @@ -477,11 +477,11 @@ Func Standard_Attack($AttackMethod = 1)
$DropYa = Round($m2 * $DropXa + $b2)
$DropXb = (($b - $b2) / ($m2 - $m)) + 20
$DropYb = Round($m2 * $DropXb + $b2)
$DropArray[5][2]=[[$DropXa, $DropYa], [0, 0], [0, 0], [0, 0], [$DropXb, $DropYb]]
Local $DropArray[5][2]=[[$DropXa, $DropYa], [0, 0], [0, 0], [0, 0], [$DropXb, $DropYb]]
Case 7
$DropX = Round(($FurthestBottomRight[4][0] - $FurthestBottomRight[0][0]) / 4) + $FurthestBottomRight[0][0]
$DropY = Round(($FurthestBottomRight[4][1] - $FurthestBottomRight[0][1]) / 4) + $FurthestBottomRight[0][1]
$DropArray[5][2]=[[$DropX, $DropY], [0, 0], [0, 0], [0, 0], [$DropX, $DropY]]
Local $DropArray[5][2]=[[$DropX, $DropY], [0, 0], [0, 0], [0, 0], [$DropX, $DropY]]
Case 8
$m = (537 - 238) / (535 - 128)
$m2 = (9 - 314) / (430 - 28)
Expand All @@ -491,11 +491,11 @@ Func Standard_Attack($AttackMethod = 1)
$DropYa = Round($m2 * $DropXa + $b2)
$DropXb = (($b - $b2) / ($m2 - $m)) + 20
$DropYb = Round($m2 * $DropXb + $b2)
$DropArray[5][2]=[[$DropXa, $DropYa], [0, 0], [0, 0], [0, 0], [$DropXb, $DropYb]]
Local $DropArray[5][2]=[[$DropXa, $DropYa], [0, 0], [0, 0], [0, 0], [$DropXb, $DropYb]]
Case 9
$DropX = $FurthestBottomRight[4][0]
$DropY = $FurthestBottomRight[4][1]
$DropArray[5][2]=[[$DropX, $DropY], [0, 0], [0, 0], [0, 0], [$DropX, $DropY]]
Local $DropArray[5][2]=[[$DropX, $DropY], [0, 0], [0, 0], [0, 0], [$DropX, $DropY]]
EndSwitch
Standard_dropCC($DropArray, $CC, $AttackMethod, $AimTH)
If _Sleep(100) Then Return
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# BrokenBot.org - Clash of Clans Bot
Latest version: 2.5.8
Latest version: 2.5.9

## Community
Forums available for discussion at: http://brokenbot.org/
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Change Log:

### v2.5.9
* Emergency fix for occasional crash

### v2.5.8
* Additional randomization for deployment of troops and deploy timing
* Removed "randomize" check box, it was terrible method of randomization. You are now always somewhat randomized, but you can modify the average delay by adjusting the unit delay and wave delay
Expand Down

0 comments on commit 5aed785

Please sign in to comment.