Skip to content

Commit b00a0fb

Browse files
committed
1 parent bb3fdcf commit b00a0fb

File tree

4 files changed

+33
-18
lines changed

4 files changed

+33
-18
lines changed

application/controllers/Game.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Game extends CI_Controller {
3939
protected $minimum_lands_to_build_embassy = 100;
4040
protected $minimum_lands_to_build_sanctions = 100;
4141
protected $weariness_from_building_sanctions = 100;
42+
protected $weariness_from_removing_building = 5;
4243

4344
// Shared data
4445
protected $effects;
@@ -141,6 +142,7 @@ public function index($world_slug = 1, $marketing_slug = false)
141142
$data['weariness_increase_land_count'] = $this->weariness_increase_land_count;
142143
$data['sniper_land_minimum'] = $this->sniper_land_minimum;
143144
$data['building_minimum'] = $this->building_minimum;
145+
$data['weariness_from_removing_building'] = $this->weariness_from_removing_building;
144146

145147

146148
// Get world leaderboards
@@ -516,6 +518,7 @@ public function land_form()
516518
// Demolish
517519
if ($action_type === 'demolish') {
518520
$this->game_model->remove_modifier_from_land($land_square['id'], abs($form_type), 1);
521+
$this->game_model->add_weariness_to_account($account_key, $this->weariness_from_removing_building);
519522
echo '{"status": "success", "result": true, "land_key": "' . $land_square['id'] . '", "message": "Building Demolished"}';
520523
return true;
521524
}

application/views/blocks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Info tag -->
22
<div id="info_tag">
33
<strong>
4-
<a href="https://www.reddit.com/r/LandGrab/comments/9c6nbg/the_september_bug_fix_and_balance_update/" target="_blank">The September Update</a>
4+
<a href="https://www.reddit.com/r/LandGrab/comments/9g6jqm/rubberband_balance_update/?" target="_blank">The Rubberband Update</a>
55
</strong>
66
</div>
77

application/views/map_script.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,12 @@ function prepare_land_form_more_info(coord_slug, world_key, d) {
609609
var building_count = '';
610610
var removeLink = '';
611611
var removeGlyphicon = '<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>';
612+
613+
614+
if (log_check && d['account_key'] == account_id) {
615+
more_info_string += '<p class="text-warning">Removing a building causes <?php echo $weariness_from_removing_building; ?> weariness</p>';
616+
}
617+
612618
for (var i = 0; i < d['sum_modifiers'].length; i++) {
613619
// Skip if land type
614620
if (d['sum_modifiers'][i]['id'] <= 10 && d['sum_modifiers'][i]['id'] != land_type_key_dictionary['capitol']) {

sql/modify_effect.sql

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
1+
--
2+
-- Truncate old data for table `modify_effect`
3+
--
4+
5+
TRUNCATE TABLE `modify_effect`;
6+
17
--
28
-- Dumping data for table `modify_effect`
39
--
410

511
INSERT INTO `modify_effect` (`id`, `name`, `sort_order`, `is_land_upgrade`, `is_embassy`, `is_sanctions`, `population`, `culture`, `gdp`, `treasury`, `defense`, `military`, `support`, `created`) VALUES
6-
(1, 'unclaimed', 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2016-11-09 06:26:05'),
7-
(2, 'village', 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, '2016-11-09 06:26:51'),
8-
(3, 'town', 2, 1, 0, 0, 100, 0, 10, 0, 2, 0, 0, '2016-11-09 06:27:27'),
9-
(4, 'city', 3, 1, 0, 0, 1000, 3, 100, 0, 3, 0, 0, '2016-11-09 06:27:58'),
10-
(5, 'metropolis', 4, 1, 0, 0, 10000, 10, 1000, 0, 4, 0, 0, '2016-11-09 06:28:34'),
11-
(6, 'fortification', 2, 1, 0, 0, 10, 0, 1, -100, 10, 25, 0, '2016-11-25 02:24:53'),
12-
(10, 'capitol', 5, 1, 0, 0, 1000, 50, 1000, 0, 5, 100, 100, '2016-11-09 06:29:47'),
13-
(11, 'skyscraper', 11, 0, 0, 0, 5000, 1, 200, -250, 0, 0, 0, '2016-11-09 06:45:22'),
14-
(12, 'factory', 10, 0, 0, 0, 0, -1, 80, -100, 0, 120, 0, '2016-11-09 06:45:12'),
15-
(14, 'hospital', 9, 0, 0, 0, 3000, 0, 0, -50, 0, 0, 3, '2016-11-09 06:33:05'),
16-
(15, 'military_base', 8, 0, 0, 0, 0, 0, 0, -300, 0, 600, 5, '2016-11-09 06:34:10'),
17-
(16, 'school', 6, 0, 0, 0, 0, 5, 70, -100, 0, 0, 5, '2016-11-09 06:35:48'),
18-
(17, 'embassy', 50, 0, 1, 0, 1000, 100, 100, 0, 0, 300, 25, '2017-04-29 15:20:18'),
19-
(18, 'stadium', 12, 0, 0, 0, 0, 3, 200, -300, 0, 0, 15, '2017-05-04 07:20:32'),
20-
(19, 'courthouse', 7, 0, 0, 0, 0, 0, 0, -50, 0, 30, 5, '2017-05-04 07:27:41'),
21-
(20, 'park', 15, 0, 0, 0, 0, 20, 0, -50, 0, 0, 2, '2017-05-05 10:46:05'),
22-
(21, 'sanctions', 55, 0, 0, 1, 0, 0, -300, 0, 0, 0, -25, '2018-08-06 22:30:07');
12+
(1, 'unclaimed', 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2016-11-09 11:26:05'),
13+
(2, 'village', 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, '2016-11-09 11:26:51'),
14+
(3, 'town', 2, 1, 0, 0, 100, 0, 10, 0, 2, 0, 0, '2016-11-09 11:27:27'),
15+
(4, 'city', 3, 1, 0, 0, 1000, 3, 100, 0, 3, 0, 0, '2016-11-09 11:27:58'),
16+
(5, 'metropolis', 4, 1, 0, 0, 10000, 10, 1000, 0, 4, 0, 0, '2016-11-09 11:28:34'),
17+
(6, 'fortification', 2, 1, 0, 0, 10, 0, 1, -100, 10, 25, 0, '2016-11-25 07:24:53'),
18+
(10, 'capitol', 5, 1, 0, 0, 1000, 50, 1000, 0, 5, 100, 100, '2016-11-09 11:29:47'),
19+
(11, 'skyscraper', 11, 0, 0, 0, 5000, 0, 100, -250, 0, 0, 0, '2016-11-09 11:45:22'),
20+
(12, 'factory', 10, 0, 0, 0, 0, 0, 80, -100, 0, 150, 0, '2016-11-09 11:45:12'),
21+
(14, 'hospital', 9, 0, 0, 0, 3000, 0, 0, -50, 0, 0, 5, '2016-11-09 11:33:05'),
22+
(15, 'military_base', 8, 0, 0, 0, 0, 0, 0, -300, 0, 800, 5, '2016-11-09 11:34:10'),
23+
(16, 'school', 6, 0, 0, 0, 0, 10, 70, -100, 0, 0, 5, '2016-11-09 11:35:48'),
24+
(17, 'embassy', 50, 0, 1, 0, 1000, 100, 100, 0, 0, 300, 25, '2017-04-29 19:20:18'),
25+
(18, 'stadium', 12, 0, 0, 0, 0, 3, 200, -400, 0, 0, 15, '2017-05-04 11:20:32'),
26+
(19, 'courthouse', 7, 0, 0, 0, 0, 0, 0, -50, 0, 30, 5, '2017-05-04 11:27:41'),
27+
(20, 'park', 15, 0, 0, 0, 0, 20, 0, -50, 0, 0, 2, '2017-05-05 14:46:05'),
28+
(21, 'sanctions', 55, 0, 0, 1, 0, 0, -300, 0, 0, 0, -25, '2018-08-07 02:30:07');

0 commit comments

Comments
 (0)