From e3dd24565bb645eb0319cd94f5f5431025f69a7f Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Mon, 8 Aug 2016 00:44:20 -0600 Subject: [PATCH] Add type damage multipliers --- attackplace.php | 5 +++-- type_grid.php | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 type_grid.php diff --git a/attackplace.php b/attackplace.php index a416b2d..9a50bc1 100644 --- a/attackplace.php +++ b/attackplace.php @@ -16,8 +16,9 @@ if ($place['teamid'] == $user['teamid']) { } // The underwhelming damage formulas :P +require_once 'type_grid.php'; $userdrain = 5 * floor($user['level']); -$damage = 2 * $userdrain; +$damage = 2 * $userdrain * $TYPE_GRID[$user['teamid']][$place['teamid']]; // Check if action possible if ($user['energy'] < $userdrain) { @@ -47,4 +48,4 @@ if ($placehp == 0) { $database->update('locations', ['currentlife' => $placehp], ['locationid' => $VARS['locationid']]); } -sendOK("Success!"); \ No newline at end of file +sendOK("Success!"); diff --git a/type_grid.php b/type_grid.php new file mode 100644 index 0000000..9b2d56d --- /dev/null +++ b/type_grid.php @@ -0,0 +1,16 @@ +