updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / crawl / crawlpatch.diff
blob615e450926450be7f293219e373a792fdad61b4a
1 --- crawl-4.0.0beta26.orig/source/AppHdr.h
2 +++ crawl-4.0.0beta26/source/AppHdr.h
3 @@ -377,7 +377,7 @@
4 // Setting it to nothing or not setting it will cause all game files to
5 // be dumped in the current directory.
6 //
7 - #define SAVE_DIR_PATH "/opt/crawl/lib/"
8 + #define SAVE_DIR_PATH "/usr/share/crawl/save/"
10 // will make this little thing go away. Define SAVE_PACKAGE_CMD
11 // to a command to compress and bundle the save game files into a
12 @@ -389,9 +389,9 @@
14 // Comment these lines out if you want to leave the save files uncompressed.
16 - #define SAVE_PACKAGE_CMD "/usr/bin/zip -m -q -j -1 %s.zip %s.*"
17 - #define LOAD_UNPACKAGE_CMD "/usr/bin/unzip -q -o %s.zip -d" SAVE_DIR_PATH
18 - #define PACKAGE_SUFFIX ".zip"
19 + #define SAVE_PACKAGE_CMD "/bin/tar --remove-files -cPzf %s.tar.gz %s.???"
20 + #define LOAD_UNPACKAGE_CMD "/bin/tar -xPpzf %s.tar.gz"
21 + #define PACKAGE_SUFFIX ".tar.gz"
23 // This provides some rudimentary protection against people using
24 // save file cheats on multi-user systems.
25 --- crawl-4.0.0beta26.orig/source/acr.cc
26 +++ crawl-4.0.0beta26/source/acr.cc
27 @@ -244,6 +244,7 @@
29 printf( " Best Crawlers -" EOL );
30 hiscores_print_list( Options.sc_entries, Options.sc_format );
31 + get_ch();
32 exit(0);
35 --- crawl-4.0.0beta26.orig/source/chardump.cc
36 +++ crawl-4.0.0beta26/source/chardump.cc
37 @@ -856,6 +856,7 @@
38 strncat(file_name, ".txt", kPathLen);
40 FILE *handle = fopen(file_name, "wb");
41 + fchown(fileno(handle), (uid_t)-1, getgid());
43 #if DEBUG_DIAGNOSTICS
44 strcpy( info, "File name: " );
45 --- crawl-4.0.0beta26.orig/source/direct.cc
46 +++ crawl-4.0.0beta26/source/direct.cc
47 @@ -738,7 +738,7 @@
49 if (mon_arm != NON_ITEM)
51 - it_name( mon_arm, DESC_PLAIN, str_pass );
52 + it_name( mon_arm, DESC_NOCAP_A, str_pass );
53 snprintf( info, INFO_SIZE, "%s is wearing %s.",
54 mons_pronoun( menv[i].type, PRONOUN_CAP ),
55 str_pass );
56 --- crawl-4.0.0beta26.orig/source/fight.cc
57 +++ crawl-4.0.0beta26/source/fight.cc
58 @@ -3139,8 +3139,8 @@
59 case MONS_SPINY_WORM:
60 case MONS_JELLYFISH:
61 case MONS_ORANGE_DEMON:
62 - if (attacker->type == MONS_SPINY_WORM || one_chance_in(20)
63 - || (damage_taken > 3 && one_chance_in(4)))
64 + if (!mons_res_poison(defender) && (attacker->type == MONS_SPINY_WORM || one_chance_in(20)
65 + || (damage_taken > 3 && one_chance_in(4))))
67 if (sees)
69 @@ -3156,8 +3156,8 @@
71 case MONS_KILLER_BEE:
72 case MONS_BUMBLEBEE:
73 - if (one_chance_in(20)
74 - || (damage_taken > 2 && one_chance_in(3)))
75 + if (!mons_res_poison(defender) && (one_chance_in(20)
76 + || (damage_taken > 2 && one_chance_in(3))))
78 if (sees)
80 @@ -3212,15 +3212,18 @@
81 case MONS_QUEEN_ANT:
82 //if ((damage_taken > 2 && one_chance_in(3) ) || one_chance_in(20) )
83 //{
84 - if (sees)
85 - {
86 - strcpy(info, ptr_monam(attacker, DESC_CAP_THE));
87 - strcat(info, " stings ");
88 - strcat(info, ptr_monam(defender, DESC_NOCAP_THE));
89 - strcat(info, ".");
90 - mpr(info);
91 - }
92 - poison_monster(defender, false);
93 + if(!mons_res_poison(defender))
94 + {
95 + if (sees)
96 + {
97 + strcpy(info, ptr_monam(attacker, DESC_CAP_THE));
98 + strcat(info, " stings ");
99 + strcat(info, ptr_monam(defender, DESC_NOCAP_THE));
100 + strcat(info, ".");
101 + mpr(info);
103 + poison_monster(defender, false);
106 break;
108 @@ -3234,7 +3237,7 @@
109 case MONS_ARMOUR_MIMIC:
110 case MONS_SCROLL_MIMIC:
111 case MONS_POTION_MIMIC:
112 - if (one_chance_in(20) || (damage_taken > 2 && one_chance_in(4)))
113 + if (!mons_res_poison(defender) && (one_chance_in(20) || (damage_taken > 2 && one_chance_in(4))))
114 poison_monster(defender, false);
115 break;
117 --- crawl-4.0.0beta26.orig/source/food.cc
118 +++ crawl-4.0.0beta26/source/food.cc
119 @@ -1021,15 +1021,14 @@
120 restore_stat(STAT_ALL, false);
121 break;
122 case FOOD_PIZZA:
123 - strcpy(info, "Mmm... ");
125 if (SysEnv.crawl_pizza && !one_chance_in(3))
126 - strcat(info, SysEnv.crawl_pizza);
127 + snprintf(info, INFO_SIZE, "Mmm... %s", SysEnv.crawl_pizza);
128 else
130 temp_rand = random2(9);
132 - strcat(info, (temp_rand == 0) ? "Ham and pineapple." :
133 + snprintf(info, INFO_SIZE, "Mmm... %s",
134 + (temp_rand == 0) ? "Ham and pineapple." :
135 (temp_rand == 1) ? "Extra thick crust." :
136 (temp_rand == 2) ? "Vegetable." :
137 (temp_rand == 3) ? "Pepperoni." :
138 --- crawl-4.0.0beta26.orig/source/hiscores.cc
139 +++ crawl-4.0.0beta26/source/hiscores.cc
140 @@ -1160,6 +1160,9 @@
142 #ifdef SAVE_DIR_PATH
143 FILE *handle = fopen(SAVE_DIR_PATH "scores", mode);
144 +#ifdef SHARED_FILES_CHMOD_PUBLIC
145 + chmod(SAVE_DIR_PATH "scores", SHARED_FILES_CHMOD_PUBLIC);
146 +#endif
147 #else
148 FILE *handle = fopen("scores", mode);
149 #endif
150 --- crawl-4.0.0beta26.orig/source/items.cc
151 +++ crawl-4.0.0beta26/source/items.cc
152 @@ -2499,7 +2499,7 @@
154 // - equipment cannot be destroyed... not only is this the more accurate
155 // than testing for curse status (to prevent easy removal of cursed items),
156 -// but the original code would leave all the equiped items properties
157 +// but the original code would leave all the equipped items properties
158 // (including weight) which would cause a bit of a mess to state.
160 // - no item does anything for just carrying it... if that changes then
161 --- crawl-4.0.0beta26.orig/source/makefile
162 +++ crawl-4.0.0beta26/source/makefile
163 @@ -8,7 +8,7 @@
165 #jmf: number of concurrent jobs -- good value is (#_of_CPUs * 2) + 1
166 # cuts build time a lot on multi-cpu machines
167 -OTHER=-j2
168 +OTHER=
170 all:
171 $(MAKE) $(OTHER) -f $(MAKEFILE) EXTRA_FLAGS='-O2 -fno-strength-reduce'
172 --- crawl-4.0.0beta26.orig/source/makefile.lnx
173 +++ crawl-4.0.0beta26/source/makefile.lnx
174 @@ -16,13 +16,13 @@
175 OS_TYPE = LINUX
177 CFLAGS = -Wall -Wwrite-strings -Wstrict-prototypes \
178 - -Wmissing-prototypes -Wmissing-declarations \
179 - -g -D$(OS_TYPE) $(EXTRA_FLAGS)
180 + -Wmissing-prototypes -Wno-char-subscripts\
181 + -fsigned-char -g -D$(OS_TYPE) $(EXTRA_FLAGS)
183 # LDFLAGS = -static
184 -MCHMOD = 2755
185 -# INSTALLDIR = /usr/games
186 -INSTALLDIR = /opt/crawl/bin
187 +MCHMOD = 4755
188 +INSTALLDIR = /usr/share/crawl
189 +# INSTALLDIR = /opt/crawl/bin
190 LIB = -lncurses
192 # Include for Linux
193 --- crawl-4.0.0beta26.orig/source/monstuff.cc
194 +++ crawl-4.0.0beta26/source/monstuff.cc
195 @@ -856,6 +856,7 @@
196 char str_polymon[INFO_SIZE] = ""; // cannot use info[] here {dlb}
197 bool player_messaged = false;
198 int source_power, target_power, relax;
199 + int tries = 1000;
201 UNUSED( power );
203 @@ -883,11 +884,17 @@
204 if (relax > 50)
205 return (simple_monster_message( monster, " shudders." ));
207 - while (!valid_morph( monster, targetc )
208 + while (tries-- && (!valid_morph( monster, targetc )
209 || target_power < source_power - relax
210 - || target_power > source_power + (relax * 3) / 2);
211 + || target_power > source_power + (relax * 3) / 2));
214 + if(!valid_morph( monster, targetc )) {
215 + strcat( str_polymon, " doesn't look different.");
216 + player_messaged = simple_monster_message( monster, str_polymon );
217 + return (player_messaged);
220 // messaging: {dlb}
221 bool invis = mons_flag( targetc, M_INVIS )
222 || mons_has_ench( monster, ENCH_INVIS );
223 --- crawl-4.0.0beta26.orig/source/religion.cc
224 +++ crawl-4.0.0beta26/source/religion.cc
225 @@ -53,18 +53,18 @@
226 #include "stuff.h"
228 const char *sacrifice[] = {
229 - {" glows silver and disappears."},
230 - {" glows a brilliant golden colour and disappears."},
231 - {" rots away in an instant."},
232 - {" crumbles to dust."},
233 - {" is eaten by a bug."}, /* Xom - no sacrifices */
234 - {" explodes into nothingness."},
235 - {" is consumed in a burst of flame."},
236 - {" is consumed in a roaring column of flame."},
237 - {" glows faintly for a moment, then is gone."},
238 - {" is consumed in a roaring column of flame."},
239 - {" glows with a rainbow of weird colours and disappears."},
240 - {" evaporates."}
241 + " glows silver and disappears.",
242 + " glows a brilliant golden colour and disappears.",
243 + " rots away in an instant.",
244 + " crumbles to dust.",
245 + " is eaten by a bug.", /* Xom - no sacrifices */
246 + " explodes into nothingness.",
247 + " is consumed in a burst of flame.",
248 + " is consumed in a roaring column of flame.",
249 + " glows faintly for a moment, then is gone.",
250 + " is consumed in a roaring column of flame.",
251 + " glows with a rainbow of weird colours and disappears.",
252 + " evaporates."
255 void altar_prayer(void);
256 --- crawl-4.0.0beta26.orig/source/skills2.cc
257 +++ crawl-4.0.0beta26/source/skills2.cc
258 @@ -78,7 +78,7 @@
259 {NULL}, // 24- empty
261 {"Spellcasting", "Magician", "Thaumaturge", "Eclecticist", "Sorcerer", "Archmage"}, // 25
262 - {"Conjurations", "Ruinous", "Conjurer", "Destroyer", "Devastator", "Annihilator"},
263 + {"Conjurations", "Ruiner", "Conjurer", "Destroyer", "Devastator", "Annihilator"},
264 {"Enchantments", "Charm-Maker", "Infuser", "Bewitcher", "Enchanter", "Spellbinder"},
265 {"Summonings", "Caller", "Summoner", "Convoker", "Demonologist", "Hellbinder"},
266 {"Necromancy", "Grave Robber", "Reanimator", "Necromancer", "Thanatomancer", "%s of Death"},
267 --- crawl-4.0.0beta26.orig/source/view.cc
268 +++ crawl-4.0.0beta26/source/view.cc
269 @@ -1833,7 +1833,7 @@
271 start_y = screen_y - half_screen;
273 - for (j = 0; j < num_lines; j++)
274 + for (j = 0; j < (num_lines < map_lines ? num_lines : map_lines + 1); j++)
276 for (i = 0; i < 80; i++)