|
From: <dsh...@us...> - 2007-04-03 12:54:13
|
Revision: 1198
http://svn.sourceforge.net/crawl-ref/?rev=1198&view=rev
Author: dshaligram
Date: 2007-04-03 05:54:05 -0700 (Tue, 03 Apr 2007)
Log Message:
-----------
Jellies now resist acid spit (adapted jlewis' patch).
On Windows and DOS, prompt for a newline after printing an error message and
exiting, since users on those systems seem to run executables by
double-clicking on them, and cannot see error messages because the console
disappears when the game exits.
Modified Paths:
--------------
trunk/crawl-ref/source/beam.cc
trunk/crawl-ref/source/enum.h
trunk/crawl-ref/source/mon-data.h
trunk/crawl-ref/source/mon-util.cc
trunk/crawl-ref/source/mon-util.h
trunk/crawl-ref/source/stuff.cc
Modified: trunk/crawl-ref/source/beam.cc
===================================================================
--- trunk/crawl-ref/source/beam.cc 2007-04-03 10:19:57 UTC (rev 1197)
+++ trunk/crawl-ref/source/beam.cc 2007-04-03 12:54:05 UTC (rev 1198)
@@ -1572,7 +1572,16 @@
}
break;
+ case BEAM_ACID:
+ if (mons_res_acid(monster))
+ {
+ if (doFlavouredEffects)
+ simple_monster_message(monster, " appears unharmed.");
+ hurted = 0;
+ }
+ break;
+
case BEAM_POISON:
if (mons_res_poison(monster) > 0)
{
Modified: trunk/crawl-ref/source/enum.h
===================================================================
--- trunk/crawl-ref/source/enum.h 2007-04-03 10:19:57 UTC (rev 1197)
+++ trunk/crawl-ref/source/enum.h 2007-04-03 12:54:05 UTC (rev 1198)
@@ -1808,6 +1808,7 @@
M_NO_EXP_GAIN = (1<<31) // worth 0 xp
};
+// now saved in an unsigned long.
enum mon_resist_flags
{
MR_NO_FLAGS = 0,
@@ -1823,22 +1824,23 @@
MR_RES_HELLFIRE = (1<< 3),
MR_RES_COLD = (1<< 4),
MR_RES_ASPHYX = (1<< 5),
+ MR_RES_ACID = (1<< 6),
// vulnerabilities
- MR_VUL_ELEC = (1<< 6),
- MR_VUL_POISON = (1<< 7),
- MR_VUL_FIRE = (1<< 8),
- MR_VUL_COLD = (1<< 9),
+ MR_VUL_ELEC = (1<< 7),
+ MR_VUL_POISON = (1<< 8),
+ MR_VUL_FIRE = (1<< 9),
+ MR_VUL_COLD = (1<<10),
// melee armour resists/vulnerabilities
// XXX: how to do combos (bludgeon/slice, bludgeon/pierce)
- MR_RES_PIERCE = (1<<10),
- MR_RES_SLICE = (1<<11),
- MR_RES_BLUDGEON = (1<<12),
+ MR_RES_PIERCE = (1<<11),
+ MR_RES_SLICE = (1<<12),
+ MR_RES_BLUDGEON = (1<<13),
- MR_VUL_PIERCE = (1<<13),
- MR_VUL_SLICE = (1<<14),
- MR_VUL_BLUDGEON = (1<<15)
+ MR_VUL_PIERCE = (1<<14),
+ MR_VUL_SLICE = (1<<15),
+ MR_VUL_BLUDGEON = (1<<16)
};
enum targ_mode_type
Modified: trunk/crawl-ref/source/mon-data.h
===================================================================
--- trunk/crawl-ref/source/mon-data.h 2007-04-03 10:19:57 UTC (rev 1197)
+++ trunk/crawl-ref/source/mon-data.h 2007-04-03 12:54:05 UTC (rev 1198)
@@ -556,7 +556,7 @@
{
MONS_JELLY, 'J', LIGHTRED, "jelly",
M_SEE_INVIS | M_SPLITS | M_AMPHIBIOUS | M_ACID_SPLASH,
- MR_RES_POISON | MR_RES_ASPHYX,
+ MR_RES_POISON | MR_RES_ASPHYX | MR_RES_ACID,
0, 13, MONS_JELLY, MONS_JELLY, MH_NATURAL, -3,
{ {AT_HIT, AF_ACID, 8}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0} },
{ 3, 5, 5, 0 },
@@ -2876,7 +2876,7 @@
{
MONS_BROWN_OOZE, 'J', BROWN, "brown ooze",
M_NO_SKELETON | M_SEE_INVIS | M_ACID_SPLASH,
- MR_RES_POISON | MR_RES_ASPHYX,
+ MR_RES_POISON | MR_RES_ASPHYX | MR_RES_ACID,
0, 11, MONS_JELLY, MONS_BROWN_OOZE, MH_NATURAL, -7,
{ {AT_HIT, AF_ACID, 25}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0} },
{ 7, 3, 5, 0 },
@@ -2888,7 +2888,8 @@
{
MONS_AZURE_JELLY, 'J', LIGHTBLUE, "azure jelly",
M_NO_SKELETON | M_SEE_INVIS,
- MR_RES_POISON | MR_RES_COLD | MR_VUL_FIRE | MR_RES_ELEC | MR_RES_ASPHYX,
+ MR_RES_POISON | MR_RES_COLD | MR_VUL_FIRE | MR_RES_ELEC | MR_RES_ASPHYX
+ | MR_RES_ACID,
0, 11, MONS_JELLY, MONS_AZURE_JELLY, MH_NATURAL, -4,
{ {AT_HIT, AF_COLD, 12}, {AT_HIT, AF_COLD, 12}, {AT_HIT, AF_PLAIN, 12}, {AT_HIT, AF_PLAIN, 12} },
{ 15, 3, 5, 0 },
@@ -2900,7 +2901,7 @@
{
MONS_DEATH_OOZE, 'J', DARKGREY, "death ooze",
M_NO_SKELETON | M_SEE_INVIS | M_EVIL,
- MR_RES_POISON | MR_RES_COLD | MR_RES_ASPHYX,
+ MR_RES_POISON | MR_RES_COLD | MR_RES_ASPHYX | MR_RES_ACID,
0, 13, MONS_JELLY, MONS_DEATH_OOZE, MH_UNDEAD, -8,
{ {AT_HIT, AF_ROT, 32}, {AT_HIT, AF_PLAIN, 32}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0} },
{ 11, 3, 3, 0 },
@@ -2912,7 +2913,7 @@
{
MONS_ACID_BLOB, 'J', LIGHTGREEN, "acid blob",
M_NO_SKELETON | M_SEE_INVIS | M_SPECIAL_ABILITY | M_ACID_SPLASH,
- MR_RES_POISON | MR_RES_ASPHYX,
+ MR_RES_POISON | MR_RES_ASPHYX | MR_RES_ACID,
0, 12, MONS_JELLY, MONS_ACID_BLOB, MH_NATURAL, -7,
{ {AT_HIT, AF_ACID, 42}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0} },
{ 18, 3, 5, 0 },
@@ -2924,7 +2925,7 @@
{
MONS_ROYAL_JELLY, 'J', YELLOW, "royal jelly",
M_NO_SKELETON | M_SEE_INVIS | M_ACID_SPLASH,
- MR_RES_POISON | MR_RES_ASPHYX,
+ MR_RES_POISON | MR_RES_ASPHYX | MR_RES_ACID,
0, 20, MONS_JELLY, MONS_ROYAL_JELLY, MH_NATURAL, -7,
{ {AT_HIT, AF_ACID, 50}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0} },
{ 21, 0, 0, 111 },
@@ -3393,7 +3394,7 @@
{
MONS_OOZE, 'J', LIGHTGREY, "ooze",
M_NO_SKELETON | M_SEE_INVIS,
- MR_RES_POISON | MR_RES_ASPHYX,
+ MR_RES_POISON | MR_RES_ASPHYX | MR_RES_ACID,
0, 5, MONS_JELLY, MONS_OOZE, MH_NATURAL, -6,
{ {AT_HIT, AF_PLAIN, 5}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0} },
{ 3, 3, 5, 0 },
Modified: trunk/crawl-ref/source/mon-util.cc
===================================================================
--- trunk/crawl-ref/source/mon-util.cc 2007-04-03 10:19:57 UTC (rev 1197)
+++ trunk/crawl-ref/source/mon-util.cc 2007-04-03 12:54:05 UTC (rev 1198)
@@ -796,11 +796,17 @@
|| mons_resist(mon, MR_RES_ASPHYX));
}
+int mons_res_acid( const monsters *mon )
+{
+ const unsigned long f = get_mons_resists(mon);
+ return ((f & MR_RES_ACID) != 0);
+}
+
int mons_res_poison( const monsters *mon )
{
int mc = mon->type;
- int u = 0, f = get_mons_resists(mon);
+ unsigned long u = 0, f = get_mons_resists(mon);
if (f & MR_RES_POISON)
u++;
Modified: trunk/crawl-ref/source/mon-util.h
===================================================================
--- trunk/crawl-ref/source/mon-util.h 2007-04-03 10:19:57 UTC (rev 1197)
+++ trunk/crawl-ref/source/mon-util.h 2007-04-03 12:54:05 UTC (rev 1198)
@@ -271,7 +271,7 @@
* called from: beam - monstuff - spells4
* *********************************************************************** */
int mons_res_poison( const monsters *mon );
-
+int mons_res_acid( const monsters *mon );
int mons_res_negative_energy( const monsters *mon );
bool mons_res_asphyx( const monsters *mon );
Modified: trunk/crawl-ref/source/stuff.cc
===================================================================
--- trunk/crawl-ref/source/stuff.cc 2007-04-03 10:19:57 UTC (rev 1197)
+++ trunk/crawl-ref/source/stuff.cc 2007-04-03 12:54:05 UTC (rev 1198)
@@ -376,6 +376,14 @@
error += "\n";
fprintf(stderr, "%s", error.c_str());
}
+
+#if defined(WIN32CONSOLE) || defined(DOS)
+ if (exit_code)
+ {
+ fprintf(stderr, "Hit Enter to continue...\n");
+ getchar();
+ }
+#endif
exit(exit_code);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|