summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-09 06:42:40 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-09 06:42:40 +0000
commit6c492dfd5ae7208c5e26c720e64bc5e2a52c9d51 (patch)
treea0ad64c99239b4efe28de13cbf093db192ea5c80
parent7d52758f5918f00b28e65f713a83953185e6a7e5 (diff)
downloadcrawl-ref-6c492dfd5ae7208c5e26c720e64bc5e2a52c9d51.tar.gz
crawl-ref-6c492dfd5ae7208c5e26c720e64bc5e2a52c9d51.zip
Added wizard command @ to set stats for the PC.
Curare-tipped needles are destroyed much more easily than regular needles. Fixed \ in shops showing bad results. Fixed missing column break in skills display. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@370 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/acr.cc4
-rw-r--r--crawl-ref/source/beam.cc4
-rw-r--r--crawl-ref/source/debug.cc32
-rw-r--r--crawl-ref/source/debug.h1
-rw-r--r--crawl-ref/source/religion.cc18
-rw-r--r--crawl-ref/source/shopping.cc4
-rw-r--r--crawl-ref/source/skills2.cc1
7 files changed, 54 insertions, 10 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 0fd8e5c572..daf8f0f219 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -686,6 +686,10 @@ static void handle_wizard_command( void )
magic_mapping(1000, 100);
break;
+ case '@':
+ debug_set_stats();
+ break;
+
case '^':
{
int old_piety = you.piety;
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 5a5df85c44..009746c653 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2386,7 +2386,9 @@ static void beam_drop_object( struct bolt &beam, item_def *item, int x, int y )
// The effect is nigh impossible to perceive.
switch (item->sub_type)
{
- case MI_NEEDLE: chance = 6; break;
+ case MI_NEEDLE:
+ chance = (get_ammo_brand(*item) == SPMSL_CURARE? 3 : 6);
+ break;
case MI_STONE: chance = 4; break;
case MI_DART: chance = 3; break;
case MI_ARROW: chance = 4; break;
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 6f61b884fa..d29385b05d 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -1958,10 +1958,10 @@ static void fsim_title(FILE *o, int mon, int ms)
fprintf(o, "Skill | Accuracy | Av.Dam | Av.HitDam | Eff.Dam | Max.Dam | Av.Time\n");
}
-static int fsim_stat(int stat)
+static int cap_stat(int stat)
{
return (stat < 1 ? 1 :
- stat > 60 ? 60 :
+ stat > 127 ? 127 :
stat);
}
@@ -1995,9 +1995,9 @@ static bool debug_fight_sim(int mindex, int missile_slot)
if (you.experience_level > 27)
you.experience_level = 27;
- you.strength = fsim_stat(Options.fsim_str);
- you.intel = fsim_stat(Options.fsim_int);
- you.dex = fsim_stat(Options.fsim_dex);
+ you.strength = cap_stat(Options.fsim_str);
+ you.intel = cap_stat(Options.fsim_int);
+ you.dex = cap_stat(Options.fsim_dex);
fsim_title(ostat, mindex, missile_slot);
for (int wskill = 0; wskill <= 27; ++wskill)
@@ -2257,4 +2257,26 @@ void debug_make_shop()
link_items();
mprf("Done.");
}
+
+void debug_set_stats()
+{
+ char buf[80];
+ mprf(MSGCH_PROMPT, "Enter values for Str, Int, Dex (space separated): ");
+ if (cancelable_get_line(buf, sizeof buf))
+ return;
+
+ int sstr = you.strength,
+ sdex = you.dex,
+ sint = you.intel;
+ sscanf(buf, "%d %d %d", &sstr, &sint, &sdex);
+
+ you.max_strength = you.strength = cap_stat(sstr);
+ you.max_dex = you.dex = cap_stat(sdex);
+ you.max_intel = you.intel = cap_stat(sint);
+
+ you.redraw_strength = true;
+ you.redraw_dexterity = true;
+ you.redraw_intelligence = true;
+}
+
#endif
diff --git a/crawl-ref/source/debug.h b/crawl-ref/source/debug.h
index d53aaaf34d..922d4c3a7d 100644
--- a/crawl-ref/source/debug.h
+++ b/crawl-ref/source/debug.h
@@ -148,5 +148,6 @@ void debug_change_species( void );
void debug_fight_statistics( bool use_init_defaults );
void debug_make_trap( void );
void debug_make_shop( void );
+void debug_set_stats( void );
#endif
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index b8e85c0886..ddaa4a7182 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1379,10 +1379,20 @@ void gain_piety(char pgn)
}
// slow down gain at upper levels of piety
- if (you.piety > 199
- || (you.piety > 150 && one_chance_in(3))
- || (you.piety > 100 && one_chance_in(3)))
- return;
+ if (you.religion != GOD_SIF_MUNA)
+ {
+ if (you.piety > 199
+ || (you.piety > 150 && one_chance_in(3))
+ || (you.piety > 100 && one_chance_in(3)))
+ return;
+ }
+ else
+ {
+ // Sif Muna has a gentler taper off because training because
+ // naturally slower as the player gains in spell skills.
+ if (you.piety > 150 && one_chance_in(5))
+ return;
+ }
int old_piety = you.piety;
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index 36e4bc6727..6f80839df1 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -256,7 +256,10 @@ char in_a_shop( char shoppy, id_arr id )
if (ft == '\\')
{
+ shop_uninit_id(shoppy, shop_id);
check_item_knowledge();
+ shop_init_id(shoppy, shop_id);
+
goto print_stock;
}
@@ -1712,3 +1715,4 @@ const char *shop_name(int sx, int sy)
return (sh_name);
}
+
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index a1cf62a435..e710376950 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -1801,6 +1801,7 @@ static const int skill_display_order[] = {
SK_ARMOUR, SK_DODGING, SK_STEALTH, SK_STABBING, SK_SHIELDS, SK_TRAPS_DOORS,
SK_BLANK_LINE,
+ SK_COLUMN_BREAK,
SK_SPELLCASTING, SK_CONJURATIONS, SK_ENCHANTMENTS, SK_SUMMONINGS,
SK_NECROMANCY, SK_TRANSLOCATIONS, SK_TRANSMIGRATION, SK_DIVINATIONS,