summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/acr.cc27
-rw-r--r--crawl-ref/source/misc.cc13
-rw-r--r--crawl-ref/source/ouch.cc3
-rw-r--r--crawl-ref/source/ouch.h3
4 files changed, 21 insertions, 25 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 98569ea0db..6ccafa14fd 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1621,45 +1621,44 @@ static void decrement_durations()
you.duration[DUR_WEAPON_BRAND] = 0;
set_item_ego_type( you.inv[wpn], OBJ_WEAPONS, SPWPN_NORMAL );
- strncpy(info, you.inv[wpn].name(DESC_CAP_YOUR).c_str(), INFO_SIZE);
+
+ std::string msg = you.inv[wpn].name(DESC_CAP_YOUR);
switch (temp_effect)
{
case SPWPN_VORPAL:
- if (get_vorpal_type(you.inv[you.equip[EQ_WEAPON]])
- == DVORP_SLICING)
- strcat(info, " seems blunter.");
+ if (get_vorpal_type(you.inv[you.equip[EQ_WEAPON]])==DVORP_SLICING)
+ msg += " seems blunter.";
else
- strcat(info, " feels lighter.");
+ msg += " feels lighter.";
break;
-
case SPWPN_FLAMING:
- strcat(info, " goes out.");
+ msg += " goes out.";
break;
case SPWPN_FREEZING:
- strcat(info, " stops glowing.");
+ msg += " stops glowing.";
break;
case SPWPN_VENOM:
- strcat(info, " stops dripping with poison.");
+ msg += " stops dripping with poison.";
break;
case SPWPN_DRAINING:
- strcat(info, " stops crackling.");
+ msg += " stops crackling.";
break;
case SPWPN_DISTORTION:
- strcat(info, " seems straighter.");
+ msg += " seems straighter.";
// [dshaligram] Makes the brand unusable
// miscast_effect( SPTYP_TRANSLOCATION, 9, 90, 100, "a distortion effect" );
break;
case SPWPN_PAIN:
- strcat(info, " seems less painful.");
+ msg += " seems less painful.";
break;
default:
- strcat(info, " seems inexplicably less special.");
+ msg += " seems inexplicably less special.";
break;
}
//you.attribute[ATTR_WEAPON_BRAND] = 0;
- mpr(info, MSGCH_DURATION);
+ mpr(msg.c_str(), MSGCH_DURATION);
you.wield_change = true;
}
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index ff43c96cfd..59325a947f 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1511,7 +1511,6 @@ void weird_writing(char stringy[40])
return;
} // end weird_writing()
-// must be a better name than 'place' for the first parameter {dlb}
// returns true if we manage to scramble free.
bool fall_into_a_pool( int entry_x, int entry_y, bool allow_shift,
unsigned char terrain )
@@ -1526,14 +1525,10 @@ bool fall_into_a_pool( int entry_x, int entry_y, bool allow_shift,
return (false);
}
- strcpy(info, "You fall into the ");
-
- strcat(info, (terrain == DNGN_LAVA) ? "lava" :
- (terrain == DNGN_DEEP_WATER) ? "water"
- : "programming rift");
-
- strcat(info, "!");
- mpr(info);
+ mprf("You fall into the %s!",
+ (terrain == DNGN_LAVA) ? "lava" :
+ (terrain == DNGN_DEEP_WATER) ? "water"
+ : "programming rift");
more();
mesclr();
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index c1a772b2a8..8e05aed8a8 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -663,7 +663,8 @@ void drain_exp(void)
} // end drain_exp()
// death_source should be set to zero for non-monsters {dlb}
-void ouch( int dam, int death_source, char death_type, const char *aux )
+void ouch( int dam, int death_source, kill_method_type death_type,
+ const char *aux )
{
ait_hp_loss hpl(dam, death_type);
interrupt_activity( AI_HP_LOSS, &hpl );
diff --git a/crawl-ref/source/ouch.h b/crawl-ref/source/ouch.h
index 451d17bdcf..6d0662696d 100644
--- a/crawl-ref/source/ouch.h
+++ b/crawl-ref/source/ouch.h
@@ -55,7 +55,8 @@ void scrolls_burn(char burn_strength, char target_class);
* called from: acr - bang - beam - command - effects - fight - misc -
* ouch - output - religion - spells - spells2 - spells4
* *********************************************************************** */
-void ouch(int dam, int death_source, char death_type, const char *aux = NULL);
+void ouch(int dam, int death_source, kill_method_type death_type,
+ const char *aux = NULL);
// last updated 12may2000 {dlb}