diff -Nur -Xno.freeciv test/configure.in work/configure.in --- test/configure.in Tue Jul 20 06:49:00 1999 +++ work/configure.in Tue Jul 20 15:01:25 1999 @@ -280,6 +280,7 @@ data/Makefile data/default/Makefile data/civ1/Makefile + data/civ2/Makefile data/trident/Makefile common/Makefile ai/Makefile diff -Nur -Xno.freeciv test/data/Makefile.am work/data/Makefile.am --- test/data/Makefile.am Tue Jul 20 15:09:45 1999 +++ work/data/Makefile.am Tue Jul 20 14:35:26 1999 @@ -7,9 +7,10 @@ earth-160x90.sav\ europe.sav \ civ1.serv \ + civ2.serv \ intro.xpm \ radar.xpm EXTRA_DIST = $(pkgdata_DATA) -SUBDIRS = default civ1 trident +SUBDIRS = default civ1 civ2 trident diff -Nur -Xno.freeciv test/data/civ2/Makefile.am work/data/civ2/Makefile.am --- test/data/civ2/Makefile.am Thu Jan 1 01:00:00 1970 +++ work/data/civ2/Makefile.am Tue Jul 20 14:08:11 1999 @@ -0,0 +1,10 @@ +## Process this file with automake to produce Makefile.in + +## Override automake so that "make install" puts these in proper place: +pkgdatadir = $(datadir)/@PACKAGE@/civ2 + +pkgdata_DATA = \ + techs.ruleset \ + buildings.ruleset + +EXTRA_DIST = $(pkgdata_DATA) diff -Nur -Xno.freeciv test/data/civ2/buildings.ruleset work/data/civ2/buildings.ruleset --- test/data/civ2/buildings.ruleset Thu Jan 1 01:00:00 1970 +++ work/data/civ2/buildings.ruleset Tue Jul 20 14:28:47 1999 @@ -0,0 +1,124 @@ + +; Modifying this file: +; You shouldn't modify this file except to make bugfixes or +; for other "maintenance". If you want to make custom changes, +; you should create a new datadir subdirectory and copy this file +; into that directory, and then modify that copy. Then use the +; command "set buildings " in the server to have freeciv +; use your new customized file. + +; Note that the freeciv AI may not cope well with anything more +; than minor changes, including non-default variants. + +[datafile] +description="Default buildings data for Freeciv (as Civ2, minus a few)" +options="1.7" + +[buildings] + +; Buildings table: (City Improvements and Wonders) +; should be kept as close as possible to original +; hard-wired version, since the effects are still hardwired. +; Must keep the same number of entries. +; Special tech_required value: "Never" +; Special obsolete_by value: "None" +; Variant: controls hardwired effects options, unique to each +; building; 0 means default effect. + +b={ "name", "is_wonder", "tech_requirement", "build_cost", "shield_upkeep", "variant", "obsolete_by" + +; City Improvements: +; Name, is_wonder, tech_required, bcost, upk, var, obsolete_by: + +"Airport", 0, "Radio", 160, 3, 0, "None" +"Aqueduct", 0, "Construction", 80, 2, 0, "None" +"Bank", 0, "Banking", 120, 3, 0, "None" +"Barracks", 0, "None", 40, 1, 0, "Gunpowder" +"Barracks II", 0, "Gunpowder", 40, 1, 0, "Mobile Warfare" +"Barracks III", 0, "Mobile Warfare", 40, 1, 0, "None" +"Cathedral", 0, "Monotheism", 120, 3, 0, "None" +"City Walls", 0, "Masonry", 80, 0, 0, "None" +"Coastal Defense", 0, "Metallurgy", 80, 1, 0, "None" +"Colosseum", 0, "Construction", 100, 4, 0, "None" +"Courthouse", 0, "Code of Laws", 80, 1, 0, "None" +"Factory", 0, "Industrialization", 200, 4, 0, "None" +"Granary", 0, "Pottery", 60, 1, 0, "None" +"Harbour", 0, "Seafaring", 60, 1, 0, "None" +"Hydro Plant", 0, "Electronics", 240, 4, 0, "None" +"Library", 0, "Writing", 80, 1, 0, "None" +"Marketplace", 0, "Currency", 80, 1, 0, "None" +"Mass Transit", 0, "Mass Production", 160, 4, 0, "None" +"Mfg. Plant", 0, "Robotics", 320, 6, 0, "None" +"Nuclear Plant", 0, "Nuclear Power", 160, 2, 0, "None" +"Offshore Platform", 0, "Miniaturization", 160, 3, 0, "None" +"Palace", 0, "Masonry", 100, 0, 0, "None" +"Police Station", 0, "Communism", 60, 2, 0, "None" +"Port Facility", 0, "Amphibious Warfare", 80, 3, 0, "None" +"Power Plant", 0, "Refining", 160, 4, 0, "None" +"Recycling Center", 0, "Recycling", 200, 2, 0, "None" +"Research Lab", 0, "Computers", 160, 3, 0, "None" +"SAM Battery", 0, "Rocketry", 100, 2, 0, "None" +"SDI Defense", 0, "Laser", 200, 4, 0, "None" +"Sewer System", 0, "Sanitation", 120, 2, 0, "None" +"Solar Plant", 0, "Environmentalism", 320, 4, 0, "None" + +"Space Component", 0, "Plastics", 160, 0, 0, "None" +"Space Module", 0, "Superconductors", 320, 0, 0, "None" +"Space Structural", 0, "Space Flight", 80, 0, 0, "None" + +"Stock Exchange", 0, "Economics", 160, 4, 0, "None" +"Super Highways", 0, "Automobile", 160, 3, 0, "None" +"Supermarket", 0, "Refrigeration", 120, 3, 0, "None" +"Temple", 0, "Ceremonial Burial", 40, 1, 0, "None" +"University", 0, "University", 160, 3, 0, "None" + +; Wonders: +; Name, is_wonder, tech_required, bcost, upk, var, obsolete_by: + +"Apollo Program", 1, "Space Flight", 600, 0, 0, "None" +"A.Smith's Trading Co.", 1, "Economics", 400, 0, 0, "None" +"Colossus", 1, "Bronze Working", 200, 0, 0, "Flight" +"Copernicus' Observatory", 1, "Astronomy", 300, 0, 0, "None" +"Cure For Cancer", 1, "Genetic Engineering", 600, 0, 0, "None" +"Darwin's Voyage", 1, "Railroad", 300, 0, 0, "None" +"Eiffel Tower", 1, "Never", 300, 0, 0, "None" +"Great Library", 1, "Literacy", 300, 0, 0, "Electricity" +"Great Wall", 1, "Masonry", 300, 0, 0, "Metallurgy" +"Hanging Gardens", 1, "Pottery", 200, 0, 0, "Railroad" +"Hoover Dam", 1, "Electronics", 600, 0, 0, "None" +"Isaac Newton's College", 1, "Theory of Gravity", 400, 0, 0, "None" +"J.S. Bach's Cathedral", 1, "Theology", 400, 0, 0, "None" +"King Richard's Crusade", 1, "Engineering", 300, 0, 0, "Industrialization" +"Leonardo's Workshop", 1, "Invention", 400, 0, 0, "Automobile" +"Lighthouse", 1, "Map Making", 200, 0, 0, "Magnetism" +"Magellan's Expedition", 1, "Navigation", 400, 0, 0, "None" +"Manhattan Project", 1, "Nuclear Fission", 600, 0, 0, "None" +"Marco Polo's Embassy", 1, "Trade", 200, 0, 0, "Communism" +"Michelangelo's Chapel", 1, "Monotheism", 400, 0, 0, "None" +"Oracle", 1, "Mysticism", 300, 0, 0, "Theology" +"Pyramids", 1, "Masonry", 200, 0, 0, "None" +"SETI Program", 1, "Computers", 600, 0, 0, "None" +"Shakespeare's Theatre", 1, "Medicine", 300, 0, 0, "None" +"Statue of Liberty", 1, "Democracy", 400, 0, 0, "None" +"Sun Tzu's War Academy", 1, "Feudalism", 300, 0, 0, "Mobile Warfare" +"United Nations", 1, "Communism", 600, 0, 0, "None" +"Women's Suffrage", 1, "Industrialization", 600, 0, 0, "None" + +; Special: +; Name, is_wonder, tech_required, bcost, upk, var, obsolete_by: +"Capitalization", 0, "The Corporation", 999, 0, 0, "None" + +} + +[b_special] + +; Special values: + +aqueduct_size=8; +sewer_size=12; + +; Techs which modify building effects: + +cathedral_plus="Theology" +cathedral_minus="Communism" +colosseum_plus="Electricity" diff -Nur -Xno.freeciv test/data/civ2/techs.ruleset work/data/civ2/techs.ruleset --- test/data/civ2/techs.ruleset Thu Jan 1 01:00:00 1970 +++ work/data/civ2/techs.ruleset Tue Jul 20 14:28:35 1999 @@ -0,0 +1,124 @@ + +; Modifying this file: +; You shouldn't modify this file except to make bugfixes or +; for other "maintenance". If you want to make custom changes, +; you should create a new datadir subdirectory and copy this file +; into that directory, and then modify that copy. Then use the +; command "set techs " in the server to have freeciv +; use your new customized file. + +[datafile] +description="Default technology data for Freeciv (as Civ2, minus a few)" +options="1.7" + +[advances] + +; Advances table: should be kept as close as possible to +; original hard-wired version, since some other parts of +; freeciv are still hardwired. +; Must keep the same number of entries. +; Special value: "Never" + +a={ "name", "req1", "req2" + +; Don't change the first line below! + +"None", "None", "None" +"Advanced Flight", "Radio", "Machine Tools" +"Alphabet", "None", "None" +"Amphibious Warfare", "Navigation", "Tactics" +"Astronomy", "Mysticism", "Mathematics" +"Atomic Theory", "Theory of Gravity", "Physics" +"Automobile", "Combustion", "Steel" +"Banking", "Trade", "The Republic" +"Bridge Building", "Iron Working", "Construction" +"Bronze Working", "None", "None" +"Ceremonial Burial", "None", "None" +"Chemistry", "University", "Medicine" +"Chivalry", "Feudalism", "Horseback Riding" +"Code of Laws", "Alphabet", "None" +"Combined Arms", "Mobile Warfare", "Advanced Flight" +"Combustion", "Refining", "Explosives" +"Communism", "Philosophy", "Industrialization" +"Computers", "Mass Production", "Miniaturization" +"Conscription", "Democracy", "Metallurgy" +"Construction", "Masonry", "Currency" +"Currency", "Bronze Working", "None" +"Democracy", "Banking", "Invention" +"Economics", "Banking", "University" +"Electricity", "Metallurgy", "Magnetism" +"Electronics", "The Corporation", "Electricity" +"Engineering", "The Wheel", "Construction" +"Environmentalism", "Recycling", "Space Flight" +"Espionage", "Communism", "Democracy" +"Explosives", "Gunpowder", "Chemistry" +"Feudalism", "Warrior Code", "Monarchy" +"Flight", "Combustion", "Theory of Gravity" +"Fundamentalism", "Never", "Never" +; "Fundamentalism", "Theology", "Conscription" +"Fusion Power", "Nuclear Power", "Superconductors" +"Genetic Engineering", "Medicine", "The Corporation" +"Guerilla Warfare", "Communism", "Tactics" +"Gunpowder", "Invention", "Iron Working" +"Horseback Riding", "None", "None" +"Industrialization", "Railroad", "Banking" +"Invention", "Engineering", "Literacy" +"Iron Working", "Bronze Working", "Warrior Code" +"Labor Union", "Mass Production", "Guerilla Warfare" +"Laser", "Mass Production", "Nuclear Power" +"Leadership", "Chivalry", "Gunpowder" +"Literacy", "Writing", "Code of Laws" +"Machine Tools", "Steel", "Tactics" +"Magnetism", "Iron Working", "Physics" +"Map Making", "Alphabet", "None" +"Masonry", "None", "None" +"Mass Production", "Automobile", "The Corporation" +"Mathematics", "Alphabet", "Masonry" +"Medicine", "Philosophy", "Trade" +"Metallurgy", "Gunpowder", "University" +"Miniaturization", "Machine Tools", "Electronics" +"Mobile Warfare", "Automobile", "Tactics" +"Monarchy", "Ceremonial Burial", "Code of Laws" +"Monotheism", "Philosophy", "Polytheism" +"Mysticism", "Ceremonial Burial", "None" +"Navigation", "Seafaring", "Astronomy" +"Nuclear Fission", "Mass Production", "Atomic Theory" +"Nuclear Power", "Nuclear Fission", "Electronics" +"Philosophy", "Mysticism", "Literacy" +"Physics", "Literacy", "Navigation" +"Plastics", "Refining", "Space Flight" +"Polytheism", "Horseback Riding", "Ceremonial Burial" +"Pottery", "None", "None" +"Radio", "Flight", "Electricity" +"Railroad", "Steam Engine", "Bridge Building" +"Recycling", "Mass Production", "Democracy" +"Refining", "Chemistry", "The Corporation" +"Refrigeration", "Sanitation", "Electricity" +"Robotics", "Mobile Warfare", "Computers" +"Rocketry", "Advanced Flight", "Electronics" +"Sanitation", "Engineering", "Medicine" +"Seafaring", "Pottery", "Map Making" +"Space Flight", "Computers", "Rocketry" +"Stealth", "Superconductors", "Robotics" +"Steam Engine", "Physics", "Invention" +"Steel", "Electricity", "Industrialization" +"Superconductors", "Nuclear Power", "Laser" +"Tactics", "Conscription", "Leadership" +"The Corporation", "Economics", "Industrialization" +"The Republic", "Code of Laws", "Literacy" +"The Wheel", "Horseback Riding", "None" +"Theology", "Feudalism", "Monotheism" +"Theory of Gravity", "Astronomy", "University" +"Trade", "Currency", "Code of Laws" +"University", "Mathematics", "Philosophy" +"Warrior Code", "None", "None" +"Writing", "Alphabet", "None" + +} + +[a_special] + +; Advances which have a direct effect in the game + +bonus_tech="Philosophy" ; extra tech to first to research +boat_fast="Nuclear Power" ; extra move point to ships diff -Nur -Xno.freeciv test/data/civ2.serv work/data/civ2.serv --- test/data/civ2.serv Thu Jan 1 01:00:00 1970 +++ work/data/civ2.serv Tue Jul 20 14:13:25 1999 @@ -0,0 +1,10 @@ +# Server commands to make rules similar to Civ2. +# +# Use this as, eg, "./ser -r data/civ2.serv" +# +# Minor civ2 rules: +set civstyle 2 +# +# Rulesets: +set techs civ2 +set buildings civ2 diff -Nur -Xno.freeciv test/data/helpdata.txt work/data/helpdata.txt --- test/data/helpdata.txt Tue Jul 20 15:09:45 1999 +++ work/data/helpdata.txt Tue Jul 20 14:12:00 1999 @@ -823,7 +823,11 @@ %% Allows a city to grow beyond size 12. --- # Solar Plant -This improvement has not been implemented. +Increases Factory/Mfg. Plant output by 50%, and eliminates all +pollution caused by production. Helps prevent global warming by +absorbing atmospheric heat. + +Only enabled by default in the civ2 ruleset. --- # Space Component Space Components can be differentiated into Propulsion and Fuel diff -Nur -Xno.freeciv test/server/citytools.c work/server/citytools.c --- test/server/citytools.c Tue Jul 20 15:09:45 1999 +++ work/server/citytools.c Tue Jul 20 07:23:43 1999 @@ -400,6 +400,10 @@ if (can_build_improvement(pcity, B_POWER)) values[B_POWER]=pcity->shield_prod*100; + + /* I didn't really know how this worked when I added this */ + if (can_build_improvement(pcity, B_SOLAR)) + values[B_SOLAR]=pcity->shield_prod*100+pcity->pollution*125; } if (can_build_improvement(pcity, B_MFG)) @@ -473,6 +477,8 @@ int set_city_shield_bonus(struct city *pcity) { int tmp = 0; + double mul = 1.0; + if (city_got_building(pcity, B_FACTORY)) { if (city_got_building(pcity, B_MFG)) tmp = 100; @@ -482,8 +488,10 @@ if (city_affected_by_wonder(pcity, B_HOOVER) || city_got_building(pcity, B_POWER) || city_got_building(pcity, B_HYDRO) || - city_got_building(pcity,B_NUCLEAR)) - tmp *= 1.5; + city_got_building(pcity,B_NUCLEAR)) mul += 0.5; + if (city_got_building(pcity, B_SOLAR)) mul += 0.5; + + tmp *= mul; } pcity->shield_bonus = tmp + 100; diff -Nur -Xno.freeciv test/server/cityturn.c work/server/cityturn.c --- test/server/cityturn.c Tue Jul 20 15:09:45 1999 +++ work/server/cityturn.c Tue Jul 20 07:12:54 1999 @@ -312,12 +312,16 @@ int poppul=0; struct player *pplayer=&game.players[pcity->owner]; pcity->pollution=pcity->shield_prod; - if (city_got_building(pcity, B_RECYCLING)) - pcity->pollution/=3; - else if (city_got_building(pcity, B_HYDRO) || - city_affected_by_wonder(pcity, B_HOOVER) || - city_got_building(pcity, B_NUCLEAR)) - pcity->pollution/=2; + if (city_got_building(pcity, B_SOLAR)) + pcity->pollution=0; + else { + if (city_got_building(pcity, B_RECYCLING)) + pcity->pollution/=3; + if (city_got_building(pcity, B_HYDRO) || + city_affected_by_wonder(pcity, B_HOOVER) || + city_got_building(pcity, B_NUCLEAR)) + pcity->pollution/=2; + } if (!city_got_building(pcity, B_MASS)) { if (get_invention(pplayer, A_INDUSTRIALIZATION)==TECH_KNOWN) mod=1; diff -Nur -Xno.freeciv test/server/civserver.c work/server/civserver.c --- test/server/civserver.c Tue Jul 20 15:09:45 1999 +++ work/server/civserver.c Tue Jul 20 07:46:24 1999 @@ -762,15 +762,22 @@ **************************************************************************/ static void update_pollution(void) { - int x,y,count=0; + int i,x,y,count=0,solar_plants=0; for (x=0;x