summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-06 05:56:50 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-06 05:56:50 +0000
commitbd1d91f4b91afaf8dd80c329c78b775f43382b87 (patch)
tree38c0cfd9f7268aa1eeb200e19996f63bf24f62b9 /crawl-ref
parent7cd64c37c6b36806e99e92e59581447c9b91560a (diff)
downloadcrawl-ref-bd1d91f4b91afaf8dd80c329c78b775f43382b87.tar.gz
crawl-ref-bd1d91f4b91afaf8dd80c329c78b775f43382b87.zip
Kill hard tabs.
redraw_dexterity now implies redraw_evasion. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@987 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/Kills.cc4
-rw-r--r--crawl-ref/source/beam.cc2
-rw-r--r--crawl-ref/source/chardump.cc30
-rw-r--r--crawl-ref/source/command.cc4
-rw-r--r--crawl-ref/source/describe.cc16
-rw-r--r--crawl-ref/source/dungeon.cc34
-rw-r--r--crawl-ref/source/effects.cc67
-rw-r--r--crawl-ref/source/fight.cc18
-rw-r--r--crawl-ref/source/food.cc71
-rw-r--r--crawl-ref/source/initfile.cc34
-rw-r--r--crawl-ref/source/insult.cc2
-rw-r--r--crawl-ref/source/invent.cc24
-rw-r--r--crawl-ref/source/itemprop.cc16
-rw-r--r--crawl-ref/source/items.cc14
-rw-r--r--crawl-ref/source/libw32c.cc2
-rw-r--r--crawl-ref/source/misc.cc10
-rw-r--r--crawl-ref/source/monplace.cc40
-rw-r--r--crawl-ref/source/monstuff.cc46
-rw-r--r--crawl-ref/source/mstuff2.cc10
-rw-r--r--crawl-ref/source/mt19937ar.cc2
-rw-r--r--crawl-ref/source/mutation.cc22
-rw-r--r--crawl-ref/source/notes.cc148
-rw-r--r--crawl-ref/source/ouch.cc20
-rw-r--r--crawl-ref/source/output.cc10
-rw-r--r--crawl-ref/source/player.cc66
-rw-r--r--crawl-ref/source/religion.cc88
-rw-r--r--crawl-ref/source/shopping.cc24
-rw-r--r--crawl-ref/source/skills.cc8
-rw-r--r--crawl-ref/source/spells3.cc4
-rw-r--r--crawl-ref/source/spells4.cc6
-rw-r--r--crawl-ref/source/spl-cast.cc34
-rw-r--r--crawl-ref/source/spl-util.cc2
-rw-r--r--crawl-ref/source/stash.cc2
-rw-r--r--crawl-ref/source/tutorial.cc10
34 files changed, 449 insertions, 441 deletions
diff --git a/crawl-ref/source/Kills.cc b/crawl-ref/source/Kills.cc
index c3e54fc0ac..5dcb4ba495 100644
--- a/crawl-ref/source/Kills.cc
+++ b/crawl-ref/source/Kills.cc
@@ -280,7 +280,7 @@ void Kills::save(FILE *file) const
writeLong(file, kills.size());
for ( kill_map::const_iterator iter = kills.begin();
- iter != kills.end(); ++iter)
+ iter != kills.end(); ++iter)
{
iter->first.save(file);
iter->second.save(file);
@@ -289,7 +289,7 @@ void Kills::save(FILE *file) const
// How many ghosts do we have?
writeShort(file, ghosts.size());
for (ghost_vec::const_iterator iter = ghosts.begin();
- iter != ghosts.end(); ++iter)
+ iter != ghosts.end(); ++iter)
{
iter->save(file);
}
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 2ac00de047..0cbcbd778b 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2425,7 +2425,7 @@ static void beam_drop_object( struct bolt &beam, item_def *item, int x, int y )
copy_item_to_grid( *item, x, y, 1 );
}
else if (MON_KILL(beam.thrower) // monster threw it.
- && !grid_destroys_items(grd[x][y]) && coinflip())
+ && !grid_destroys_items(grd[x][y]) && coinflip())
{
copy_item_to_grid( *item, x, y, 1 );
} // if (thing_throw == 2) ...
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index 180df83a9c..a1c9eb1901 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -508,13 +508,13 @@ static void dump_stats2( std::string & text, bool calc_unid)
static void sdump_notes(const std::string &, std::string& text)
{
if ( note_list.size() == 0 || Options.use_notes == false )
- return;
+ return;
text += "\nNotes\n| Turn |Location | Note\n";
text += "--------------------------------------------------------------\n";
for ( unsigned i = 0; i < note_list.size(); ++i ) {
- text += note_list[i].describe();
- text += "\n";
+ text += note_list[i].describe();
+ text += "\n";
}
text += "\n";
}
@@ -864,7 +864,7 @@ static void sdump_spells(const std::string &, std::string & text)
text += "You know the following spells:" "\n";
text += "\n";
- text += " Your Spells Type Power Success Level" "\n";
+ text += " Your Spells Type Power Success Level" "\n";
for (int j = 0; j < 52; j++)
{
@@ -879,11 +879,11 @@ static void sdump_spells(const std::string &, std::string & text)
spell_line += " - ";
spell_line += spell_title( spell );
- if ( spell_line.length() > 24 )
- spell_line = spell_line.substr(0, 24);
-
- for (int i = spell_line.length(); i < 26; i++)
- spell_line += ' ';
+ if ( spell_line.length() > 24 )
+ spell_line = spell_line.substr(0, 24);
+
+ for (int i = spell_line.length(); i < 26; i++)
+ spell_line += ' ';
bool already = false;
@@ -892,18 +892,18 @@ static void sdump_spells(const std::string &, std::string & text)
if (spell_typematch( spell, spell_type_index[i] ))
{
spell_line += spell_type_shortname(spell_type_index[i],
- already);
+ already);
already = true;
}
}
- for (int i = spell_line.length(); i < 41; ++i )
- spell_line += ' ';
+ for (int i = spell_line.length(); i < 41; ++i )
+ spell_line += ' ';
- spell_line += spell_power_to_string(calc_spell_power(spell,true));
+ spell_line += spell_power_to_string(calc_spell_power(spell,true));
- for (int i = spell_line.length(); i < 56; ++i )
- spell_line += ' ';
+ for (int i = spell_line.length(); i < 56; ++i )
+ spell_line += ' ';
spell_line += failure_rate_to_string(spell_fail(spell));
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index f9eafe4a7f..06eb50e06c 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -607,8 +607,8 @@ static const char *targeting_help =
"<w>p</w> : fire at Previous target (also <w>t</w>, <w>f</w>)\n"
"<w>+</w> : cycle monsters forward (also <w>=</w>)\n"
"<w>-</w> : cycle monsters backward\n"
- "<w>.</w> : fire at target (also <w>Enter</w> or <w>Del</w>)\n"
- "<w>!</w> : fire at target and stop there\n"
+ "<w>.</w> : fire at target (also <w>Enter</w> or <w>Del</w>)\n"
+ "<w>!</w> : fire at target and stop there\n"
"<w>;</w> : cycle objects forward\n"
"<w>/</w> : cycle objects backward\n"
"<w>v</w> : describe monster under cursor\n"
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index d9c9d10048..3929106b4e 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1847,8 +1847,8 @@ static std::string describe_stick( const item_def &item )
case WAND_DISINTEGRATION:
description += "disrupts the physical structure of "
- "anything but the hardest walls -- even rigid "
- "statues, to say nothing of flesh. ";
+ "anything but the hardest walls -- even rigid "
+ "statues, to say nothing of flesh. ";
break;
default:
@@ -4152,7 +4152,7 @@ void describe_spell(int spelled)
description +=
"causes the air around a creature to twist itself into "
"a whirling vortex of meteorological fury. This spell "
- "is especially effective against flying enemies.";
+ "is especially effective against flying enemies.";
break;
case SPELL_SHADOW_CREATURES:
@@ -4428,9 +4428,9 @@ void describe_spell(int spelled)
"This spell will only deliver the impact of the blow; "
"magical side-effects and enchantments cannot be "
"transferred in this way. The force transferred by "
- "this spell has little to do with one's skill with "
- "weapons, and more to do with personal strength, "
- "translocation skill, and magic ability. ";
+ "this spell has little to do with one's skill with "
+ "weapons, and more to do with personal strength, "
+ "translocation skill, and magic ability. ";
break;
case SPELL_SWAP:
@@ -4958,8 +4958,8 @@ void describe_monsters(int class_described, unsigned char which_mons)
break;
case MONS_DEATH_DRAKE:
- description += "A small dragon, radiating evil.";
- break;
+ description += "A small dragon, radiating evil.";
+ break;
case MONS_FIREDRAKE:
description += "A small dragon, puffing clouds of smoke.";
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index a658f48a49..1ef6ed9e82 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -2703,19 +2703,19 @@ void give_item(int mid, int level_number) //mv: cleanup+minor changes
if (thing_created == NON_ITEM)
return;
- // don't give top-tier wands before 5 HD
- if ( menv[mid].hit_dice < 5 )
- {
- // technically these wands will be undercharged, but it
- // doesn't really matter
- if ( mitm[thing_created].sub_type == WAND_FIRE )
- mitm[thing_created].sub_type = WAND_FLAME;
- if ( mitm[thing_created].sub_type == WAND_COLD )
- mitm[thing_created].sub_type = WAND_FROST;
- if ( mitm[thing_created].sub_type == WAND_LIGHTNING )
- mitm[thing_created].sub_type = (coinflip() ?
- WAND_FLAME : WAND_FROST);
- }
+ // don't give top-tier wands before 5 HD
+ if ( menv[mid].hit_dice < 5 )
+ {
+ // technically these wands will be undercharged, but it
+ // doesn't really matter
+ if ( mitm[thing_created].sub_type == WAND_FIRE )
+ mitm[thing_created].sub_type = WAND_FLAME;
+ if ( mitm[thing_created].sub_type == WAND_COLD )
+ mitm[thing_created].sub_type = WAND_FROST;
+ if ( mitm[thing_created].sub_type == WAND_LIGHTNING )
+ mitm[thing_created].sub_type = (coinflip() ?
+ WAND_FLAME : WAND_FROST);
+ }
mitm[thing_created].flags = 0;
menv[mid].inv[MSLOT_WAND] = thing_created;
@@ -3924,7 +3924,7 @@ static int random_map_for_dlevel(int level_number, bool wantmini = false)
}
if (Options.tutorial_left)
- vault = -1;
+ vault = -1;
return (vault);
}
@@ -5119,7 +5119,7 @@ static void special_room(int level_number, spec_room &sr)
if ((level_number > 13 && spec_room_type == SROOM_LAIR_KOBOLD)
|| (level_number < 16 && spec_room_type == SROOM_MORGUE)
- || (level_number < 14 && spec_room_type == SROOM_JELLY_PIT)
+ || (level_number < 14 && spec_room_type == SROOM_JELLY_PIT)
|| (level_number < 17 && one_chance_in(4)))
{
spec_room_type = SROOM_LAIR_ORC;
@@ -5129,9 +5129,9 @@ static void special_room(int level_number, spec_room &sr)
spec_room_type = SROOM_MORGUE;
if (level_number > 13 &&
- one_chance_in(6 - (level_number > 23) - (level_number > 18)))
+ one_chance_in(6 - (level_number > 23) - (level_number > 18)))
{
- spec_room_type = SROOM_JELLY_PIT;
+ spec_room_type = SROOM_JELLY_PIT;
}
}
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 2767cc0036..1d6490e079 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1149,40 +1149,43 @@ bool acquirement(unsigned char force_class, int agent)
{
// how sad (and stupid)
mprf(MSGCH_SOUND,
- grid_item_destruction_message(grd[you.x_pos][you.y_pos]));
+ grid_item_destruction_message(grd[you.x_pos][you.y_pos]));
}
else
{
- int item_tries = 0;
- randart_properties_t proprt;
-
- for(item_tries = 0; item_tries < 50; item_tries++)
- {
- // BCR - unique is now used for food quantity.
- thing_created = items( unique, class_wanted, type_wanted, true,
- MAKE_GOOD_ITEM, 250 );
-
- // MT - Check: god-gifted weapons and armor shouldn't kill you. Except Xom.
- if(agent != GOD_TROG && agent != GOD_OKAWARU)
- break;
- else
- {
- randart_wpn_properties( mitm[thing_created], proprt );
-
- //check vs stats. positive stats will automatically fall through.
- //As will negative stats that won't kill you.
- if((proprt[RAP_STRENGTH] * -1 >= you.strength ||
- proprt[RAP_INTELLIGENCE] * -1 >= you.intel ||
- proprt[RAP_DEXTERITY] * -1 >= you.dex) && item_tries < 50)
- {
- //try again
- destroy_item(thing_created);
- thing_created = NON_ITEM;
- }
- else
- break;
- }
- }
+ randart_properties_t proprt;
+
+ for (int item_tries = 0; item_tries < 50; item_tries++)
+ {
+ // BCR - unique is now used for food quantity.
+ thing_created = items( unique, class_wanted, type_wanted, true,
+ MAKE_GOOD_ITEM, 250 );
+
+ if (thing_created == NON_ITEM)
+ continue;
+
+ // MT - Check: god-gifted weapons and armor shouldn't kill you.
+ // Except Xom.
+ if (agent == GOD_TROG || agent == GOD_OKAWARU)
+ break;
+ else
+ {
+ randart_wpn_properties( mitm[thing_created], proprt );
+
+ // check vs stats. positive stats will automatically fall
+ // through. As will negative stats that won't kill you.
+ if (-proprt[RAP_STRENGTH] >= you.strength ||
+ -proprt[RAP_INTELLIGENCE] >= you.intel ||
+ -proprt[RAP_DEXTERITY] >= you.dex)
+ {
+ // try again
+ destroy_item(thing_created);
+ thing_created = NON_ITEM;
+ }
+ else
+ break;
+ }
+ }
if (thing_created == NON_ITEM)
{
@@ -1448,7 +1451,7 @@ bool recharge_wand(void)
case WAND_INVISIBILITY:
case WAND_FIREBALL:
case WAND_HEALING:
- case WAND_HASTING:
+ case WAND_HASTING:
charge_gain = 3;
break;
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 54cf63e0d0..defd36c88f 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -134,9 +134,9 @@ int effective_stat_bonus( int wepType )
static int maybe_random2( int x, bool random_factor )
{
if ( random_factor )
- return random2(x);
+ return random2(x);
else
- return x / 2;
+ return x / 2;
}
// Returns the to-hit for your extra unarmed.attacks.
@@ -149,10 +149,10 @@ static int calc_your_to_hit_unarmed()
+ you.skills[SK_FIGHTING] / 5;
if (wearing_amulet(AMU_INACCURACY))
- your_to_hit -= 5;
+ your_to_hit -= 5;
if (you.hunger_state == HS_STARVING)
- your_to_hit -= 3;
+ your_to_hit -= 3;
your_to_hit += slaying_bonus(PWPN_HIT);
@@ -195,7 +195,7 @@ int calc_heavy_armour_penalty( bool random_factor )
for (int i = 0; i < 3; i++)
{
if (you.skills[SK_SHIELDS] < maybe_random2(13,
- random_factor))
+ random_factor))
heavy_armour += maybe_random2(3, random_factor);
}
}
@@ -212,7 +212,7 @@ int calc_heavy_armour_penalty( bool random_factor )
PARM_EVASION );
if (ev_pen < 0 &&
- maybe_random2(you.skills[SK_ARMOUR], random_factor) < abs(ev_pen))
+ maybe_random2(you.skills[SK_ARMOUR], random_factor) < abs(ev_pen))
heavy_armour += maybe_random2( abs(ev_pen), random_factor );
}
@@ -2198,8 +2198,8 @@ int melee_attack::player_unarmed_speed()
&& one_chance_in(heavy_armour_penalty + 1))
{
unarmed_delay = 10 - you.skills[SK_UNARMED_COMBAT] / 5;
-
- /* this shouldn't happen anyway...sanity */
+
+ /* this shouldn't happen anyway...sanity */
if (unarmed_delay < min_delay)
unarmed_delay = min_delay;
}
@@ -2962,7 +2962,7 @@ static void tutorial_weapon_check(const item_def *weapon)
(weapon->base_type != OBJ_WEAPONS
|| is_range_weapon(*weapon)))
{
- learned_something_new(TUT_WIELD_WEAPON);
+ learned_something_new(TUT_WIELD_WEAPON);
}
}
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index a447d19cd6..40aa3cf32c 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -152,30 +152,31 @@ void weapon_switch( int targ )
// look for a butchering implement, prompting user if no obvious
// options exist. Returns whether a weapon was switched.
-static bool find_butchering_implement() {
-
+static bool find_butchering_implement()
+{
// look for a butchering implement in your pack
- for (int i = 0; i < ENDOFPACK; ++i) {
- if (is_valid_item( you.inv[i] )
- && can_cut_meat( you.inv[i] )
- && you.inv[i].base_type == OBJ_WEAPONS
- && item_known_uncursed(you.inv[i])
- && item_type_known(you.inv[i])
- && get_weapon_brand(you.inv[i]) != SPWPN_DISTORTION
- && can_wield( &you.inv[i] ))
- {
- mpr("Switching to a butchering implement.");
- wield_weapon( true, i, false );
-
- // Account for the weapon switch...we're doing this here
- // since the above switch may reveal information about the
- // weapon (curse status, ego type). So even if the
- // character fails to or decides not to butcher past this
- // point, they have achieved something and there should be
- // a cost.
- start_delay( DELAY_UNINTERRUPTIBLE, 1 );
- return true;
- }
+ for (int i = 0; i < ENDOFPACK; ++i)
+ {
+ if (is_valid_item( you.inv[i] )
+ && can_cut_meat( you.inv[i] )
+ && you.inv[i].base_type == OBJ_WEAPONS
+ && item_known_uncursed(you.inv[i])
+ && item_type_known(you.inv[i])
+ && get_weapon_brand(you.inv[i]) != SPWPN_DISTORTION
+ && can_wield( &you.inv[i] ))
+ {
+ mpr("Switching to a butchering implement.");
+ wield_weapon( true, i, false );
+
+ // Account for the weapon switch...we're doing this here
+ // since the above switch may reveal information about the
+ // weapon (curse status, ego type). So even if the
+ // character fails to or decides not to butcher past this
+ // point, they have achieved something and there should be
+ // a cost.
+ start_delay( DELAY_UNINTERRUPTIBLE, 1 );
+ return true;
+ }
}
// if we didn't swap above, then we still can't cut...let's call
@@ -201,11 +202,11 @@ bool butchery(void)
bool barehand_butcher = (you.equip[ EQ_GLOVES ] == -1)
&& (you.attribute[ATTR_TRANSFORMATION] == TRAN_BLADE_HANDS ||
- you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON ||
- (you.attribute[ATTR_TRANSFORMATION] == TRAN_NONE &&
- (you.species == SP_TROLL ||
- you.species == SP_GHOUL ||
- you.mutation[MUT_CLAWS])));
+ you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON ||
+ (you.attribute[ATTR_TRANSFORMATION] == TRAN_NONE &&
+ (you.species == SP_TROLL ||
+ you.species == SP_GHOUL ||
+ you.mutation[MUT_CLAWS])));
can_butcher = barehand_butcher ||
(you.equip[EQ_WEAPON] != -1 &&
@@ -259,7 +260,7 @@ bool butchery(void)
}
if ( answer == 0 )
continue;
-
+
if ( Options.easy_butcher && !can_butcher )
{
// try to find a butchering implement
@@ -272,11 +273,11 @@ bool butchery(void)
(you.inv[wpn].base_type == OBJ_WEAPONS) &&
item_cursed( you.inv[wpn]);
}
-
+
// note that barehanded butchery would not reach this
// stage, so if wpn == -1 the user selected '-' when
// switching weapons
-
+
if (!wpn_switch || wpn == -1 || !can_cut_meat(you.inv[wpn]))
{
// still can't butcher. Early out
@@ -288,13 +289,13 @@ bool butchery(void)
}
else
mpr("Maybe you should try using a sharper implement.");
-
+
if ( !new_cursed && wpn_switch )
start_delay( DELAY_WEAPON_SWAP, 1, old_weapon );
-
- return false;
+
+ return false;
}
-
+
// switched to a good butchering knife
can_butcher = true;
}
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 50bcb190b7..19296c5644 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -176,13 +176,13 @@ std::string channel_to_str( int channel )
static int str_to_book( const std::string& str )
{
if ( str == "fire" || str == "flame" )
- return SBT_FIRE;
+ return SBT_FIRE;
if ( str == "cold" || str == "ice" )
- return SBT_COLD;
+ return SBT_COLD;
if ( str == "summ" || str == "summoning" )
- return SBT_SUMM;
+ return SBT_SUMM;
if ( str == "random" )
- return SBT_RANDOM;
+ return SBT_RANDOM;
return SBT_NO_SELECTION;
}
@@ -981,11 +981,11 @@ static void write_newgame_options(FILE *f)
if (Options.prev_book != SBT_NO_SELECTION )
{
- fprintf(f, "book = %s\n",
- Options.prev_book == SBT_FIRE ? "fire" :
- Options.prev_book == SBT_COLD ? "cold" :
- Options.prev_book == SBT_SUMM ? "summ" :
- "random");
+ fprintf(f, "book = %s\n",
+ Options.prev_book == SBT_FIRE ? "fire" :
+ Options.prev_book == SBT_COLD ? "cold" :
+ Options.prev_book == SBT_SUMM ? "summ" :
+ "random");
}
}
#endif // !DISABLE_STICKY_STARTUP_OPTIONS
@@ -1584,8 +1584,8 @@ void game_options::read_option_line(const std::string &str, bool runscript)
}
else if (key == "book")
{
- // choose this book for classes that get choice
- book = str_to_book( field );
+ // choose this book for classes that get choice
+ book = str_to_book( field );
}
else if (key == "chaos_knight")
{
@@ -1674,7 +1674,7 @@ void game_options::read_option_line(const std::string &str, bool runscript)
}
else if (key == "ood_interesting")
{
- ood_interesting = atoi( field.c_str() );
+ ood_interesting = atoi( field.c_str() );
}
else if (key == "note_monsters")
{
@@ -1727,7 +1727,7 @@ void game_options::read_option_line(const std::string &str, bool runscript)
}
else if (key == "confirm_self_target")
{
- confirm_self_target = read_bool( field, confirm_self_target );
+ confirm_self_target = read_bool( field, confirm_self_target );
}
else if (key == "default_target")
{
@@ -1735,11 +1735,11 @@ void game_options::read_option_line(const std::string &str, bool runscript)
}
else if (key == "safe_autopickup")
{
- safe_autopickup = read_bool( field, safe_autopickup );
+ safe_autopickup = read_bool( field, safe_autopickup );
}
else if (key == "autopickup_no_burden")
{
- autopickup_no_burden = read_bool( field, autopickup_no_burden );
+ autopickup_no_burden = read_bool( field, autopickup_no_burden );
}
else if (key == "use_notes")
{
@@ -2197,11 +2197,11 @@ void game_options::read_option_line(const std::string &str, bool runscript)
}
else if (key == "level_map_title")
{
- level_map_title = read_bool(field, level_map_title);
+ level_map_title = read_bool(field, level_map_title);
}
else if (key == "safe_zero_exp")
{
- safe_zero_exp = read_bool(field, safe_zero_exp);
+ safe_zero_exp = read_bool(field, safe_zero_exp);
}
else if (key == "target_zero_exp")
{
diff --git a/crawl-ref/source/insult.cc b/crawl-ref/source/insult.cc
index bb3b62f11b..4a6359110f 100644
--- a/crawl-ref/source/insult.cc
+++ b/crawl-ref/source/insult.cc
@@ -512,7 +512,7 @@ static const char * insults3(void)
"ratsbane",
"scavenger",
"scut",
- "serf",
+ "serf",
"simpleton",
"skainsmate",
"slime mold",
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 34e708f276..78d0aacf20 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -719,16 +719,16 @@ static int digit_to_index( char digit, operation_types oper ) {
for ( i = 0; i < ENDOFPACK; ++i ) {
if (is_valid_item(you.inv[i])) {
- const std::string& r(you.inv[i].inscription);
- /* note that r.size() is unsigned */
- for ( j = 0; j + 2 < r.size(); ++j ) {
- if ( r[j] == '@' &&
- (r[j+1] == iletter || r[j+1] == '*') &&
- r[j+2] == digit ) {
- return i;
- }
- }
- }
+ const std::string& r(you.inv[i].inscription);
+ /* note that r.size() is unsigned */
+ for ( j = 0; j + 2 < r.size(); ++j ) {
+ if ( r[j] == '@' &&
+ (r[j+1] == iletter || r[j+1] == '*') &&
+ r[j+2] == digit ) {
+ return i;
+ }
+ }
+ }
}
return -1;
}
@@ -743,8 +743,8 @@ static bool has_warning_inscription(const item_def& item,
const std::string& r(item.inscription);
for ( i = 0; i + 1 < r.size(); ++i )
- if (r[i] == '!' && (r[i+1] == iletter || r[i+1] == '*'))
- return true;
+ if (r[i] == '!' && (r[i+1] == iletter || r[i+1] == '*'))
+ return true;
return false;
}
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 1df988ee0e..f4c3986a69 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -461,14 +461,14 @@ void set_ident_flags( item_def &item, unsigned long flags )
bool known_before = fully_identified(item);
item.flags |= flags;
if ( !known_before && fully_identified(item) ) {
- /* make a note of it */
- if ( is_interesting_item(item) ) {
- char buf[ITEMNAME_SIZE];
- char buf2[ITEMNAME_SIZE];
- item_name( item, DESC_NOCAP_A, buf );
- strcpy(buf2, origin_desc(item).c_str());
- take_note(Note(NOTE_ID_ITEM, 0, 0, buf, buf2));
- }
+ /* make a note of it */
+ if ( is_interesting_item(item) ) {
+ char buf[ITEMNAME_SIZE];
+ char buf2[ITEMNAME_SIZE];
+ item_name( item, DESC_NOCAP_A, buf );
+ strcpy(buf2, origin_desc(item).c_str());
+ take_note(Note(NOTE_ID_ITEM, 0, 0, buf, buf2));
+ }
}
}
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 55bae09bfa..1f3f69e71d 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -765,10 +765,10 @@ void item_check(char keyin)
for ( int objl = igrd[you.x_pos][you.y_pos]; objl != NON_ITEM;
- objl = mitm[objl].link )
+ objl = mitm[objl].link )
{
- if ( invisible_to_player(mitm[objl]) )
- continue;
+ if ( invisible_to_player(mitm[objl]) )
+ continue;
counter++;
@@ -828,7 +828,7 @@ void item_check(char keyin)
if (counter_max > 5 && keyin != ';') {
mpr("There are several objects here.");
learned_something_new(TUT_MULTI_PICKUP);
- }
+ }
}
void show_items()
@@ -839,8 +839,8 @@ void show_items()
if ( items.empty() )
mpr("There are no items here.");
else {
- select_items( items, "Things that are here:", true );
- redraw_screen();
+ select_items( items, "Things that are here:", true );
+ redraw_screen();
}
describe_floor();
@@ -2952,7 +2952,7 @@ static void autoinscribe_items()
while (o != NON_ITEM)
{
next = mitm[o].link;
- autoinscribe_item( mitm[o] );
+ autoinscribe_item( mitm[o] );
o = next;
}
}
diff --git a/crawl-ref/source/libw32c.cc b/crawl-ref/source/libw32c.cc
index f07f2ba00c..0625331013 100644
--- a/crawl-ref/source/libw32c.cc
+++ b/crawl-ref/source/libw32c.cc
@@ -50,7 +50,7 @@
#define NOKANJI /* Kanji support stuff. */
#define NOMCX /* Modem Configuration Extensions */
#ifndef _X86_
-#define _X86_ /* target architecture */
+#define _X86_ /* target architecture */
#endif
#include <excpt.h>
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index fb58832925..2aa2d363cb 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -582,7 +582,7 @@ void up_stairs(void)
// Interlevel travel data:
bool collect_travel_data = you.level_type != LEVEL_LABYRINTH
- && you.level_type != LEVEL_ABYSS
+ && you.level_type != LEVEL_ABYSS
&& you.level_type != LEVEL_PANDEMONIUM;
level_id old_level_id = level_id::current();
@@ -826,7 +826,7 @@ void down_stairs( bool remove_stairs, int old_level, int force_stair )
// Interlevel travel data:
bool collect_travel_data = you.level_type != LEVEL_LABYRINTH
- && you.level_type != LEVEL_ABYSS
+ && you.level_type != LEVEL_ABYSS
&& you.level_type != LEVEL_PANDEMONIUM;
level_id old_level_id = level_id::current();
@@ -909,7 +909,7 @@ void down_stairs( bool remove_stairs, int old_level, int force_stair )
you.where_are_you,
true, false );
#if DEBUG_DIAGNOSTICS
- snprintf( info, INFO_SIZE, "Deleting: %s", lname.c_str() );
+ snprintf( info, INFO_SIZE, "Deleting: %s", lname.c_str() );
mpr( info, MSGCH_DIAGNOSTICS );
#endif
unlink(lname.c_str());
@@ -1690,7 +1690,7 @@ bool go_berserk(bool intentional)
}
if (Options.tutorial_left)
- Options.tut_berserk_counter++;
+ Options.tut_berserk_counter++;
mpr("A red film seems to cover your vision as you go berserk!");
mpr("You feel yourself moving faster!");
mpr("You feel mighty!");
@@ -1923,7 +1923,7 @@ bool i_feel_safe(bool announce)
if (announce)
mons.push_back(mon);
else {
- tutorial_first_monster(*mon);
+ tutorial_first_monster(*mon);
return false;
}
}
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 031216d9f2..e743667e80 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -607,7 +607,7 @@ static int place_monster_aux( int mon_type, char behaviour, int target,
mark_interesting_monst(&menv[id], behaviour);
if (player_monster_visible(&menv[id]) && mons_near(&menv[id]))
- seen_monster(&menv[id]);
+ seen_monster(&menv[id]);
return (id);
} // end place_monster_aux()
@@ -1137,35 +1137,35 @@ void mark_interesting_monst(struct monsters* monster, char behaviour)
// Unique monsters are always intersting
if ( mons_is_unique(monster->type) )
- interesting = true;
+ interesting = true;
// If it's never going to attack us, then not interesting
else if (behaviour == BEH_FRIENDLY || behaviour == BEH_GOD_GIFT)
- interesting = false;
+ interesting = false;
// Don't waste time on moname() if user isn't using this option
else if ( Options.note_monsters.size() > 0 )
{
char namebuf[ITEMNAME_SIZE];
- moname(monster->type, true, DESC_NOCAP_A, namebuf);
-
- std::string iname = namebuf;
-
- for (unsigned i = 0; i < Options.note_monsters.size(); ++i) {
- if (Options.note_monsters[i].matches(iname)) {
- interesting = true;
- break;
- }
- }
+ moname(monster->type, true, DESC_NOCAP_A, namebuf);
+
+ std::string iname = namebuf;
+
+ for (unsigned i = 0; i < Options.note_monsters.size(); ++i) {
+ if (Options.note_monsters[i].matches(iname)) {
+ interesting = true;
+ break;
+ }
+ }
}
else if ( you.where_are_you == BRANCH_MAIN_DUNGEON &&
- you.level_type == LEVEL_DUNGEON &&
- mons_level(monster->type) >= you.your_level + ood_limit() &&
- mons_level(monster->type) < 99 &&
- !(monster->type >= MONS_EARTH_ELEMENTAL &&
- monster->type <= MONS_AIR_ELEMENTAL) )
- interesting = true;
+ you.level_type == LEVEL_DUNGEON &&
+ mons_level(monster->type) >= you.your_level + ood_limit() &&
+ mons_level(monster->type) < 99 &&
+ !(monster->type >= MONS_EARTH_ELEMENTAL &&
+ monster->type <= MONS_AIR_ELEMENTAL) )
+ interesting = true;
if ( interesting )
- monster->flags |= MF_INTERESTING;
+ monster->flags |= MF_INTERESTING;
}
// PUBLIC FUNCTION -- mons_place().
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 6b38aed824..38fdbb2692 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -282,8 +282,8 @@ static void monster_drop_ething(struct monsters *monster,
}
if (destroyed) {
- mprf(MSGCH_SOUND,
- grid_item_destruction_message(grd[monster->x][monster->y]));
+ mprf(MSGCH_SOUND,
+ grid_item_destruction_message(grd[monster->x][monster->y]));
}
} // end monster_drop_ething()
@@ -325,7 +325,7 @@ static void place_monster_corpse(const monsters *monster)
// Don't care if 'o' is changed, and it shouldn't be (corpses don't stack)
move_item_to_grid( &o, monster->x, monster->y );
if (you.hunger_state < HS_SATIATED)
- learned_something_new(TUT_MAKE_CHUNKS);
+ learned_something_new(TUT_MAKE_CHUNKS);
} // end place_monster_corpse()
void monster_die(monsters *monster, char killer, int i, bool silent)
@@ -463,10 +463,10 @@ void monster_die(monsters *monster, char killer, int i, bool silent)
// killing triggers tutorial lesson
if (Options.tutorial_events[TUT_KILLED_MONSTER])
- learned_something_new(TUT_KILLED_MONSTER);
- else if (Options.tutorial_left && (you.religion == GOD_TROG || you.religion == GOD_OKAWARU || you.religion == GOD_MAKHLEB)
- && !you.duration[DUR_PRAYER])
- tutorial_prayer_reminder();
+ learned_something_new(TUT_KILLED_MONSTER);
+ else if (Options.tutorial_left && (you.religion == GOD_TROG || you.religion == GOD_OKAWARU || you.religion == GOD_MAKHLEB)
+ && !you.duration[DUR_PRAYER])
+ tutorial_prayer_reminder();
// Xom doesn't care who you killed:
if (you.religion == GOD_XOM
@@ -884,7 +884,7 @@ static bool jelly_divide(struct monsters * parent)
// duplicate enchantments
for ( int i = 0; i < NUM_MON_ENCHANTS; ++i )
- child->enchantment[i] = parent->enchantment[i];
+ child->enchantment[i] = parent->enchantment[i];
child->x = parent->x + jex;
child->y = parent->y + jey;
@@ -1011,19 +1011,19 @@ bool monster_polymorph( struct monsters *monster, int targetc, int power )
return (player_messaged);
}
- // If old monster is visible to the player, and is interesting,
- // then note why the interesting monster went away.
- if (player_monster_visible(monster) && mons_near(monster)
- && MONST_INTERESTING(monster))
+ // If old monster is visible to the player, and is interesting,
+ // then note why the interesting monster went away.
+ if (player_monster_visible(monster) && mons_near(monster)
+ && MONST_INTERESTING(monster))
{
- take_note(Note(NOTE_POLY_MONSTER, monster->type, 0,
+ take_note(Note(NOTE_POLY_MONSTER, monster->type, 0,
ptr_monam(monster, DESC_NOCAP_A, true)));
- }
+ }
// messaging: {dlb}
bool invis = (mons_class_flag( targetc, M_INVIS )
- || mons_has_ench( monster, ENCH_INVIS )) &&
- (!player_see_invis());
+ || mons_has_ench( monster, ENCH_INVIS )) &&
+ (!player_see_invis());
if (mons_has_ench( monster, ENCH_GLOWING_SHAPESHIFTER, ENCH_SHAPESHIFTER ))
strcat( str_polymon, " changes into " );
@@ -1082,12 +1082,12 @@ bool monster_polymorph( struct monsters *monster, int targetc, int power )
monster_drop_ething(monster);
- // New monster type might be interesting
- mark_interesting_monst(monster);
+ // New monster type might be interesting
+ mark_interesting_monst(monster);
- // If new monster is visible to player, then we've seen it
- if (player_monster_visible(monster) && mons_near(monster))
- seen_monster(monster);
+ // If new monster is visible to player, then we've seen it
+ if (player_monster_visible(monster) && mons_near(monster))
+ seen_monster(monster);
return (player_messaged);
} // end monster_polymorph()
@@ -2950,7 +2950,7 @@ static bool handle_wand(struct monsters *monster, bolt &beem)
beem.flavour = theBeam.flavour;
beem.thrower = theBeam.thrower;
beem.is_beam = theBeam.is_beam;
- beem.is_explosion = theBeam.is_explosion;
+ beem.is_explosion = theBeam.is_explosion;
item_def item = mitm[ monster->inv[MSLOT_WAND] ];
@@ -4817,7 +4817,7 @@ static void monster_move(struct monsters *monster)
if (grd[monster->x + mmov_x][monster->y + mmov_y] == DNGN_CLOSED_DOOR
|| (grd[monster->x + mmov_x][monster->y + mmov_y] == DNGN_SECRET_DOOR
&& (mons_intel(monster_index(monster)) == I_HIGH
- || mons_intel(monster_index(monster)) == I_NORMAL)))
+ || mons_intel(monster_index(monster)) == I_NORMAL)))
{
if (monster->type == MONS_ZOMBIE_SMALL
|| monster->type == MONS_ZOMBIE_LARGE
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index b41c4a02ed..93ac6f69f8 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -368,10 +368,10 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
{
case MS_SUMMON_SMALL_MAMMALS:
case MS_VAMPIRE_SUMMON:
- if ( spell_cast == MS_SUMMON_SMALL_MAMMALS )
- sumcount2 = 1 + random2(4);
- else
- sumcount2 = 3 + random2(3) + monster->hit_dice / 5;
+ if ( spell_cast == MS_SUMMON_SMALL_MAMMALS )
+ sumcount2 = 1 + random2(4);
+ else
+ sumcount2 = 3 + random2(3) + monster->hit_dice / 5;
for (sumcount = 0; sumcount < sumcount2; sumcount++)
{
@@ -935,7 +935,7 @@ void throw_type( int lnchClass, int lnchType, int wepClass, int wepType,
if (wepClass == OBJ_MISSILES
&& lnchClass == OBJ_WEAPONS
&& is_range_weapon_type((weapon_type) lnchType)
- && wepType == fires_ammo_type((weapon_type) lnchType))
+ && wepType == fires_ammo_type((weapon_type) lnchType))
{
launched = true;
}
diff --git a/crawl-ref/source/mt19937ar.cc b/crawl-ref/source/mt19937ar.cc
index 2b5697aeb5..ac114a4eb3 100644
--- a/crawl-ref/source/mt19937ar.cc
+++ b/crawl-ref/source/mt19937ar.cc
@@ -94,7 +94,7 @@ void init_genrand(unsigned long s)
mt[0]= s & 0xffffffffUL;
for (mti=1; mti<N; mti++) {
mt[mti] =
- (1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti);
+ (1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti);
/* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
/* In the previous versions, MSBs of the seed affect */
/* only MSBs of the array mt[]. */
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index 131fb90101..0e5055025c 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -1177,7 +1177,7 @@ bool mutate(int which_mutation, bool failMsg)
// except for demonspawn (or other permamutations) in lichform -- haranp
if (you.is_undead && !demonspawn)
{
- if ((!wearing_amulet(AMU_RESIST_MUTATION) && coinflip())
+ if ((!wearing_amulet(AMU_RESIST_MUTATION) && coinflip())
|| one_chance_in(10))
{
mpr( "Your body decomposes!" );
@@ -1506,8 +1506,8 @@ bool mutate(int which_mutation, bool failMsg)
mpr(gain_mutation[mutat][you.mutation[mutat]], MSGCH_MUTATION);
if (you.equip[EQ_HELMET] != -1 &&
- (get_helmet_type(you.inv[you.equip[EQ_HELMET]]) == THELM_CAP ||
- get_helmet_type(you.inv[you.equip[EQ_HELMET]]) == THELM_WIZARD_HAT))
+ (get_helmet_type(you.inv[you.equip[EQ_HELMET]]) == THELM_CAP ||
+ get_helmet_type(you.inv[you.equip[EQ_HELMET]]) == THELM_WIZARD_HAT))
{
break; // horns don't push caps/wizard hats off
}
@@ -1555,8 +1555,8 @@ bool mutate(int which_mutation, bool failMsg)
mpr(gain_mutation[mutat][you.mutation[mutat]], MSGCH_MUTATION);
you.mutation[mutat]++;
calc_hp();
- /* special-case check */
- take_note(Note(NOTE_GET_MUTATION, mutat, you.mutation[mutat]));
+ /* special-case check */
+ take_note(Note(NOTE_GET_MUTATION, mutat, you.mutation[mutat]));
return true;
case MUT_ROBUST:
@@ -1568,8 +1568,8 @@ bool mutate(int which_mutation, bool failMsg)
mpr(gain_mutation[mutat][you.mutation[mutat]], MSGCH_MUTATION);
you.mutation[mutat]++;
calc_hp();
- /* special-case check */
- take_note(Note(NOTE_GET_MUTATION, mutat, you.mutation[mutat]));
+ /* special-case check */
+ take_note(Note(NOTE_GET_MUTATION, mutat, you.mutation[mutat]));
return true;
case MUT_BLACK_SCALES:
@@ -1739,8 +1739,8 @@ bool delete_mutation(int which_mutation)
if (you.mutation[mutat] > 0)
you.mutation[mutat]--;
calc_hp();
- /* special-case check */
- take_note(Note(NOTE_LOSE_MUTATION, mutat, you.mutation[mutat]));
+ /* special-case check */
+ take_note(Note(NOTE_LOSE_MUTATION, mutat, you.mutation[mutat]));
return true;
case MUT_ROBUST:
@@ -1748,8 +1748,8 @@ bool delete_mutation(int which_mutation)
if (you.mutation[mutat] > 0)
you.mutation[mutat]--;
calc_hp();
- /* special-case check */
- take_note(Note(NOTE_LOSE_MUTATION, mutat, you.mutation[mutat]));
+ /* special-case check */
+ take_note(Note(NOTE_LOSE_MUTATION, mutat, you.mutation[mutat]));
return true;
case MUT_BLACK_SCALES:
diff --git a/crawl-ref/source/notes.cc b/crawl-ref/source/notes.cc
index 496b83f336..286bdab320 100644
--- a/crawl-ref/source/notes.cc
+++ b/crawl-ref/source/notes.cc
@@ -39,8 +39,8 @@ static bool is_noteworthy_skill_level( int level )
{
unsigned i;
for ( i = 0; i < Options.note_skill_levels.size(); ++i )
- if ( level == Options.note_skill_levels[i] )
- return true;
+ if ( level == Options.note_skill_levels[i] )
+ return true;
return false;
}
@@ -48,10 +48,10 @@ static bool is_highest_skill( int skill )
{
for ( int i = 0; i < NUM_SKILLS; ++i )
{
- if ( i == skill )
- continue;
- if ( you.skills[i] >= you.skills[skill] )
- return false;
+ if ( i == skill )
+ continue;
+ if ( you.skills[i] >= you.skills[skill] )
+ return false;
}
return true;
}
@@ -59,7 +59,7 @@ static bool is_highest_skill( int skill )
static bool is_noteworthy_hp( int hp, int maxhp )
{
return (hp > 0 && Options.note_hp_percent &&
- hp <= (maxhp * Options.note_hp_percent) / 100);
+ hp <= (maxhp * Options.note_hp_percent) / 100);
}
static int dungeon_branch_depth( unsigned char branch )
@@ -76,12 +76,12 @@ static bool is_noteworthy_dlevel( unsigned short place )
/* Special levels (Abyss, etc.) are always interesting */
if ( lev == 0xFF )
- return true;
+ return true;
if ( lev == dungeon_branch_depth(branch) ||
- (branch == BRANCH_MAIN_DUNGEON && (lev % 5) == 0) ||
- (branch != BRANCH_MAIN_DUNGEON && lev == 1) )
- return true;
+ (branch == BRANCH_MAIN_DUNGEON && (lev % 5) == 0) ||
+ (branch != BRANCH_MAIN_DUNGEON && lev == 1) )
+ return true;
return false;
}
@@ -94,45 +94,45 @@ static bool is_noteworthy( const Note& note )
{
/* always noteworthy */
if ( note.type == NOTE_XP_LEVEL_CHANGE ||
- note.type == NOTE_GET_GOD ||
- note.type == NOTE_GOD_GIFT ||
- note.type == NOTE_GET_MUTATION ||
- note.type == NOTE_LOSE_MUTATION ||
+ note.type == NOTE_GET_GOD ||
+ note.type == NOTE_GOD_GIFT ||
+ note.type == NOTE_GET_MUTATION ||
+ note.type == NOTE_LOSE_MUTATION ||
note.type == NOTE_SEEN_MONSTER ||
- note.type == NOTE_KILL_MONSTER ||
+ note.type == NOTE_KILL_MONSTER ||
note.type == NOTE_POLY_MONSTER ||
- note.type == NOTE_USER_NOTE ||
+ note.type == NOTE_USER_NOTE ||
note.type == NOTE_MESSAGE ||
- note.type == NOTE_LOSE_GOD ||
+ note.type == NOTE_LOSE_GOD ||
note.type == NOTE_MOLLIFY_GOD )
- return true;
+ return true;
/* never noteworthy, hooked up for fun or future use */
if ( note.type == NOTE_GET_ITEM ||
- note.type == NOTE_MP_CHANGE ||
- note.type == NOTE_MAXHP_CHANGE ||
- note.type == NOTE_MAXMP_CHANGE )
- return false;
+ note.type == NOTE_MP_CHANGE ||
+ note.type == NOTE_MAXHP_CHANGE ||
+ note.type == NOTE_MAXMP_CHANGE )
+ return false;
/* god powers might be noteworthy if it's an actual power */
if ( note.type == NOTE_GOD_POWER &&
- real_god_power(note.first, note.second) == -1 )
- return false;
+ real_god_power(note.first, note.second) == -1 )
+ return false;
/* hp noteworthiness is handled in its own function */
if ( note.type == NOTE_HP_CHANGE &&
- !is_noteworthy_hp(note.first, note.second) )
- return false;
+ !is_noteworthy_hp(note.first, note.second) )
+ return false;
/* skills are noteworthy if in the skill value list or if
it's a new maximal skill (depending on options) */
if ( note.type == NOTE_GAIN_SKILL )
{
- if ( is_noteworthy_skill_level(note.second) )
- return true;
- if ( Options.note_skill_max && is_highest_skill(note.first) )
- return true;
- return false;
+ if ( is_noteworthy_skill_level(note.second) )
+ return true;
+ if ( Options.note_skill_max && is_highest_skill(note.first) )
+ return true;
+ return false;
}
if ( note.type == NOTE_DUNGEON_LEVEL_CHANGE )
@@ -147,41 +147,41 @@ static bool is_noteworthy( const Note& note )
/* Learning a spell is always noteworthy if note_all_spells is set */
if ( note.type == NOTE_LEARN_SPELL && Options.note_all_spells )
- return true;
+ return true;
for ( unsigned i = 0; i < note_list.size(); ++i )
{
- if ( note_list[i].type != note.type )
- continue;
- const Note& rnote( note_list[i] );
- switch ( note.type )
+ if ( note_list[i].type != note.type )
+ continue;
+ const Note& rnote( note_list[i] );
+ switch ( note.type )
{
- case NOTE_DUNGEON_LEVEL_CHANGE:
- if ( rnote.packed_place == note.packed_place )
- return false;
- break;
- case NOTE_LEARN_SPELL:
- if (spell_difficulty(rnote.first) >= spell_difficulty(note.first))
- return false;
- break;
- case NOTE_GOD_POWER:
- if ( rnote.first == note.first && rnote.second == note.second )
- return false;
- break;
- case NOTE_ID_ITEM:
- /* re-id'ing an item, e.g. second copy of book, isn't
- noteworthy */
- if ( rnote.name == note.name )
- return false;
- break;
- case NOTE_HP_CHANGE:
- /* not if we have a recent warning */
- if ( (note.turn - rnote.turn < 5) &&
- /* unless we've lost half our HP since then */
- (note.first * 2 >= rnote.first) )
- return false;
- break;
- default:
+ case NOTE_DUNGEON_LEVEL_CHANGE:
+ if ( rnote.packed_place == note.packed_place )
+ return false;
+ break;
+ case NOTE_LEARN_SPELL:
+ if (spell_difficulty(rnote.first) >= spell_difficulty(note.first))
+ return false;
+ break;
+ case NOTE_GOD_POWER:
+ if ( rnote.first == note.first && rnote.second == note.second )
+ return false;
+ break;
+ case NOTE_ID_ITEM:
+ /* re-id'ing an item, e.g. second copy of book, isn't
+ noteworthy */
+ if ( rnote.name == note.name )
+ return false;
+ break;
+ case NOTE_HP_CHANGE:
+ /* not if we have a recent warning */
+ if ( (note.turn - rnote.turn < 5) &&
+ /* unless we've lost half our HP since then */
+ (note.first * 2 >= rnote.first) )
+ return false;
+ break;
+ default:
mpr("Buggy note passed: unknown note type");
// Return now, rather than give a "Buggy note passed" message
// for each note of the matching type in the note list.
@@ -194,11 +194,11 @@ static bool is_noteworthy( const Note& note )
const char* number_to_ordinal( int number )
{
const char* ordinals[5] = { "first", "second", "third", "fourth",
- "fifth" };
+ "fifth" };
if ( number < 1)
- return "[unknown ordinal (too small)]";
+ return "[unknown ordinal (too small)]";
if ( number > 5 )
- return "[unknown ordinal (too big)]";
+ return "[unknown ordinal (too big)]";
return ordinals[number-1];
}
@@ -332,7 +332,7 @@ Note::Note( NOTE_TYPES t, int f, int s, const char* n, const char* d ) :
type(t), first(f), second(s)
{
if (n)
- name = std::string(n);
+ name = std::string(n);
if (d)
desc = std::string(d);
turn = you.num_turns;
@@ -371,7 +371,7 @@ bool notes_are_active()
void take_note( const Note& note, bool force )
{
if ( notes_active && (force || is_noteworthy(note)) )
- note_list.push_back( note );
+ note_list.push_back( note );
}
void activate_notes( bool active )
@@ -384,20 +384,20 @@ void save_notes( FILE* fp )
writeLong( fp, NOTES_VERSION_NUMBER );
writeLong( fp, note_list.size() );
for ( unsigned i = 0; i < note_list.size(); ++i )
- note_list[i].save(fp);
+ note_list[i].save(fp);
}
void load_notes( FILE* fp )
{
if ( readLong(fp) != NOTES_VERSION_NUMBER )
- return;
+ return;
const long num_notes = readLong(fp);
for ( long i = 0; i < num_notes; ++i )
{
- Note new_note;
- new_note.load(fp);
- note_list.push_back(new_note);
+ Note new_note;
+ new_note.load(fp);
+ note_list.push_back(new_note);
}
}
@@ -407,7 +407,7 @@ void make_user_note()
char buf[400];
bool validline = !cancelable_get_line(buf, sizeof(buf));
if ( !validline || (!*buf) )
- return;
+ return;
Note unote(NOTE_USER_NOTE);
unote.name = std::string(buf);
take_note(unote);
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index e022bb8d44..945e494e03 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -382,9 +382,9 @@ void item_corrode( char itco )
}
break;
default:
- /* items which aren't missiles, etc...Could happen
- if we're wielding a deck, say */
- return;
+ /* items which aren't missiles, etc...Could happen
+ if we're wielding a deck, say */
+ return;
}
// determine chance of corrosion {dlb}:
@@ -605,7 +605,7 @@ void lose_level(void)
char buf[200];
sprintf(buf, "HP: %d/%d MP: %d/%d",
- you.hp, you.hp_max, you.magic_points, you.max_magic_points);
+ you.hp, you.hp_max, you.magic_points, you.max_magic_points);
take_note(Note(NOTE_XP_LEVEL_CHANGE, you.experience_level, 0, buf));
you.redraw_experience = 1;
@@ -732,7 +732,7 @@ void ouch( int dam, int death_source, char death_type, const char *aux )
{
mpr( "* * * LOW HITPOINT WARNING * * *", MSGCH_DANGER );
}
- take_note(
+ take_note(
Note(
NOTE_HP_CHANGE,
you.hp,
@@ -867,12 +867,12 @@ void end_game( struct scorefile_entry &se )
const char* suffixes[] = {
#ifdef CLUA_BINDINGS
- ".lua",
+ ".lua",
#endif
#ifdef PACKAGE_SUFFIX
- PACKAGE_SUFFIX ,
+ PACKAGE_SUFFIX ,
#endif
- ".st", ".kil", ".tc", ".nts", ".tut", ".sav"
+ ".st", ".kil", ".tc", ".nts", ".tut", ".sav"
};
const int num_suffixes = sizeof(suffixes) / sizeof(const char*);
@@ -890,8 +890,8 @@ void end_game( struct scorefile_entry &se )
}
if (Options.tutorial_left)
- tutorial_death_screen();
-
+ tutorial_death_screen();
+
if (!crawl_state.seen_hups)
more();
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 21f79e82e7..154fea9e56 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -83,6 +83,10 @@ void print_stats(void)
{
textcolor(LIGHTGREY);
+ // Displayed evasion is now tied to dex.
+ if (you.redraw_dexterity)
+ you.redraw_evasion = true;
+
if (you.redraw_hit_points)
{
const int max_max_hp = you.hp_max + player_rotted();
@@ -609,8 +613,8 @@ const char* itosym3(int stat)
(stat == 2) ? "+ + ." :
(stat == 1) ? "+ . ." :
(stat == 0) ? ". . ." :
- (stat == -1) ? "x . ." :
- (stat == -2) ? "x x ." :
+ (stat == -1) ? "x . ." :
+ (stat == -2) ? "x x ." :
"x x x");
}
@@ -651,7 +655,7 @@ static const char* determine_color_string( int level ) {
switch ( level ) {
case 3:
case 2:
- return "<lightgreen>";
+ return "<lightgreen>";
case 1:
return "<green>";
case -1:
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index a29abcd66c..08a4d1cd98 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -1081,8 +1081,8 @@ bool player_res_asphyx()
bool player_control_teleport(bool calc_unid) {
return ( you.duration[DUR_CONTROL_TELEPORT] ||
- player_equip(EQ_RINGS, RING_TELEPORT_CONTROL, calc_unid) ||
- you.mutation[MUT_TELEPORT_CONTROL] );
+ player_equip(EQ_RINGS, RING_TELEPORT_CONTROL, calc_unid) ||
+ you.mutation[MUT_TELEPORT_CONTROL] );
}
int player_res_torment(bool)
@@ -2209,8 +2209,8 @@ void gain_exp( unsigned int exp_gained )
you.exp_available += exp_gained;
level_change();
- if (Options.tutorial_left && you.experience_level == 5)
- tutorial_finished();
+ if (Options.tutorial_left && you.experience_level == 5)
+ tutorial_finished();
} // end gain_exp()
void level_change(void)
@@ -2780,16 +2780,16 @@ void level_change(void)
if (you.experience_level > you.max_level)
you.max_level = you.experience_level;
-
- char buf[200];
- sprintf(buf, "HP: %d/%d MP: %d/%d",
- you.hp, you.hp_max, you.magic_points, you.max_magic_points);
- take_note(Note(NOTE_XP_LEVEL_CHANGE, you.experience_level, 0, buf));
+
+ char buf[200];
+ sprintf(buf, "HP: %d/%d MP: %d/%d",
+ you.hp, you.hp_max, you.magic_points, you.max_magic_points);
+ take_note(Note(NOTE_XP_LEVEL_CHANGE, you.experience_level, 0, buf));
if (you.religion == GOD_XOM)
Xom_acts(true, you.experience_level, true);
- learned_something_new(TUT_NEW_LEVEL);
+ learned_something_new(TUT_NEW_LEVEL);
}
@@ -3116,7 +3116,7 @@ void display_char_status(void)
int move_cost = (player_speed() * player_movement_speed()) / 10;
if ( you.slow )
- move_cost *= 2;
+ move_cost *= 2;
const bool water = player_in_water();
const bool swim = player_is_swimming();
@@ -3125,7 +3125,7 @@ void display_char_status(void)
const bool fly = (lev && you.duration[DUR_CONTROLLED_FLIGHT]);
const bool swift = (you.duration[DUR_SWIFTNESS] > 0);
snprintf( info, INFO_SIZE,
- "Your %s speed is %s%s%s.",
+ "Your %s speed is %s%s%s.",
// order is important for these:
(swim) ? "swimming" :
(water) ? "wading" :
@@ -3156,17 +3156,17 @@ void display_char_status(void)
// "difficult" - worse than 2 in 3
// "hard" - worse than fair chance
snprintf( info, INFO_SIZE,
- "%s in your current equipment.",
- (to_hit < 1) ? "You are completely incapable of fighting" :
- (to_hit < 5) ? "Hitting even clumsy monsters is extremely awkward" :
- (to_hit < 10) ? "Hitting average monsters is awkward" :
- (to_hit < 15) ? "Hitting average monsters is difficult" :
- (to_hit < 20) ? "Hitting average monsters is hard" :
- (to_hit < 30) ? "Very agile monsters are a bit awkward to hit" :
- (to_hit < 45) ? "Very agile monsters are a bit difficult to hit" :
- (to_hit < 60) ? "Very agile monsters are a bit hard to hit" :
- (to_hit < 100) ? "You feel comfortable with your ability to fight"
- : "You feel confident with your ability to fight" );
+ "%s in your current equipment.",
+ (to_hit < 1) ? "You are completely incapable of fighting" :
+ (to_hit < 5) ? "Hitting even clumsy monsters is extremely awkward" :
+ (to_hit < 10) ? "Hitting average monsters is awkward" :
+ (to_hit < 15) ? "Hitting average monsters is difficult" :
+ (to_hit < 20) ? "Hitting average monsters is hard" :
+ (to_hit < 30) ? "Very agile monsters are a bit awkward to hit" :
+ (to_hit < 45) ? "Very agile monsters are a bit difficult to hit" :
+ (to_hit < 60) ? "Very agile monsters are a bit hard to hit" :
+ (to_hit < 100) ? "You feel comfortable with your ability to fight"
+ : "You feel confident with your ability to fight" );
#if DEBUG_DIAGNOSTICS
char str_pass[INFO_SIZE];
@@ -3193,15 +3193,15 @@ void display_char_status(void)
// XXX: made these values up, probably could be better.
snprintf( info, INFO_SIZE, "You feel %sstealthy.",
- (ustealth < 10) ? "extremely un" :
- (ustealth < 20) ? "very un" :
- (ustealth < 30) ? "un" :
- (ustealth < 50) ? "fairly " :
- (ustealth < 80) ? "" :
- (ustealth < 120) ? "quite " :
- (ustealth < 160) ? "very " :
- (ustealth < 200) ? "extremely "
- : "incredibly " );
+ (ustealth < 10) ? "extremely un" :
+ (ustealth < 20) ? "very un" :
+ (ustealth < 30) ? "un" :
+ (ustealth < 50) ? "fairly " :
+ (ustealth < 80) ? "" :
+ (ustealth < 120) ? "quite " :
+ (ustealth < 160) ? "very " :
+ (ustealth < 200) ? "extremely "
+ : "incredibly " );
#if DEBUG_DIAGNOSTICS
snprintf( str_pass, INFO_SIZE, " (%d)", ustealth );
@@ -4226,7 +4226,7 @@ void poison_player( int amount, bool force )
// XXX: which message channel for this message?
mpr( info );
- learned_something_new(TUT_YOU_POISON);
+ learned_something_new(TUT_YOU_POISON);
}
}
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 31a1927af8..f8b7bd12ac 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -539,7 +539,7 @@ void pray(void)
you.attribute[ATTR_CARD_COUNTDOWN] = 10;
inc_gift_timeout(5 + random2avg(9, 2));
you.num_gifts[you.religion]++;
- take_note(Note(NOTE_GOD_GIFT, you.religion));
+ take_note(Note(NOTE_GOD_GIFT, you.religion));
}
}
break;
@@ -602,7 +602,7 @@ void pray(void)
more();
inc_gift_timeout(4 + random2avg(7, 2));
you.num_gifts[you.religion]++;
- take_note(Note(NOTE_GOD_GIFT, you.religion));
+ take_note(Note(NOTE_GOD_GIFT, you.religion));
}
}
break;
@@ -681,7 +681,7 @@ void pray(void)
inc_gift_timeout(40 + random2avg(19, 2));
you.num_gifts[ you.religion ]++;
- take_note(Note(NOTE_GOD_GIFT, you.religion));
+ take_note(Note(NOTE_GOD_GIFT, you.religion));
}
// Vehumet gives books less readily
@@ -1102,8 +1102,8 @@ void Xom_acts(bool niceness, int sever, bool force_sever)
if (grid_destroys_items(grd[you.x_pos][you.y_pos])) {
// How unfortunate. I'll bet Xom feels sorry for you.
- mprf(MSGCH_SOUND,
- grid_item_destruction_message(grd[you.x_pos][you.y_pos]));
+ mprf(MSGCH_SOUND,
+ grid_item_destruction_message(grd[you.x_pos][you.y_pos]));
}
else
{
@@ -1138,10 +1138,10 @@ void Xom_acts(bool niceness, int sever, bool force_sever)
(temp_rand == 1) ? "Xom grants you a demonic servitor."
: "Xom opens a gate.");
}
- else
- {
- god_speaks(GOD_XOM, "You hear Xom cackling.");
- }
+ else
+ {
+ god_speaks(GOD_XOM, "You hear Xom cackling.");
+ }
done_good = true; // well, for Xom, trying == doing {dlb}
}
@@ -1215,10 +1215,10 @@ void Xom_acts(bool niceness, int sever, bool force_sever)
} // end "Good Things"
if (done_bad || done_good )
- return;
+ return;
if ( one_chance_in(4) ) {
- god_speaks(GOD_XOM, "Xom's attention is distracted from you.");
- return;
+ god_speaks(GOD_XOM, "Xom's attention is distracted from you.");
+ return;
}
goto okay_try_again;
} // end Xom_acts()
@@ -1760,10 +1760,10 @@ void divine_retribution( int god )
{
simple_god_message( " sends the divine host to punish you for your evil ways!", god );
}
- else
- {
- simple_god_message("'s divine host fails to appear.", god);
- }
+ else
+ {
+ simple_god_message("'s divine host fails to appear.", god);
+ }
}
else
{
@@ -1812,10 +1812,10 @@ void divine_retribution( int god )
{
simple_god_message(" sends the divine host to punish you for your evil ways!", god);
}
- else
- {
- simple_god_message("'s divine host fails to appear.", god);
- }
+ else
+ {
+ simple_god_message("'s divine host fails to appear.", god);
+ }
}
else
{
@@ -1838,10 +1838,10 @@ void divine_retribution( int god )
simple_god_message(" sends a greater servant after you!",
god);
}
- else
- {
- simple_god_message("'s greater servant is unavoidably detained.", god);
- }
+ else
+ {
+ simple_god_message("'s greater servant is unavoidably detained.", god);
+ }
}
else
{
@@ -1859,8 +1859,8 @@ void divine_retribution( int god )
if (success)
simple_god_message(" sends minions to punish you.", god);
- else
- simple_god_message("'s minions fail to arrive.", god);
+ else
+ simple_god_message("'s minions fail to arrive.", god);
}
break;
@@ -1882,8 +1882,8 @@ void divine_retribution( int god )
if (success)
simple_god_message(" unleashes Death upon you!", god);
- else
- god_speaks(god, "Death has been delayed...for now.");
+ else
+ god_speaks(god, "Death has been delayed...for now.");
}
else
{
@@ -1925,8 +1925,8 @@ void divine_retribution( int god )
if (success)
simple_god_message(" sends a servant to punish you.", god);
- else
- simple_god_message("'s servant fails to arrive.", god);
+ else
+ simple_god_message("'s servant fails to arrive.", god);
}
else
{
@@ -2010,8 +2010,8 @@ void divine_retribution( int god )
if (success)
simple_god_message(" sends monsters to punish you.", god);
- else
- simple_god_message(" has no time to punish you...now.", god);
+ else
+ simple_god_message(" has no time to punish you...now.", god);
}
break;
@@ -2098,8 +2098,8 @@ void divine_retribution( int god )
if (success)
simple_god_message(" sends forces against you!", god);
- else
- simple_god_message("'s forces are busy with other wars.", god);
+ else
+ simple_god_message("'s forces are busy with other wars.", god);
}
break;
@@ -2171,10 +2171,10 @@ void divine_retribution( int god )
{
simple_god_message(" sends a demon after you!", god);
}
- else
- {
- simple_god_message("'s demon is unavoidably detained.", god);
- }
+ else
+ {
+ simple_god_message("'s demon is unavoidably detained.", god);
+ }
}
else
{
@@ -2192,8 +2192,8 @@ void divine_retribution( int god )
if (success)
simple_god_message(" sends minions to punish you.", god);
- else
- simple_god_message("'s minions fail to arrive.", god);
+ else
+ simple_god_message("'s minions fail to arrive.", god);
}
break;
@@ -2205,10 +2205,10 @@ void divine_retribution( int god )
// Sometimes divine experiences are overwhelming...
if (one_chance_in(5) && you.experience_level < random2(37))
{
- if (coinflip()) {
- mpr( "The divine experience confuses you!", MSGCH_WARN);
+ if (coinflip()) {
+ mpr( "The divine experience confuses you!", MSGCH_WARN);
confuse_player( 3 + random2(10) );
- }
+ }
else
{
if (you.slow < 90)
@@ -2329,7 +2329,7 @@ static bool bless_weapon( int god, int brand, int colour )
you.wield_change = true;
you.num_gifts[god]++;
- take_note(Note(NOTE_GOD_GIFT, you.religion));
+ take_note(Note(NOTE_GOD_GIFT, you.religion));
you.flash_colour = colour;
viewwindow( true, false );
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index ee3df95b1d..9cd5d65d60 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -137,7 +137,7 @@ char in_a_shop( char shoppy, id_arr id )
more3();
- activate_notes(false); /* should do a better job here */
+ activate_notes(false); /* should do a better job here */
shop_init_id(shoppy, shop_id);
/* *************************************
@@ -189,13 +189,13 @@ char in_a_shop( char shoppy, id_arr id )
if (gp_value <= 1)
gp_value = 1;
- const bool can_afford = (you.gold >= gp_value);
- textcolor( can_afford ? LIGHTGREEN : LIGHTRED );
+ const bool can_afford = (you.gold >= gp_value);
+ textcolor( can_afford ? LIGHTGREEN : LIGHTRED );
if (can_afford)
purchasable += c;
- cprintf("%c - ", c);
+ cprintf("%c - ", c);
textcolor((i % 2) ? WHITE : LIGHTGREY);
@@ -444,17 +444,17 @@ static void purchase( int shop, int item_got, int cost )
origin_purchased(mitm[item_got]);
if ( fully_identified(mitm[item_got]) &&
- is_interesting_item(mitm[item_got]) ) {
+ is_interesting_item(mitm[item_got]) ) {
- activate_notes(true);
+ activate_notes(true);
- char buf[ITEMNAME_SIZE];
- char buf2[ITEMNAME_SIZE];
- item_name( mitm[item_got], DESC_NOCAP_A, buf );
- strcpy(buf2, origin_desc(mitm[item_got]).c_str());
- take_note(Note(NOTE_ID_ITEM, 0, 0, buf, buf2));
+ char buf[ITEMNAME_SIZE];
+ char buf2[ITEMNAME_SIZE];
+ item_name( mitm[item_got], DESC_NOCAP_A, buf );
+ strcpy(buf2, origin_desc(mitm[item_got]).c_str());
+ take_note(Note(NOTE_ID_ITEM, 0, 0, buf, buf2));
- activate_notes(false);
+ activate_notes(false);
}
int num = move_item_to_player( item_got, mitm[item_got].quantity, true );
diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc
index 24387490ad..239dba8259 100644
--- a/crawl-ref/source/skills.cc
+++ b/crawl-ref/source/skills.cc
@@ -396,12 +396,12 @@ static int exercise2( int exsk )
*/
if (you.skill_points[exsk] >
- (skill_exp_needed(you.skills[exsk] + 2)
- * species_skills(exsk, you.species) / 100))
+ (skill_exp_needed(you.skills[exsk] + 2)
+ * species_skills(exsk, you.species) / 100))
{
-
+
you.skills[exsk]++;
- take_note(Note(NOTE_GAIN_SKILL, exsk, you.skills[exsk]));
+ take_note(Note(NOTE_GAIN_SKILL, exsk, you.skills[exsk]));
if (you.skills[exsk] == 27) {
snprintf( info, INFO_SIZE, "You have mastered %s!",
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 5adb01c171..77aa6e33c5 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -626,8 +626,8 @@ void you_teleport(void)
void you_teleport2( bool allow_control, bool new_abyss_area )
{
bool is_controlled = (allow_control && !you.conf
- && player_control_teleport()
- && allow_control_teleport());
+ && player_control_teleport()
+ && allow_control_teleport());
if (scan_randarts(RAP_PREVENT_TELEPORTATION))
{
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 0314200c80..17b6b4518a 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -900,7 +900,7 @@ static int tame_beast_monsters(int x, int y, int pow, int garbage)
// 50% bonus for dogs, add cats if they get implemented
if (monster->type == MONS_HOUND || monster->type == MONS_WAR_DOG
- || monster->type == MONS_BLACK_BEAR)
+ || monster->type == MONS_BLACK_BEAR)
{
pow += (pow / 2);
}
@@ -1265,8 +1265,8 @@ static int discharge_monsters( int x, int y, int pow, int garbage )
mpr( "You are struck by lightning." );
damage = 3 + random2( 5 + pow / 10 );
damage = check_your_resists( damage, BEAM_ELECTRICITY );
- if ( player_is_levitating() )
- damage /= 2;
+ if ( player_is_levitating() )
+ damage /= 2;
ouch( damage, 0, KILLED_BY_WILD_MAGIC );
}
else if (mon == NON_MONSTER)
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 83887a0464..4a8dd73ee1 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -156,11 +156,11 @@ char list_spells(void)
char sval[16];
- // 35--48 is the spell schools
-
- gotoxy(51, wherey());
- cprintf("%s",spell_power_to_string(calc_spell_power(spell,true)));
-
+ // 35--48 is the spell schools
+
+ gotoxy(51, wherey());
+ cprintf("%s",spell_power_to_string(calc_spell_power(spell,true)));
+
//gotoxy(58, wherey());
gotoxy(65, wherey());
@@ -726,7 +726,7 @@ void spellcasting_side_effects(int spc2, bool idonly = false)
{
char str_pass[ ITEMNAME_SIZE ];
- // changed from ISFLAG_KNOW_TYPE
+ // changed from ISFLAG_KNOW_TYPE
set_ident_flags( you.inv[you.equip[EQ_WEAPON]], ISFLAG_IDENT_MASK);
strcpy(info, "You are wielding ");
@@ -2107,7 +2107,7 @@ bool miscast_effect( unsigned int sp_type, int mag_pow, int mag_fail,
if (cause)
beam.aux_source = cause;
beam.ex_size = 1;
- beam.is_explosion = true;
+ beam.is_explosion = true;
explosion(beam);
break;
@@ -2137,7 +2137,7 @@ bool miscast_effect( unsigned int sp_type, int mag_pow, int mag_fail,
if (cause)
beam.aux_source = cause;
beam.ex_size = coinflip()?1:2;
- beam.is_explosion = true;
+ beam.is_explosion = true;
explosion(beam);
break;
@@ -2186,8 +2186,8 @@ bool miscast_effect( unsigned int sp_type, int mag_pow, int mag_fail,
mpr("You hear something strange.", MSGCH_SOUND);
else if (you.attribute[ATTR_TRANSFORMATION] != TRAN_AIR)
mpr("Your skull vibrates slightly.");
- else
- canned_msg(MSG_NOTHING_HAPPENS);
+ else
+ canned_msg(MSG_NOTHING_HAPPENS);
break;
}
break;
@@ -3027,7 +3027,7 @@ bool miscast_effect( unsigned int sp_type, int mag_pow, int mag_fail,
if (cause)
beam.aux_source = cause;
beam.ex_size = 1;
- beam.is_explosion = true;
+ beam.is_explosion = true;
explosion(beam);
break;
@@ -3061,7 +3061,7 @@ bool miscast_effect( unsigned int sp_type, int mag_pow, int mag_fail,
if (cause)
beam.aux_source = cause;
beam.ex_size = coinflip()?1:2;
- beam.is_explosion = true;
+ beam.is_explosion = true;
explosion(beam);
break;
@@ -3165,7 +3165,7 @@ bool miscast_effect( unsigned int sp_type, int mag_pow, int mag_fail,
if (cause)
beam.aux_source = cause;
beam.ex_size = 1;
- beam.is_explosion = true;
+ beam.is_explosion = true;
explosion(beam);
break;
@@ -3296,7 +3296,7 @@ bool miscast_effect( unsigned int sp_type, int mag_pow, int mag_fail,
if (cause)
beam.aux_source = cause;
beam.ex_size = 1;
- beam.is_explosion = true;
+ beam.is_explosion = true;
explosion(beam);
break;
@@ -3362,8 +3362,8 @@ bool miscast_effect( unsigned int sp_type, int mag_pow, int mag_fail,
break;
case 1:
snprintf( info, INFO_SIZE, "The wind %s around you!",
- silenced(you.x_pos, you.y_pos) ? "whips" : "howls");
- mpr(info);
+ silenced(you.x_pos, you.y_pos) ? "whips" : "howls");
+ mpr(info);
break;
}
break;
@@ -3406,7 +3406,7 @@ bool miscast_effect( unsigned int sp_type, int mag_pow, int mag_fail,
if (cause)
beam.aux_source = cause;
beam.ex_size = one_chance_in(4)?1:2;
- beam.is_explosion = true;
+ beam.is_explosion = true;
explosion(beam);
break;
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index cdec44268a..2892b6b67e 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -725,7 +725,7 @@ const char* spelltype_short_name( int which_spelltype ) {
case SPTYP_AIR:
return ("Air");
default:
- return "Bug";
+ return "Bug";
}
}
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc
index eca4bf4da6..abc33b44c5 100644
--- a/crawl-ref/source/stash.cc
+++ b/crawl-ref/source/stash.cc
@@ -288,7 +288,7 @@ void Stash::update()
// (only works with stashes enabled)
// learned_something_new(TUT_SEEN_FIRST_OBJECT, x, y);
// learned_something_new(TUT_SEEN_FIRST_OBJECT, item);
- tutorial_first_item(item);
+ tutorial_first_item(item);
if (item.link == NON_ITEM)
items.clear();
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index 3a452a3122..ffbfeed43e 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -737,7 +737,7 @@ void tutorial_finished()
void tutorial_prayer_reminder()
{
if (Options.tut_just_triggered)
- return;
+ return;
if (coinflip())
{// always would be too annoying
snprintf(info, INFO_SIZE, "Remember to <w>p<magenta>ray before battle, so as to dedicate your kills to %s. ", god_name(you.religion));
@@ -763,8 +763,8 @@ void tutorial_healing_reminder()
learned_something_new(TUT_NEED_HEALING);
else if (you.num_turns - Options.tut_last_healed >= 50 && !you.poisoning)
{
- if (Options.tut_just_triggered)
- return;
+ if (Options.tut_just_triggered)
+ return;
snprintf(info, INFO_SIZE, "Remember to rest between fights and to enter unexplored terrain with full");
mpr(info, MSGCH_TUTORIAL);
snprintf(info, INFO_SIZE, "hitpoints and/or magic. To do this, press <w>5<magenta>.");
@@ -998,7 +998,7 @@ void learned_something_new(unsigned int seen_what, int x, int y)
if (Options.tutorial_type == TUT_RANGER_CHAR)
{
- more();
+ more();
snprintf(info, INFO_SIZE, "However, as a hunter you might want to deal with it using your bow. Do this");
mpr(info, MSGCH_TUTORIAL);
snprintf(info, INFO_SIZE, "with the following keypresses: <w>wbf+.<magenta> Here, <w>wb<magenta> wields the bow, <w>f<magenta> fires");
@@ -1012,7 +1012,7 @@ void learned_something_new(unsigned int seen_what, int x, int y)
}
else if (Options.tutorial_type == TUT_MAGIC_CHAR)
{
- more();
+ more();
snprintf(info, INFO_SIZE, "However, as a conjurer you might want to deal with it using magic. Do this");
mpr(info, MSGCH_TUTORIAL);
snprintf(info, INFO_SIZE, "with the following key presses: <w>Za+.<magenta> Here, <w>Za<magenta> zaps the first spell you know,");