summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-08-19 16:30:12 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-08-19 16:30:12 +0000
commit1f16b54afe3ce0f5f23cddae2d7d6f3fc7252615 (patch)
treece78486229aabcfc023d86030f011c8115d94f06
parent48a024086ecc4a55541220bfbc313f884012ee06 (diff)
downloadcrawl-ref-1f16b54afe3ce0f5f23cddae2d7d6f3fc7252615.tar.gz
crawl-ref-1f16b54afe3ce0f5f23cddae2d7d6f3fc7252615.zip
r68@ODIN: dshaligram | 2006-08-19 22:01:30 +051800
- Fixed weapon skill Lua call (it wasn't returning the skill for launchers). - Removed to-hit fudges for slings and bows. - Scrolls of vorpalise weapon can now vorpalise missile launchers. - Refixed makefile.mgw to keep release and debug binaries separate. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@23 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/clua.cc7
-rw-r--r--crawl-ref/source/item_use.cc6
-rw-r--r--crawl-ref/source/makefile.mgw34
3 files changed, 23 insertions, 24 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc
index 597694a81e..41e703c2b0 100644
--- a/crawl-ref/source/clua.cc
+++ b/crawl-ref/source/clua.cc
@@ -1268,12 +1268,15 @@ static int l_item_weap_skill(lua_State *ls)
if (!item || !is_valid_item(*item))
return (0);
- int skill = weapon_skill( item->base_type, item->sub_type );
+ int skill = range_skill(*item);
+ if (skill == SK_RANGED_COMBAT)
+ skill = weapon_skill(*item);
if (skill == SK_FIGHTING)
return (0);
lua_pushstring(ls, skill_name(skill));
- return (1);
+ lua_pushnumber(ls, skill);
+ return (2);
}
static int l_item_artifact(lua_State *ls)
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 0e59c37712..3c342d7c95 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1437,7 +1437,6 @@ static void throw_it(struct bolt &pbolt, int throw_2)
// comes from dexterity. (Dex bonus here as well as below)
case SK_DARTS:
exercise(SK_DARTS, (coinflip()? 2 : 1));
- baseHit -= 2;
exHitBonus += (effSkill * 3) / 2 + you.dex / 2;
// no extra damage for blowguns
@@ -1453,7 +1452,6 @@ static void throw_it(struct bolt &pbolt, int throw_2)
case SK_BOWS:
{
exercise(SK_BOWS, (coinflip()? 2 : 1));
- baseHit -= 4;
exHitBonus += (effSkill * 2);
// strength is good if you're using a nice bow
@@ -1479,7 +1477,7 @@ static void throw_it(struct bolt &pbolt, int throw_2)
case SK_CROSSBOWS:
exercise(SK_CROSSBOWS, (coinflip()? 2 : 1));
- baseHit += lnchType == WPN_CROSSBOW? 2 : 1;
+ baseHit += 2;
exHitBonus += (3 * effSkill) / 2 + 6;
exDamBonus += effSkill * 2 / 3 + 4;
if (lnchType == WPN_HAND_CROSSBOW)
@@ -3127,7 +3125,7 @@ void read_scroll(void)
|| (you.inv[ nthing ].base_type == OBJ_WEAPONS
&& (is_fixed_artefact( you.inv[ nthing ] )
|| is_random_artefact( you.inv[ nthing ] )
- || launches_things( you.inv[ nthing ].sub_type ))))
+ || you.inv[nthing].sub_type == WPN_BLOWGUN)))
{
canned_msg(MSG_NOTHING_HAPPENS);
break;
diff --git a/crawl-ref/source/makefile.mgw b/crawl-ref/source/makefile.mgw
index 9626ce5c58..7c683cd369 100644
--- a/crawl-ref/source/makefile.mgw
+++ b/crawl-ref/source/makefile.mgw
@@ -5,15 +5,13 @@
include makefile.obj
ifeq ($(DEBUG_CRAWL),)
-OPATH := rel/
+OPATH := rel
else
-OPATH := dbg/
+OPATH := dbg
endif
-OBPATH = $(subst /,\,$(OPATH))
-
# need .exe so make will find the right file
-APPNAME = $(OPATH)crawl.exe
+APPNAME = $(OPATH)\crawl.exe
CXX = g++
DELETE = del
COPY = copy
@@ -23,8 +21,8 @@ CFLAGS = -Wall -Wwrite-strings -Wstrict-prototypes \
-D$(OS_TYPE) $(EXTRA_FLAGS) -DCLUA_BINDINGS \
-DWINMM_PLAY_SOUNDS -DREGEX_PCRE
-OBJNAMES := $(OBJECTS) $(OPATH)libw32c.o
-OBJECTS = $(foreach file,$(OBJNAMES),$(OPATH)$(file))
+OBJECTS := $(OBJECTS) libw32c.o
+OBJECTS := $(foreach file,$(OBJECTS),$(OPATH)/$(file))
LDFLAGS =
INSTALLDIR = .
@@ -34,33 +32,33 @@ LIB = -lwinmm -static -lpcre -llua -llualib
all: $(APPNAME)
prepare:
- if not exist $(OPATH) mkdir $(OBPATH)
+ if not exist $(OPATH) mkdir $(OPATH)
install: $(APPNAME)
$(COPY) $(APPNAME) ${INSTALLDIR}
clean:
- $(DELETE) $(OBPATH)*.o
+ $(DELETE) $(OPATH)\*.o
distclean:
- $(DELETE) $(OBPATH)*.o
+ $(DELETE) $(OPATH)\*.o
$(DELETE) *.o
$(DELETE) bones.*
- $(DELETE) $(OBPATH)bones.*
+ $(DELETE) $(OPATH)\bones.*
$(DELETE) morgue.txt
- $(DELETE) $(OBPATH)morgue.txt
+ $(DELETE) $(OPATH)\morgue.txt
$(DELETE) scores
- $(DELETE) $(OBPATH)scores
+ $(DELETE) $(OPATH)\scores
$(DELETE) crawl.exe
$(DELETE) $(subst /,\,$(APPNAME))
$(DELETE) *.sav
- $(DELETE) $(OBPATH)*.sav
+ $(DELETE) $(OPATH)\*.sav
$(DELETE) core
- $(DELETE) $(OBPATH)core
+ $(DELETE) $(OPATH)\core
$(DELETE) *.0*
- $(DELETE) $(OBPATH)*.0*
+ $(DELETE) $(OPATH)\*.0*
$(DELETE) *.lab
- $(DELETE) $(OBPATH)*.lab
+ $(DELETE) $(OPATH)\*.lab
$(APPNAME): prepare $(OBJECTS)
${CXX} ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(APPNAME) $(LIB)
@@ -72,5 +70,5 @@ debug: prepare $(OBJECTS)
profile: $(OBJECTS)
${CXX} -g -p ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(APPNAME) $(LIB)
-$(OPATH)%.o: %.cc
+$(OPATH)/%.o: %.cc
${CXX} ${CFLAGS} ${INCLUDES} -o $@ -c $<