Prechádzať zdrojové kódy

Changed armors, guns, and shields.

  Now they are armor, gun, and shield.

  The points are still plural...
  armorpoints, shieldpoints, and hitpoints.

  Also fixed the display issue with the build_menu()
david 4 rokov pred
rodič
commit
af5d2c39d2
1 zmenil súbory, kde vykonal 105 pridanie a 107 odobranie
  1. 105 107
      main.c

+ 105 - 107
main.c

@@ -51,11 +51,11 @@ typedef struct user_info {
   int uid; // Primary Key
   int experience; // Think about this as score
   // Was ship structure, now is part of user
-  int guns; // Placed Guns, More means more damage (Deals from 1-2 damage per attack)
+  int gun; // Placed Guns, More means more damage (Deals from 1-2 damage per attack)
   int fuel; // How many "turns" do we have
   int metal; // Used to build more guns/armors/shields possibly fuel too (guns take 5, armor takes 3, shields take 7, maybe fuel takes 12)
-  int armors; // Placed Armors (Each Armor takes 4 points of damage then breaks off)
-  int shields; // Placed Shields (Each Shields takes 3 points of damage then is offline, regenerates 1 point per attack/turn must reach 50% of max to being protecting again)
+  int armor; // Placed Armors (Each Armor takes 4 points of damage then breaks off)
+  int shield; // Placed Shields (Each Shields takes 3 points of damage then is offline, regenerates 1 point per attack/turn must reach 50% of max to being protecting again)
   int hitpoints; // Total hitpoints till we die (Rules for taking damage, shields first then armor then hitpoints)
   int armorpoints; // Points we get from armors (Repairable but costs 1 metal per point, but can break if taking too much damage)
   int shieldpoints; // Points we get from shields (Self-Regenerates, and does not get destroyed)
@@ -177,11 +177,11 @@ int db_test() {
       sqlite3_column_int(stmt, 4),
       sqlite3_column_name(stmt, 5), // int,  fuel
       sqlite3_column_int(stmt, 5),
-      sqlite3_column_name(stmt, 6), // int,  guns
+      sqlite3_column_name(stmt, 6), // int,  gun
       sqlite3_column_int(stmt, 6),
-      sqlite3_column_name(stmt, 7), // int,  armors
+      sqlite3_column_name(stmt, 7), // int,  armor
       sqlite3_column_int(stmt, 7),
-      sqlite3_column_name(stmt, 8), // int,  shields
+      sqlite3_column_name(stmt, 8), // int,  shield
       sqlite3_column_int(stmt, 8),
       sqlite3_column_name(stmt, 9), // int,  armorpoints
       sqlite3_column_int(stmt, 9),
@@ -338,7 +338,7 @@ void check_database() {
   } else {
     // Bad, Create table
     char *errmsg;
-    rc = sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS \"user\" (`uid`	INTEGER PRIMARY KEY AUTOINCREMENT,`nick`	TEXT,`real`	TEXT,`experience`	INTEGER,`metal`	INTEGER,`fuel`	INTEGER,`guns`	INTEGER,`armors`	INTEGER,`shields`	INTEGER,`armorpoints`	INTEGER,`shieldpoints`	INTEGER,`hitpoints`	INTEGER,`shieldsup`	INTEGER,`laston`	INTEGER);", NULL, NULL, &errmsg);
+    rc = sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS \"user\" (`uid`	INTEGER PRIMARY KEY AUTOINCREMENT,`nick`	TEXT,`real`	TEXT,`experience`	INTEGER,`metal`	INTEGER,`fuel`	INTEGER,`gun`	INTEGER,`armor`	INTEGER,`shield`	INTEGER,`armorpoints`	INTEGER,`shieldpoints`	INTEGER,`hitpoints`	INTEGER,`shieldsup`	INTEGER,`laston`	INTEGER);", NULL, NULL, &errmsg);
     dolog("W: Users table did not exist created with %d", rc);
   }
   sqlite3_finalize(stmt);
@@ -369,9 +369,9 @@ user_inf load_player(int uuid) {
     result.experience = sqlite3_column_int(stmt, 3);
     result.metal = sqlite3_column_int(stmt, 4);
     result.fuel = sqlite3_column_int(stmt, 5);
-    result.guns = sqlite3_column_int(stmt, 6);
-    result.armors = sqlite3_column_int(stmt, 7);
-    result.shields = sqlite3_column_int(stmt, 8);
+    result.gun = sqlite3_column_int(stmt, 6);
+    result.armor = sqlite3_column_int(stmt, 7);
+    result.shield = sqlite3_column_int(stmt, 8);
     result.armorpoints = sqlite3_column_int(stmt, 9);
     result.shieldpoints = sqlite3_column_int(stmt, 10);
     result.hitpoints = sqlite3_column_int(stmt, 11);
@@ -427,16 +427,16 @@ void update_player(user_inf data) {
   // Bad, don't do this... opens to SQL injection!
   //snprintf(sqlbuffer, 1024, "UPDATE user SET nick = '%s', experience = %d, metal = %d, fuel = %d, guns = %d, armors = %d, shields = %d, armorpoints = %d, shieldpoints = %d, hitpoints = %d WHERE uid=%d;",
   //  data.nick, data.experience, data.metal, data.fuel, data.guns, data.armors, data.shields, data.armorpoints, data.shieldpoints, data.hitpoints, data.uid);
-  strcpy(sqlbuffer, "UPDATE user SET nick=?, experience=?, metal=?, fuel=?, guns=?, armors=?, shields=?, armorpoints=?, shieldpoints=?, hitpoints=?, shieldsup=?, laston=? WHERE uid=?;");
+  strcpy(sqlbuffer, "UPDATE user SET nick=?, experience=?, metal=?, fuel=?, gun=?, armor=?, shield=?, armorpoints=?, shieldpoints=?, hitpoints=?, shieldsup=?, laston=? WHERE uid=?;");
   sqlite3_prepare_v2(db, sqlbuffer, strlen(sqlbuffer) + 1, &stmt, NULL);
   // Bind All data values
   sqlite3_bind_text(stmt, 1, data.nick, strlen(data.nick), SQLITE_STATIC);
   sqlite3_bind_int(stmt, 2, data.experience);
   sqlite3_bind_int(stmt, 3, data.metal);
   sqlite3_bind_int(stmt, 4, data.fuel);
-  sqlite3_bind_int(stmt, 5, data.guns);
-  sqlite3_bind_int(stmt, 6, data.armors);
-  sqlite3_bind_int(stmt, 7, data.shields);
+  sqlite3_bind_int(stmt, 5, data.gun);
+  sqlite3_bind_int(stmt, 6, data.armor);
+  sqlite3_bind_int(stmt, 7, data.shield);
   sqlite3_bind_int(stmt, 8, data.armorpoints);
   sqlite3_bind_int(stmt, 9, data.shieldpoints);
   sqlite3_bind_int(stmt, 10, data.hitpoints);
@@ -466,16 +466,16 @@ int create_player(user_inf data) {
     od_exit(-1, FALSE);
   }
   sqlite3_busy_timeout(db, 5000);
-  strcpy(sqlbuffer, "INSERT INTO user (nick, real, experience, metal, fuel, guns, armors, shields, armorpoints, shieldpoints, hitpoints, shieldsup, laston) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
+  strcpy(sqlbuffer, "INSERT INTO user (nick, real, experience, metal, fuel, gun, armor, shield, armorpoints, shieldpoints, hitpoints, shieldsup, laston) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
   sqlite3_prepare_v2(db, sqlbuffer, strlen(sqlbuffer) + 1, &stmt, NULL);
   sqlite3_bind_text(stmt, 1, data.nick, strlen(data.nick), SQLITE_STATIC);
   sqlite3_bind_text(stmt, 2, data.real, strlen(data.real), SQLITE_STATIC);
   sqlite3_bind_int(stmt, 3, data.experience);
   sqlite3_bind_int(stmt, 4, data.metal);
   sqlite3_bind_int(stmt, 5, data.fuel);
-  sqlite3_bind_int(stmt, 6, data.guns);
-  sqlite3_bind_int(stmt, 7, data.armors);
-  sqlite3_bind_int(stmt, 8, data.shields);
+  sqlite3_bind_int(stmt, 6, data.gun);
+  sqlite3_bind_int(stmt, 7, data.armor);
+  sqlite3_bind_int(stmt, 8, data.shield);
   sqlite3_bind_int(stmt, 9, data.armorpoints);
   sqlite3_bind_int(stmt, 10, data.shieldpoints);
   sqlite3_bind_int(stmt, 11, data.hitpoints);
@@ -493,7 +493,7 @@ int create_player(user_inf data) {
   return 1; // Good
 }
 
-// Removed due to fact it throws off the internal id system
+// Removed due to fact it throws off the internal id system, won't be able to list players
 /*void delete_player(int uuid) {
   sqlite3 *db;
   sqlite3_stmt *stmt;
@@ -619,45 +619,45 @@ user_inf build_menu(user_inf my) {
       od_send_file("ansis/sc_build.ans");
       // Paint over sc_build.ans file
       od_set_cursor(3, 15);
-      od_printf("%5d", (4 * (my.guns + 1)));
+      od_printf("%5d", (4 * (my.gun + 1)));
       od_set_cursor(4, 15);
-      od_printf("%5d", (3 * (my.armors + 1)));
+      od_printf("%5d", (3 * (my.armor + 1)));
       od_set_cursor(5, 15);
-      od_printf("%5d", (6 * (my.shields + 1)));
-      od_set_cursor(9, 0);
+      od_printf("%5d", (6 * (my.shield + 1)));
+      od_set_cursor(9, 1);
       // Resuming normal operations
       od_printf("`bright yellow`You have %8d metal\r\n", my.metal);
       ch = od_get_answer("GgAaSsCcRr\r");
       switch(tolower(ch)) {
         case 'g':
-          if(my.metal >= (4 * (my.guns + 1))) {
-            my.metal -= (4 * (my.guns + 1));
-            my.guns += 1;
+          if(my.metal >= (4 * (my.gun + 1))) {
+            my.metal -= (4 * (my.gun + 1));
+            my.gun += 1;
             my.hitpoints += 1;
             od_printf("`bright green`Added a new gun!\r\n`white`");
             paws();
           } else {
-            od_printf("`bright red`You don't have the %d metal for this!\r\n`white`", (4 * (my.guns + 1)));
+            od_printf("`bright red`You don't have the %d metal for this!\r\n`white`", (4 * (my.gun + 1)));
             paws();
           }
           break;
         case 'a':
-          if(my.metal >= (3 * (my.armors + 1))) {
-            my.metal -= (3 * (my.armors + 1));
-            my.armors += 1;
+          if(my.metal >= (3 * (my.armor + 1))) {
+            my.metal -= (3 * (my.armor + 1));
+            my.armor += 1;
             my.hitpoints += 1;
             my.armorpoints += 8;
             od_printf("`bright green`Added a new armor!\r\n`white`");
             paws();
           } else {
-            od_printf("`bright red`You don't have the %d metal for this!\r\n`white`", (3 * (my.armors + 1)));
+            od_printf("`bright red`You don't have the %d metal for this!\r\n`white`", (3 * (my.armor + 1)));
             paws();
           }
           break;
         case 's':
-          if(my.metal >= (6 * (my.shields + 1))) {
-            my.metal -= (6 * (my.shields + 1));
-            my.shields += 1;
+          if(my.metal >= (6 * (my.shield + 1))) {
+            my.metal -= (6 * (my.shield + 1));
+            my.shield += 1;
             my.hitpoints += 1;
             if(my.shieldsup == 0) {
               my.shieldpoints += 3;
@@ -667,7 +667,7 @@ user_inf build_menu(user_inf my) {
             od_printf("`bright green`Added a new shield!\r\n`white`");
             paws();
           } else {
-            od_printf("`bright red`You don't have the %d metal for this!\r\n`white`", (6 * (my.shields + 1)));
+            od_printf("`bright red`You don't have the %d metal for this!\r\n`white`", (6 * (my.shield + 1)));
             paws();
           }
           break;
@@ -706,11 +706,11 @@ void pvp_menu(user_inf my, user_inf targ) {
   int playerWon = 0;
   char ch;
   // Extract temp values, assume offline player is at their best
-  int temp_hp = (targ.shields + targ.armors + targ.guns + 2);
-  int temp_ap = (targ.armors * 8);
-  int temp_sp = (targ.shields * 3);
+  int temp_hp = (targ.shield + targ.armor + targ.gun + 2);
+  int temp_ap = (targ.armor * 8);
+  int temp_sp = (targ.shield * 3);
   int temp_su = 0;
-  int temp_dmg = (targ.guns + 1); // Add 1 additional point of damage for offline player
+  int temp_dmg = (targ.gun + 1); // Add 1 additional point of damage for offline player
   // Prep Combat values
   int fire = 0;  // Fire Guns
   int flee = 0;  // Run away
@@ -727,14 +727,14 @@ void pvp_menu(user_inf my, user_inf targ) {
     }
 
     // Process Crew repairing hitpoints
-    if(temp_hp < (targ.shields + targ.armors + targ.guns + 2)) {
+    if(temp_hp < (targ.shield + targ.armor + targ.gun + 2)) {
       regen = rand() % 100;
       if(regen >= 85) { // 15%, offline get a bonus 5% on repairing hull.
         temp_hp += 1;
         od_printf("`bright green`%s`green`'s crew repaired their hull for 1 point!\r\n", targ.nick);
       }
     }
-    if(my.hitpoints < (my.shields + my.armors + my.guns + 2)) {
+    if(my.hitpoints < (my.shield + my.armor + my.gun + 2)) {
       regen = rand() % 100;
       if(regen >= 90) { // 10%
         my.hitpoints += 1;
@@ -744,24 +744,24 @@ void pvp_menu(user_inf my, user_inf targ) {
     
   // Process Shields regenerating and display player stats
   if(temp_su == 0) {
-    if(temp_sp < (targ.shields * 3)) {
+    if(temp_sp < (targ.shield * 3)) {
       regen = rand() % 100;
       if(regen >= 65) { // 35%, offline bonus
-        temp_sp += targ.shields;
-        if(temp_sp > (targ.shields * 3)) {
-          temp_sp = (targ.shields * 3);
+        temp_sp += targ.shield;
+        if(temp_sp > (targ.shield * 3)) {
+          temp_sp = (targ.shield * 3);
         }
-        od_printf("`bright green`%s`green`'s shields regenerate %d points!\r\n", targ.nick, targ.shields);
+        od_printf("`bright green`%s`green`'s shields regenerate %d points!\r\n", targ.nick, targ.shield);
       }
     }
     od_printf("`bright white`%s has `bright cyan`%d`bright white` shields, %d armor and %d hitpoints left\r\n", targ.nick, temp_sp, temp_ap, temp_hp);
   } else {
-    if(temp_sp < (targ.shields * 3)) {
+    if(temp_sp < (targ.shield * 3)) {
       regen = rand() % 100;
       if(regen >= 65) { // 35%, offline bonus
         temp_sp += 1;
-        if(temp_sp > (targ.shields * 3)) {
-          temp_sp = (targ.shields * 3);
+        if(temp_sp > (targ.shield * 3)) {
+          temp_sp = (targ.shield * 3);
         }
         od_printf("`bright green`%s`green`'s shields regenerate 1 points!\r\n", targ.nick);
       }
@@ -770,24 +770,24 @@ void pvp_menu(user_inf my, user_inf targ) {
   }
   // Online Players Shields
   if(my.shieldsup == 0) {
-    if(my.shieldpoints < (my.shields * 3)) {
+    if(my.shieldpoints < (my.shield * 3)) {
       regen = rand() % 100;
       if(regen >= 70) { // 30%
-        my.shieldpoints += my.shields;
-        if(my.shieldpoints > (my.shields * 3)) {
-          my.shieldpoints = (my.shields * 3);
+        my.shieldpoints += my.shield;
+        if(my.shieldpoints > (my.shield * 3)) {
+          my.shieldpoints = (my.shield * 3);
         }
-        od_printf("`bright green`Your shields regenerate %d points!\r\n", my.shields);
+        od_printf("`bright green`Your shields regenerate %d points!\r\n", my.shield);
       }
     }
     od_printf("`bright white`Your ship has `bright cyan`%d`bright white` shields, %d armor and %d hitpoints left:\r\n", my.shieldpoints, my.armorpoints, my.hitpoints);
   } else {
-    if(my.shieldpoints < (my.shields * 3)) {
+    if(my.shieldpoints < (my.shield * 3)) {
       regen = rand() % 100;
       if(regen >= 70) { // 30%
         my.shieldpoints += 1;
-        if(my.shieldpoints > (my.shields * 3)) {
-          my.shieldpoints = (my.shields * 3);
+        if(my.shieldpoints > (my.shield * 3)) {
+          my.shieldpoints = (my.shield * 3);
         }
         od_printf("`bright green`Your shields regenerate 1 points!\r\n");
       }
@@ -803,12 +803,12 @@ void pvp_menu(user_inf my, user_inf targ) {
     case '\r':
     case 'a':
       fire = rand() % 100;
-      temp = my.guns;
+      temp = my.gun;
       if(fire >= 50) {
         // Proccess online dealing damage to offline
         if(temp_su == 0 && temp_sp != 0) {
           if(temp >= temp_sp) {
-            temp_su = (targ.shields + 2);
+            temp_su = (targ.shield + 2);
             temp -= temp_sp;
             temp_sp = 0;
             od_printf("`bright cyan`%s's shields absorbed %d damage and went offline!\r\n", targ.nick, temp_dmg);
@@ -872,7 +872,7 @@ void pvp_menu(user_inf my, user_inf targ) {
       if(my.shieldsup == 0 && my.shieldpoints != 0) {
           if(temp >= my.shieldpoints) {
             // Damage will lower shields!
-            my.shieldsup = (my.shields + 2);
+            my.shieldsup = (my.shield + 2);
             temp -= my.shieldpoints;
             my.shieldpoints = 0;
             od_printf("`bright cyan`Shields absorbed %d damage and went offline!\r\n`white`", temp_dmg);
@@ -959,9 +959,9 @@ void pvp_menu(user_inf my, user_inf targ) {
         my.armorpoints = 8;
         my.shieldpoints = 0;
         my.shieldsup = 0;
-        my.armors = 1;
-        my.shields = 0;
-        my.guns = 1;
+        my.armor = 1;
+        my.shield = 0;
+        my.gun = 1;
         break;
       case 3:
         my.fuel -= 4;
@@ -998,37 +998,37 @@ user_inf combat_menu(user_inf my, int targ_hp, int targ_dmg, int asteroid) {
       my.shieldsup -= 1;
     }
     // Proccess Crew repairing hull
-    if(my.hitpoints < (my.guns + my.armors + my.shields + 2)) {
+    if(my.hitpoints < (my.gun + my.armor + my.shield + 2)) {
       regen = rand() % 100;
       if(regen >= 90) {
         my.hitpoints += 1;
-        if(my.hitpoints > (my.guns + my.armors + my.shields + 2)) {
-          my.hitpoints = (my.guns + my.armors + my.shields + 2);
+        if(my.hitpoints > (my.gun + my.armor + my.shield + 2)) {
+          my.hitpoints = (my.gun + my.armor + my.shield + 2);
         }
         od_printf("`bright green`Your crew repaired your hull for 1 point!\r\n");
       }
     }
     if(my.shieldsup == 0) {
       // Proccess Shield Regeneration
-      if(my.shieldpoints < (my.shields * 3)) {
+      if(my.shieldpoints < (my.shield * 3)) {
         regen = rand() % 100;
         if(regen >= 70) {
-          my.shieldpoints += my.shields;
-          if(my.shieldpoints > (my.shields * 3)) {
-            my.shieldpoints = (my.shields * 3);
+          my.shieldpoints += my.shield;
+          if(my.shieldpoints > (my.shield * 3)) {
+            my.shieldpoints = (my.shield * 3);
           }
-          od_printf("`bright green`Your shields regenerate %d points!\r\n", my.shields);
+          od_printf("`bright green`Your shields regenerate %d points!\r\n", my.shield);
         }
       }
       od_printf("`bright white`Your ship has `bright cyan`%d`bright white` shields, %d armor and %d hitpoints left:\r\n", my.shieldpoints, my.armorpoints, my.hitpoints);
     } else {
       // Shields should still regenerate some
-      if(my.shieldpoints < (my.shields * 3)) {
+      if(my.shieldpoints < (my.shield * 3)) {
         regen = rand() % 100;
         if(regen >= 70) {
           my.shieldpoints += 1;
-          if(my.shieldpoints > (my.shields * 3)) {
-            my.shieldpoints = (my.shields * 3);
+          if(my.shieldpoints > (my.shield * 3)) {
+            my.shieldpoints = (my.shield * 3);
           }
           od_printf("`bright green`Your shields regenerate 1 points!\r\n");
         }
@@ -1037,7 +1037,7 @@ user_inf combat_menu(user_inf my, int targ_hp, int targ_dmg, int asteroid) {
     }
     // Forming Combat Menu
     od_printf("`bright black`(`bright white`A`bright black`)`white`ttack\r\n");
-    if(my.armorpoints < (my.armors * 8)) {
+    if(my.armorpoints < (my.armor * 8)) {
       od_printf("`bright black`(`bright white`R`bright black`)`white`epair Armor\r\n");
       armorRep = 1; // Yes we can repair armor
     }
@@ -1052,13 +1052,13 @@ user_inf combat_menu(user_inf my, int targ_hp, int targ_dmg, int asteroid) {
           fire += 15;
         }
         if(fire >= 50) {
-          targ_hp -= my.guns;
+          targ_hp -= my.gun;
           if(targ_hp <= 0) {
             od_printf("`bright red`Target Destroyed!\r\n");
             done = 1;
             playerWon = 1;
           } else {
-            od_printf("`bright red`Target took %d damage!\r\n", my.guns);
+            od_printf("`bright red`Target took %d damage!\r\n", my.gun);
           }
         } else {
           od_printf("`white`You Missed!\r\n");
@@ -1069,8 +1069,8 @@ user_inf combat_menu(user_inf my, int targ_hp, int targ_dmg, int asteroid) {
           if(my.metal > 0) {
             my.metal -= 1;
             my.armorpoints += 2;
-            if(my.armorpoints < (my.armors * 8)) {
-              my.armorpoints = (my.armors * 8);
+            if(my.armorpoints < (my.armor * 8)) {
+              my.armorpoints = (my.armor * 8);
             }
             od_printf("`bright green`Repaired 2 Armor points!\r\n");
           } else {
@@ -1109,7 +1109,7 @@ user_inf combat_menu(user_inf my, int targ_hp, int targ_dmg, int asteroid) {
         if(my.shieldsup == 0 && my.shieldpoints != 0) {
           if(temp >= my.shieldpoints) {
             // Damage will lower shields!
-            my.shieldsup = (my.shields + 2);
+            my.shieldsup = (my.shield + 2);
             temp -= my.shieldpoints;
             my.shieldpoints = 0;
             od_printf("`bright cyan`Shields absorbed %d damage and went offline!\r\n`white`", targ_dmg);
@@ -1198,9 +1198,9 @@ user_inf combat_menu(user_inf my, int targ_hp, int targ_dmg, int asteroid) {
         my.armorpoints = 8;
         my.shieldpoints = 0;
         my.shieldsup = 0;
-        my.armors = 1;
-        my.shields = 0;
-        my.guns = 1;
+        my.armor = 1;
+        my.shield = 0;
+        my.gun = 1;
       } else if(playerWon == 3) {
         // Chicken!
         my.fuel -= 1;
@@ -1214,8 +1214,6 @@ user_inf combat_menu(user_inf my, int targ_hp, int targ_dmg, int asteroid) {
 void about_game() {
   int done = 0;
   int page = 1;
-  char p[12];
-  char targ[256];
   while(!done) {
     switch(page) {
       case 1:
@@ -1289,7 +1287,7 @@ void play_game() {
     od_printf("`bright white`Welcome back `bright green`%s\r\n", myself.nick);
     dT age = fromDate(compareDate(myself.laston));
     dolog("%s is now playing (G=%d A=%d S=%d F=%d M=%d AP=%d SP=%d (%d) HP=%d LO=%d or %d days)",
-      myself.nick, myself.guns, myself.armors, myself.shields, myself.fuel, myself.metal, myself.armorpoints, 
+      myself.nick, myself.gun, myself.armor, myself.shield, myself.fuel, myself.metal, myself.armorpoints, 
       myself.shieldpoints, myself.shieldsup, myself.hitpoints, myself.laston, age.age);
     myself.laston = dateStamp();
     if(age.day != 0 || age.month != 0 || age.year != 0) {
@@ -1354,9 +1352,9 @@ void play_game() {
             myself.experience = 0;
             myself.metal = 0;
             myself.fuel = 10;
-            myself.guns = 1;
-            myself.armors = 1;
-            myself.shields = 0;
+            myself.gun = 1;
+            myself.armor = 1;
+            myself.shield = 0;
             myself.armorpoints = 8;
             myself.shieldpoints = 0;
             myself.hitpoints = 4;
@@ -1370,9 +1368,9 @@ void play_game() {
             myself2.experience = 0;
             myself2.metal = 0;
             myself2.fuel = 10;
-            myself2.guns = 1;
-            myself2.armors = 1;
-            myself2.shields = 0;
+            myself2.gun = 1;
+            myself2.armor = 1;
+            myself2.shield = 0;
             myself2.armorpoints = 8;
             myself2.shieldpoints = 0;
             myself2.hitpoints = 4;
@@ -1396,10 +1394,10 @@ void play_game() {
       } else {
         od_printf("`bright yellow`Your ship has %d armor, `bright cyan`%d`bright yellow` shields and %d hitpoints left:\r\n", myself.armorpoints, myself.shieldpoints, myself.hitpoints);
       }
-      if(myself.armorpoints < (myself.armors * 8)) {
+      if(myself.armorpoints < (myself.armor * 8)) {
         od_printf("`bright black`(`bright white`R`bright black`)`white`epair Armor\r\n");
       }
-      if(myself.shieldpoints < (myself.shields * 3) || myself.shieldsup != 0) {
+      if(myself.shieldpoints < (myself.shield * 3) || myself.shieldsup != 0) {
         od_printf("`bright black`(`bright white`G`bright black`)`white`enerate Shields\r\n");
       }
       if(myself.fuel >= 2) {
@@ -1510,12 +1508,12 @@ void play_game() {
           done = 1;
           break;
         case 'r':
-          if(myself.armorpoints < (myself.armors * 8)) {
+          if(myself.armorpoints < (myself.armor * 8)) {
             if(myself.metal > 0) {
               myself.metal -= 1;
               myself.armorpoints += 4;
-              if(myself.armorpoints > (myself.armors * 8)) {
-                myself.armorpoints = (myself.armors * 8);
+              if(myself.armorpoints > (myself.armor * 8)) {
+                myself.armorpoints = (myself.armor * 8);
               }
               update_player(myself);
               od_printf("`bright green`Repaired 4 Armor Points!\r\n`white`");
@@ -1527,14 +1525,14 @@ void play_game() {
           }
           break;
         case 'g':
-          if(myself.shieldpoints < (myself.shields * 3) || myself.shieldsup != 0) {
-            myself.shieldpoints += myself.shields;
+          if(myself.shieldpoints < (myself.shield * 3) || myself.shieldsup != 0) {
+            myself.shieldpoints += myself.shield;
             myself.shieldsup -= 1;
             if(myself.shieldsup < 0) {
               myself.shieldsup = 0;
             }
-            if(myself.shieldpoints > (myself.shields * 3)) {
-              myself.shieldpoints = (myself.shields * 3);
+            if(myself.shieldpoints > (myself.shield * 3)) {
+              myself.shieldpoints = (myself.shield * 3);
             }
             update_player(myself);
             od_printf("`bright green`Regenerated Shields!\r\n`white`");
@@ -1545,14 +1543,14 @@ void play_game() {
         case 'v':
           od_printf("`bright white` ___ %s's Ship Status ___\r\n", myself.nick);
           od_printf("`bright white`Items:       # Installed:   Metal to Upgrade:\r\n");
-          od_printf("`bright red`Guns:           %8d            %8d\r\n", myself.guns, (4 * (myself.guns + 1)));
-          od_printf("`bright yellow`Armor:          %8d            %8d\r\n", myself.armors, (3 * (myself.armors + 1)));
-          od_printf("`bright cyan`Shields:        %8d            %8d\r\n", myself.shields, (6 * (myself.shields + 1)));
+          od_printf("`bright red`Guns:           %8d            %8d\r\n", myself.gun, (4 * (myself.gun + 1)));
+          od_printf("`bright yellow`Armor:          %8d            %8d\r\n", myself.armor, (3 * (myself.armor + 1)));
+          od_printf("`bright cyan`Shields:        %8d            %8d\r\n", myself.shield, (6 * (myself.shield + 1)));
           od_printf("`bright white`\r\n ___ Situation Report ___\r\n");
           od_printf("`bright white`Items:       Maximum:    Current:\r\n");
-          od_printf("`bright green`Hitpoints:  %8d    %8d\r\n", (myself.guns + myself.armors + myself.shields + 2), myself.hitpoints);
-          od_printf("`bright yellow`Armor:      %8d    %8d\r\n", (myself.armors * 8), myself.armorpoints);
-          od_printf("`bright cyan`Shields:    %8d    %8d\r\n", (myself.shields * 3), myself.shieldpoints);
+          od_printf("`bright green`Hitpoints:  %8d    %8d\r\n", (myself.gun + myself.armor + myself.shield + 2), myself.hitpoints);
+          od_printf("`bright yellow`Armor:      %8d    %8d\r\n", (myself.armor * 8), myself.armorpoints);
+          od_printf("`bright cyan`Shields:    %8d    %8d\r\n", (myself.shield * 3), myself.shieldpoints);
           od_printf("`bright magenta`Experience:             %8d\r\n", myself.experience);
           od_printf("`bright magenta`Fuel:                   %8d\r\n", myself.fuel);
           od_printf("`white`Metal:                  %8d\r\n", myself.metal);