Skip to content

Commit

Permalink
Expand city sight to 2 tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhenning committed Dec 14, 2010
1 parent b405657 commit aba6095
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
16 changes: 10 additions & 6 deletions index.htm
Expand Up @@ -806,7 +806,7 @@
}
for (var i = 0; i < City.length; i++) {
if (City[i].player) {
UpdateAround(City[i].row, City[i].col, 1);
UpdateAround(City[i].row, City[i].col, 2);
}
}
}
Expand Down Expand Up @@ -1803,13 +1803,17 @@
cities: document.getElementById("cities"),
HighlightTechOptions: function(bool) {
if (bool) {this.techOptions.style.backgroundColor = "red";}
else {this.techOptions.style.backgroundColor = "";}
else {this.techOptions.style.backgroundColor = "gray";}
},
HighlightWonderOptions: function(bool) {
if (bool) {this.wonderOptions.style.backgroundColor = "red";}
else {this.wonderOptions.style.backgroundColor = "";}
else {this.wonderOptions.style.backgroundColor = "gray";}
},
ClearOptions: function(select) { for (var i = select.options.length-1; i >= 0; i--) {select.remove(i);} }
ClearOptions: function(select) {
for (var i = select.options.length-1; i >= 0; i--) {
select.remove(i);
}
}
};

function KeyPressHandler(event) {
Expand Down Expand Up @@ -1860,8 +1864,8 @@
}

function NextTech() {
for(C=0; C<City.length; C++) {
if(City[C].player) {
for (C=0; C<City.length; C++) {
if (City[C].player) {
TechReserve += Math.max(City[C].science*City[C].trade*WorkingCitizenOutput(C)*(1-.3*City[C].corruptionRate),1);
}
}
Expand Down
9 changes: 6 additions & 3 deletions todo.org
Expand Up @@ -29,7 +29,7 @@ Also triggered by killing all of my units, by having them fight each other.
: KeyPressHandler (index.htm:1781)
: (anonymous function) (index.htm:20)
: onkeypress (index.htm:21)
** TODO [#A] Fix fog of war
** DONE [#A] Fix fog of war
Sometimes it takes a turn or two before tiles are revealed.
** UI
*** TODO [#A] When selecting a tech, the status bar should show a short description of it.
Expand All @@ -38,22 +38,25 @@ It works in firefox, but not chromium?
Try a new event on the hovering over of tech options. I'll look one up when I land.
*** TODO [#C] When hovering over land while a settler is the active unit, the status bar should show relevent details.
ie. "A city can't be built here" or "A city built here has the potential for 14 points (12f/0p/2t)"
*** Fix build queques
*** DONE Fix build queques
**** TODO [#C] Coloring of the queques
**** DONE Being able to actually see the queque
**** TODO [#B] Limit buildings/units that should only be built in port cities
*** TODO Drop downs should change to gray when changed
*** TODO Improve handling of all units being asleep
** AI
*** TODO [#B] Add lazy city defenders.
Maybe done?
*** TODO [#B] Add lazy city attackers
Not done?
** TODO [#B] Allow cities to be captured
** DONE [#B] Allow cities to be captured
Done?
** DONE Barracks doesn't actually work...
Barracks should increase veterancy of built units; in reality it doesn't.

Didn't realize it's effect was random, and had really bad luck apparently.


* Eventually... (like really low priority...)
** TODO Support android phones
** TODO Support blackberry devices
Expand Down

0 comments on commit aba6095

Please sign in to comment.