diff --git a/config.php b/config.php
index 28c05fe..a5f9e71 100644
--- a/config.php
+++ b/config.php
@@ -10,7 +10,7 @@ $dbsettings = Array(
// These are used for display purposes only. Technically you could change them, but it's not going to
// do anything special. And I'd prefer if you didn't, just to keep things all nice and standardized.
-$version = "1.0.1";
+$version = "1.0.2";
$build = "";
?>
\ No newline at end of file
diff --git a/fight.php b/fight.php
index 1fe141a..63659cc 100644
--- a/fight.php
+++ b/fight.php
@@ -73,10 +73,10 @@ function fight() { // One big long function that determines the outcome of the f
}
}
if ($userrow["currentmonstersleep"] == 0) { // Only do this if the monster is awake.
- $tohit = ceil(rand($monsterrow["maxdam"],(($monsterrow["maxdam"]/6)*3)));
+ $tohit = ceil(rand((($monsterrow["maxdam"]/6)*3),$monsterrow["maxdam"]));
if ($userrow["difficulty"] == 2) { $tohit = ceil($tohit * $controlrow["diff2mod"]); }
if ($userrow["difficulty"] == 3) { $tohit = ceil($tohit * $controlrow["diff3mod"]); }
- $toblock = ceil(rand($userrow["defensepower"],$userrow["defensepower"]*.75)/4);
+ $toblock = ceil(rand($userrow["defensepower"]*.75,$userrow["defensepower"])/4);
$tododge = rand(1,150);
if ($tododge <= sqrt($userrow["dexterity"])) {
$tohit = 0; $pagearray["monsterturn"] .= "You dodge the monster's attack. No damage has been scored.
";
@@ -235,10 +235,10 @@ function fight() { // One big long function that determines the outcome of the f
}
}
if ($userrow["currentmonstersleep"] == 0) { // Only do this if the monster is awake.
- $tohit = ceil(rand($monsterrow["maxdam"],(($monsterrow["maxdam"]/6)*3)));
+ $tohit = ceil(rand((($monsterrow["maxdam"]/6)*3)),$monsterrow["maxdam"]);
if ($userrow["difficulty"] == 2) { $tohit = ceil($tohit * $controlrow["diff2mod"]); }
if ($userrow["difficulty"] == 3) { $tohit = ceil($tohit * $controlrow["diff3mod"]); }
- $toblock = ceil(rand($userrow["defensepower"],$userrow["defensepower"]*.75)/4);
+ $toblock = ceil(rand($userrow["defensepower"]*.75,$userrow["defensepower"])/4);
$tododge = rand(1,150);
if ($tododge <= sqrt($userrow["dexterity"])) {
$tohit = 0; $pagearray["monsterturn"] .= "You dodge the monster's attack. No damage has been scored.
";
diff --git a/install.php b/install.php
index 3263419..a8d0665 100644
--- a/install.php
+++ b/install.php
@@ -15,10 +15,7 @@ if (isset($_GET["page"])) {
} else { first(); }
// Thanks to Predrag Supurovic from php.net for this function!
-function dobatch ($p_query, $p_transaction_safe = true) {
- if ($p_transaction_safe) {
- $p_query = 'START TRANSACTION;' . $p_query . '; COMMIT;';
- };
+function dobatch ($p_query) {
$query_split = preg_split ("/[;]+/", $p_query);
foreach ($query_split as $command_line) {
$command_line = trim($command_line);
diff --git a/lib.php b/lib.php
index 5508d56..9090482 100644
--- a/lib.php
+++ b/lib.php
@@ -1,11 +1,15 @@