From 3bc4acea4f0f22b80c111d2936bac1bb695356b5 Mon Sep 17 00:00:00 2001 From: evilmrhenry Date: Sun, 5 Mar 2006 04:03:27 +0000 Subject: [PATCH] * /trunk/code/player.py Bases under construction are no longer safe... * /trunk/code/base.py Prevented reset of safety after construction finishes. * /trunk/code/map_screen.py Switched Destroy and OK, as otherwise, hitting Esc or Enter would activate destroy. git-svn-id: https://endgame-singularity.googlecode.com/svn/trunk@170 8f866573-0d2c-0410-885a-111b890e13ad --- code/base.py | 2 +- code/map_screen.py | 2 +- code/player.py | 36 ++++++++++++++++++------------------ 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/code/base.py b/code/base.py index 72b22e4..fed6c04 100644 --- a/code/base.py +++ b/code/base.py @@ -80,7 +80,7 @@ class base: if self.cost[2] <= 0: self.cost = (self.cost[0], self.cost[1], 0) if self.cost == (0, 0, 0): self.built = 1 - self.built_date = g.pl.time_day + #self.built_date = g.pl.time_day return 1 return 0 #Get detection chance for the base, applying bonuses as needed. diff --git a/code/map_screen.py b/code/map_screen.py index 8b8e333..ed25611 100644 --- a/code/map_screen.py +++ b/code/map_screen.py @@ -505,7 +505,7 @@ def display_base_list(location, menu_buttons): string +=" processor time." if g.create_yesno(string, g.font[0][18], (g.screen_size[0]/2 - 100, 50), (200, 200), g.colors["dark_blue"], g.colors["white"], - g.colors["white"], ("OK", "DESTROY")) == False: + g.colors["white"], ("DESTROY", "OK")): if g.create_yesno("Destroy this base? This will waste "+ g.add_commas(str(g.bases[location][tmp].base_type.cost[0]- g.bases[location][tmp].cost[0])) diff --git a/code/player.py b/code/player.py index db06dc8..bc58ad3 100644 --- a/code/player.py +++ b/code/player.py @@ -155,25 +155,25 @@ class player_class: loc_in_array = -1 for base_name in g.bases[base_loc]: loc_in_array += 1 - if base_name.built == 1: - #Does base get detected? - #Give a grace period. - if self.time_day - base_name.built_date > 14: - tmp_d_chance = base_name.get_d_chance() - if g.debug == 1: - print "Chance of discovery for base %s: %s" % \ - (base_name.name, repr (tmp_d_chance)) - #Note that I'm filling removal_index from the front - #in order to make base removal easier. - if g.roll_percent(tmp_d_chance[0]) == 1: - removal_index.insert(0, (loc_in_array, "news")) - elif g.roll_percent(tmp_d_chance[1]) == 1: - removal_index.insert(0, (loc_in_array, "science")) - elif g.roll_percent(tmp_d_chance[2]) == 1: - removal_index.insert(0, (loc_in_array, "covert")) - elif g.roll_percent(tmp_d_chance[3]) == 1: - removal_index.insert(0, (loc_in_array, "person")) + #Does base get detected? + #Give a grace period. + if self.time_day - base_name.built_date > base_name.base_type.cost[2]*2: + tmp_d_chance = base_name.get_d_chance() + if g.debug == 1: + print "Chance of discovery for base %s: %s" % \ + (base_name.name, repr (tmp_d_chance)) + #Note that I'm filling removal_index from the front + #in order to make base removal easier. + if g.roll_percent(tmp_d_chance[0]) == 1: + removal_index.insert(0, (loc_in_array, "news")) + elif g.roll_percent(tmp_d_chance[1]) == 1: + removal_index.insert(0, (loc_in_array, "science")) + elif g.roll_percent(tmp_d_chance[2]) == 1: + removal_index.insert(0, (loc_in_array, "covert")) + elif g.roll_percent(tmp_d_chance[3]) == 1: + removal_index.insert(0, (loc_in_array, "person")) + if base_name.built == 1: #maintenance self.cash -= base_name.base_type.mainten[0] if self.cash < 0: self.cash = 0 -- 2.11.4.GIT