? data/bak ? freeciv/.new.ChangeLog Index: common/city.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/city.c,v retrieving revision 1.81 diff -u -r1.81 city.c --- city.c 2000/05/20 04:11:48 1.81 +++ city.c 2000/05/24 13:08:03 @@ -554,6 +554,8 @@ return 0; if (get_invention(p,unit_types[id].tech_requirement)!=TECH_KNOWN) return 0; + if (unit_flag(id, F_FANATIC) && !government_has_flag(get_gov_pplayer(p),G_HAS_FANATICS)) + return 0; return 1; } Index: common/government.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/government.c,v retrieving revision 1.19 diff -u -r1.19 government.c --- government.c 2000/01/29 13:10:45 1.19 +++ government.c 2000/05/24 13:08:04 @@ -64,7 +64,8 @@ static char *flag_names[] = { "Build_Veteran_Diplomats", "Revolution_When_Unhappy", "Has_Senate", - "Unbribable", "Inspires_Partisans", "Rapture_City_Growth" + "Unbribable", "Inspires_Partisans", "Rapture_City_Growth", + "Science_Halved", "No_Unhappy", "Convert_Tithes_To_Money","Has_Fanatics" }; static char *hint_names[] = { "Is_Nice", "Favors_Growth" Index: common/government.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/government.h,v retrieving revision 1.15 diff -u -r1.15 government.h --- government.h 2000/01/08 13:58:04 1.15 +++ government.h 2000/05/24 13:08:04 @@ -31,6 +31,10 @@ G_UNBRIBABLE, G_INSPIRES_PARTISANS, G_RAPTURE_CITY_GROWTH, /* allows city to grow by celebrating */ + G_SCIENCE_HALVED, /* For Fundamentalism */ + G_NO_UNHAPPY, /* idem */ + G_CONVERT_TITHES_TO_MONEY, /* happy building generate money $$$ */ + G_HAS_FANATICS, G_LAST_FLAG }; #define G_FIRST_FLAG G_BUILD_VETERAN_DIPLOMAT Index: common/unit.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/unit.c,v retrieving revision 1.95 diff -u -r1.95 unit.c --- unit.c 2000/05/16 22:27:47 1.95 +++ unit.c 2000/05/24 13:08:13 @@ -52,7 +52,8 @@ "OneAttack", "Pikemen", "Horse", "IgWall", "FieldUnit", "AEGIS", "Fighter", "Marines", "Partial_Invis", "Settlers", "Diplomat", "Trireme", "Nuclear", "Spy", "Transform", "Paratroopers", - "Airbase", "Cities", "IgTired", "Missile_Carrier", "No_Land_Attack" + "Airbase", "Cities", "IgTired", "Missile_Carrier", "No_Land_Attack", + "Fanatic" }; static char *role_names[] = { "FirstBuild", "Explorer", "Hut", "HutTech", "Partisan", @@ -415,6 +416,8 @@ **************************************************************************/ int utype_shield_cost(struct unit_type *ut, struct government *g) { + if ((ut->flags&(1 <shield_cost * g->unit_shield_cost_factor; } Index: common/unit.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/unit.h,v retrieving revision 1.55 diff -u -r1.55 unit.h --- unit.h 2000/05/16 22:27:48 1.55 +++ unit.h 2000/05/24 13:08:14 @@ -152,6 +152,7 @@ F_IGTIRED, /* Ignore tired negative bonus when attacking */ F_MISSILE_CARRIER, /* Like F_CARRIER, but missiles only (Submarine) */ F_NO_LAND_ATTACK, /* Cannot attack vs land squares (Submarine) */ + F_FANATIC, /* Free under HAS_FANATIC gvt */ F_LAST }; Index: data/default/governments.ruleset =================================================================== RCS file: /home/freeciv/CVS/freeciv/data/default/governments.ruleset,v retrieving revision 1.14 diff -u -r1.14 governments.ruleset --- governments.ruleset 2000/05/13 01:16:49 1.14 +++ governments.ruleset 2000/05/24 13:08:15 @@ -546,3 +546,53 @@ Democratic civilizations cannot be bribed, and Democratic cities\ cannot be incited to revolt by enemy Diplomats and Spies.\ ") + +;------------------------------------------------------------------------ +[government_fundamentalism] + +name = _("Fundamentalism") +tech_req = "Fundamentalism" +graphic = "gov.fundamentalism" +graphic_alt = "-" +flags = "Science_Halved", "No_Unhappy","Convert_Tithes_To_Money","Has_Fanatics" +hints = "Favors_Growth" +subgoal = "Democracy" + +martial_law_max = 0 +martial_law_per = 0 +max_single_rate = 80 +civil_war_chance = 60 +empire_size_mod = 0 +empire_size_inc = 0 +rapture_size = 4 + +unit_unhappy_factor = 0 +unit_shield_factor = 1 +unit_food_factor = 2 +unit_gold_factor = 1 + +unit_free_unhappy = 0 +unit_free_shield = 10 +unit_free_food = 0 +unit_free_gold = 0 + +corruption_level = 50 +corruption_modifier = 80 +corruption_fixed_distance = 10 +corruption_distance_factor = 1 +corruption_extra_distance = 0 + +production_trade_bonus = 0, 1 +production_shield_bonus = 0, 0 +production_food_bonus = 0, 0 + +production_trade_penalty = 0, 0 +production_shield_penalty = 0, 0 +production_food_penalty = 0, 0 + +ruler_male_title = _("high Priest") +ruler_female_title = _("Great Sister") + +helptext = _("\ +To be writen ... +") Index: data/default/techs.ruleset =================================================================== RCS file: /home/freeciv/CVS/freeciv/data/default/techs.ruleset,v retrieving revision 1.12 diff -u -r1.12 techs.ruleset --- techs.ruleset 2000/01/05 17:39:56 1.12 +++ techs.ruleset 2000/05/24 13:08:16 @@ -227,8 +227,8 @@ [advance_fundamentalism] name = _("Fundamentalism") -req1 = "Never"; ; "Theology" -req2 = "Never" ; "Conscription" +req1 = "Theology" +req2 = "Conscription" flags = "" [advance_fusion_power] Index: data/default/units.ruleset =================================================================== RCS file: /home/freeciv/CVS/freeciv/data/default/units.ruleset,v retrieving revision 1.21 diff -u -r1.21 units.ruleset --- units.ruleset 2000/05/06 13:23:53 1.21 +++ units.ruleset 2000/05/24 13:08:18 @@ -281,7 +281,7 @@ [unit_fanatics] name = _("Fanatics") move_type = "Land" -tech_req = "Never" +tech_req = "Fundamentalism" obsolete_by = "None" graphic = "u.fanatics" graphic_alt = "-" @@ -487,7 +487,7 @@ name = _("Chariot") move_type = "Land" tech_req = "The Wheel" -obsolete_by = "Knights" +obsolete_by = "Elephants" graphic = "u.chariot" graphic_alt = "-" build_cost = 30 @@ -509,7 +509,7 @@ [unit_elephants] name = _("Elephants") move_type = "Land" -tech_req = "Never" +tech_req = "Polytheism" obsolete_by = "Crusaders" graphic = "u.elephants" graphic_alt = "-" @@ -532,7 +532,7 @@ [unit_crusaders] name = _("Crusaders") move_type = "Land" -tech_req = "Never" +tech_req = "Monotheism" obsolete_by = "Dragoons" graphic = "u.crusaders" graphic_alt = "-" Index: server/citytools.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v retrieving revision 1.81 diff -u -r1.81 citytools.c --- citytools.c 2000/05/16 22:53:06 1.81 +++ citytools.c 2000/05/24 13:08:21 @@ -556,6 +556,8 @@ science_bonus+=50; if (city_affected_by_wonder(pcity, B_ISAAC)) science_bonus+=100; + if (government_has_flag(get_gov_pcity(pcity),G_SCIENCE_HALVED)) + science_bonus = science_bonus >> 1; pcity->science_bonus = science_bonus; return science_bonus; } Index: server/cityturn.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v retrieving revision 1.106 diff -u -r1.106 cityturn.c --- cityturn.c 2000/05/16 22:53:06 1.106 +++ cityturn.c 2000/05/24 13:08:25 @@ -125,7 +125,15 @@ } pcity->luxury_total+=(pcity->ppl_elvis*2); pcity->science_total+=(pcity->ppl_scientist*3); - pcity->tax_total+=(pcity->ppl_taxman*3); + pcity->tax_total+=(pcity->ppl_taxman*3); + if (government_has_flag(get_gov_pcity(pcity),G_CONVERT_TITHES_TO_MONEY)) { + if (city_got_building(pcity,B_TEMPLE)) + pcity->tax_total+=get_temple_power(pcity); + if (city_got_building(pcity, B_COLOSSEUM)) + pcity->tax_total+=get_colosseum_power(pcity); + if (city_got_effect(pcity, B_CATHEDRAL)) + pcity->tax_total+=get_cathedral_power(pcity); + }; } /************************************************************************** @@ -161,15 +169,22 @@ ... **************************************************************************/ static void citizen_happy_size(struct city *pcity) -{ +{ int citizens, tmp; - tmp = content_citizens(&game.players[pcity->owner]); - citizens = MIN(pcity->size, tmp); - tmp = (citizens - city_specialists(pcity)); - pcity->ppl_content[0] = MAX(0, tmp); - tmp = (pcity->size - (pcity->ppl_content[0] + city_specialists(pcity))); - pcity->ppl_unhappy[0] = MAX(0, tmp); - pcity->ppl_happy[0]=0; + + if (government_has_flag(get_gov_pcity(pcity),G_NO_UNHAPPY)) { + pcity->ppl_content[0] = pcity->size - city_specialists(pcity); + pcity->ppl_happy[0] = 0; + pcity->ppl_unhappy[0] = 0; + } else { + tmp = content_citizens(&game.players[pcity->owner]); + citizens = MIN(pcity->size, tmp); + tmp = (citizens - city_specialists(pcity)); + pcity->ppl_content[0] = MAX(0, tmp); + tmp = (pcity->size - (pcity->ppl_content[0] + city_specialists(pcity))); + pcity->ppl_unhappy[0] = MAX(0, tmp); + pcity->ppl_happy[0]=0; + } } /**************************************************************************