Tweak place code and response messages
This commit is contained in:
parent
2b2df9947d
commit
affc1d863b
@ -52,7 +52,7 @@ $damage = pow(floor($user['level']), 0.5) * 4 * $type_mod * $terrain_mod * $weat
|
|||||||
//$damage = 2 * $userdrain * $TYPE_GRID[$user['teamid']][$place['teamid']];
|
//$damage = 2 * $userdrain * $TYPE_GRID[$user['teamid']][$place['teamid']];
|
||||||
// Check if action possible
|
// Check if action possible
|
||||||
if ($user['energy'] < $userdrain) {
|
if ($user['energy'] < $userdrain) {
|
||||||
sendError("Not enough life left!", true);
|
sendError("No life left!", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resulting user HP
|
// Calculate resulting user HP
|
||||||
|
@ -25,7 +25,7 @@ $userdrain = 5 * floor($user['level']);
|
|||||||
$userhp = $user['energy'] - $userdrain;
|
$userhp = $user['energy'] - $userdrain;
|
||||||
// Check if action possible
|
// Check if action possible
|
||||||
if ($userhp < 0) {
|
if ($userhp < 0) {
|
||||||
sendError("Not enough life left!", true);
|
sendError("No life left!", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the user's health and level
|
// Update the user's health and level
|
||||||
|
@ -19,13 +19,13 @@ if ($place['currentlife'] == 100) {
|
|||||||
sendError("Full!", true);
|
sendError("Full!", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$userdrain = 5 * floor($user['level']);
|
$userdrain = 2 * floor($user['level']);
|
||||||
|
|
||||||
// Calculate resulting user HP
|
// Calculate resulting user HP
|
||||||
$userhp = $user['energy'] - $userdrain;
|
$userhp = $user['energy'] - $userdrain;
|
||||||
// Check if action possible
|
// Check if action possible
|
||||||
if ($userhp < 0) {
|
if ($userhp < 0) {
|
||||||
sendError("No life!", true);
|
sendError("No life left!", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the user's health and level
|
// Update the user's health and level
|
||||||
|
Reference in New Issue
Block a user