From 12bbcb7f2310a8d48b519e6ddd8098dd984f096c Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Tue, 5 Jul 2011 22:28:46 -0400 Subject: [PATCH] Made some tweaks to game balance --- TODO | 1 + gamevertex.cpp | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index b5497fb..78bf6f3 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,6 @@ Some things that need doing: +* Defenders should add to armor score, attackers to attack score, producers boost each other's energy production... all scaled by distance on the graph * Display energy costs... * OpenGL, of course... can we start with a rendering in the corner? * Better art! diff --git a/gamevertex.cpp b/gamevertex.cpp index 129fbd1..0f6ee16 100644 --- a/gamevertex.cpp +++ b/gamevertex.cpp @@ -13,19 +13,18 @@ GameVertex::GameVertex(int x, int y, int z, int r, int colour, int score, float GameVertex::calculate_armor() { - float str = calculate_strength(); - float armor; + float armor = calculate_strength(); switch(type) { case VERTEX_ATTACKER: - armor = str / 10; + armor *= 0.2; break; case VERTEX_DEFENDER: - armor = str / 5; + armor *= 0.5; break; case VERTEX_PRODUCER: - armor = str / 40; + armor *= 0.1; break; } @@ -41,10 +40,10 @@ float GameVertex::calculate_attack() switch (type) { case VERTEX_ATTACKER: - attack *= 1.5; + attack *= 1.25; break; case VERTEX_DEFENDER: - attack /= 0.75; + attack *= 0.1; break; case VERTEX_PRODUCER: attack = 0;