diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-11-15 00:04:52 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-11-15 00:04:52 -0800 |
commit | 05010f1d267b268e68821223680f34545c443f5c (patch) | |
tree | 967466e274aa990271509d232af4a6c1fd0ad1a5 /crawl-ref/source | |
parent | dd56050f2d05db6ed7ff5bc99acd1032707c27fd (diff) | |
parent | 5bba7e89fd395a2cde9cbf596208785508e22331 (diff) | |
download | crawl-ref-05010f1d267b268e68821223680f34545c443f5c.tar.gz crawl-ref-05010f1d267b268e68821223680f34545c443f5c.zip |
Merge Johnny Shelley's arcane marksman patch
Diffstat (limited to 'crawl-ref/source')
68 files changed, 688 insertions, 681 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index ceb47a2064..739118b602 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -14,10 +14,6 @@ #include <stdio.h> #include <ctype.h> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index ca2006a7e2..b39b0109f4 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -28,12 +28,6 @@ #include <sstream> #include <iostream> -#ifdef TARGET_OS_DOS -#include <dos.h> -#include <conio.h> -#include <file.h> -#endif - #ifdef USE_UNIX_SIGNALS #include <signal.h> #endif @@ -1215,6 +1209,22 @@ static bool _marker_vetoes_stair() return marker_vetoes_operation("veto_stair"); } +// Maybe prompt to enter a portal, return true if we should enter the +// portal, false if the user said no at the prompt. +static bool _prompt_dangerous_portal(dungeon_feature_type ftype) +{ + switch(ftype) + { + case DNGN_ENTER_PANDEMONIUM: + case DNGN_ENTER_ABYSS: + return yesno("If you enter this portal you will not be able to return " + "immediately. Continue?", false, 'n'); + + default: + return (true); + } +} + static void _go_downstairs(); static void _go_upstairs() { @@ -1263,6 +1273,9 @@ static void _go_upstairs() return; } + if (!_prompt_dangerous_portal(ygrd)) + return; + // Does the next level have a warning annotation? if (!check_annotation_exclusion_warning()) return; @@ -1333,6 +1346,9 @@ static void _go_downstairs() return; } + if (!_prompt_dangerous_portal(ygrd)) + return; + // Does the next level have a warning annotation? // Also checks for entering a labyrinth with teleportitis. if (!check_annotation_exclusion_warning()) @@ -4412,12 +4428,12 @@ static void _compile_time_asserts() { // Check that the numbering comments in enum.h haven't been // disturbed accidentally. - COMPILE_CHECK(SK_UNARMED_COMBAT == 19 , c1); - COMPILE_CHECK(SK_EVOCATIONS == 39 , c2); + COMPILE_CHECK(SK_UNARMED_COMBAT == 18 , c1); + COMPILE_CHECK(SK_EVOCATIONS == 38 , c2); COMPILE_CHECK(SP_VAMPIRE == 30 , c3); COMPILE_CHECK(SPELL_DEBUGGING_RAY == 103 , c4); COMPILE_CHECK(SPELL_RETURNING_AMMUNITION == 162 , c5); - COMPILE_CHECK(NUM_SPELLS == 207 , c6); + COMPILE_CHECK(NUM_SPELLS == 211 , c6); //jmf: NEW ASSERTS: we ought to do a *lot* of these COMPILE_CHECK(NUM_SPECIES < SP_UNKNOWN , c7); diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h index ae0204aa6c..97e65922cb 100644 --- a/crawl-ref/source/actor.h +++ b/crawl-ref/source/actor.h @@ -32,6 +32,11 @@ public: virtual void set_position(const coord_def &c); virtual const coord_def& pos() const { return position; } + // Blink the actor to the destination. c should be a + // valid target, though the method returns false + // if the blink fails. + virtual bool blink_to(const coord_def &c, bool quiet = false) = 0; + virtual bool swimming() const = 0; virtual bool submerged() const = 0; virtual bool floundering() const = 0; diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index a5cdbe3cc3..1c54f2914e 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -17,11 +17,6 @@ #include <algorithm> #include <cmath> -#ifdef TARGET_OS_DOS -#include <dos.h> -#include <conio.h> -#endif - #include "externs.h" #include "options.h" @@ -59,12 +54,12 @@ #include "spells4.h" #include "state.h" #include "stuff.h" +#include "teleport.h" #include "terrain.h" #include "transfor.h" #include "traps.h" #include "view.h" #include "shout.h" -#include "teleport.h" #include "viewchar.h" #include "viewgeom.h" #include "xom.h" @@ -189,16 +184,34 @@ static void _zap_animation(int colour, const monsters *mon = NULL, // Special front function for zap_animation to interpret enchantment flavours. static void _ench_animation(int flavour, const monsters *mon, bool force) { - const int elem = (flavour == BEAM_HEALING) ? ETC_HEAL : - (flavour == BEAM_PAIN) ? ETC_UNHOLY : - (flavour == BEAM_DISPEL_UNDEAD) ? ETC_HOLY : - (flavour == BEAM_POLYMORPH) ? ETC_MUTAGENIC : - (flavour == BEAM_CHAOS - || flavour == BEAM_RANDOM) ? ETC_RANDOM : - (flavour == BEAM_TELEPORT - || flavour == BEAM_BANISH - || flavour == BEAM_BLINK) ? ETC_WARP - : ETC_ENCHANT; + element_type elem; + switch (flavour) + { + case BEAM_HEALING: + elem = ETC_HEAL; + break; + case BEAM_PAIN: + elem = ETC_UNHOLY; + break; + case BEAM_DISPEL_UNDEAD: + elem = ETC_HOLY; + break; + case BEAM_POLYMORPH: + elem = ETC_MUTAGENIC; + break; + case BEAM_CHAOS: + elem = ETC_RANDOM; + break; + case BEAM_TELEPORT: + case BEAM_BANISH: + case BEAM_BLINK: + case BEAM_BLINK_CLOSE: + elem = ETC_WARP; + break; + default: + elem = ETC_ENCHANT; + break; + } _zap_animation(element_colour(elem), mon, force); } @@ -3930,7 +3943,12 @@ void bolt::affect_player_enchantment() break; case BEAM_BLINK: - blink_closer(source); + random_blink(false); + obvious_effect = true; + break; + + case BEAM_BLINK_CLOSE: + blink_other_close(&you, source); obvious_effect = true; break; @@ -5145,6 +5163,12 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon) monster_blink(mon); return (MON_AFFECTED); + case BEAM_BLINK_CLOSE: + if (mon->observable()) + obvious_effect = true; + blink_other_close(mon, source); + return (MON_AFFECTED); + case BEAM_POLYMORPH: if (mon->mutate()) obvious_effect = true; @@ -6208,6 +6232,7 @@ std::string beam_type_name(beam_type type) case BEAM_DISINTEGRATION: return ("disintegration"); case BEAM_ENSLAVE_DEMON: return ("enslave demon"); case BEAM_BLINK: return ("blink"); + case BEAM_BLINK_CLOSE: return ("blink close"); case BEAM_PETRIFY: return ("petrify"); case BEAM_CORONA: return ("backlight"); case BEAM_PORKALATOR: return ("porkalator"); diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc index fbbeb77e76..0bd6768184 100644 --- a/crawl-ref/source/chardump.cc +++ b/crawl-ref/source/chardump.cc @@ -19,10 +19,6 @@ #endif #include <ctype.h> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/dat/bazaar.des b/crawl-ref/source/dat/bazaar.des index 9a0e435266..cc9c562ede 100644 --- a/crawl-ref/source/dat/bazaar.des +++ b/crawl-ref/source/dat/bazaar.des @@ -265,7 +265,7 @@ MARKER: * = lua:fog_machine { cloud_type = "flame", \ SUBST: * = . MARKER: O = lua:bazaar_portal() MAP -c...$...c +c.@.$.@.c c.*...*.c c...$...c c.......c diff --git a/crawl-ref/source/dat/database/monspeak.txt b/crawl-ref/source/dat/database/monspeak.txt index 593431bf25..5a64319cfd 100644 --- a/crawl-ref/source/dat/database/monspeak.txt +++ b/crawl-ref/source/dat/database/monspeak.txt @@ -3254,7 +3254,7 @@ _Roxanne_rare_ @The_monster@ says @to_foe@, "They said I was crazy for my new spells... Turns out they were right." %%%% -Roxanne blink_other +Roxanne blink_other_closer w:20 __NONE diff --git a/crawl-ref/source/dat/database/randbook.txt b/crawl-ref/source/dat/database/randbook.txt index 603c144c3c..c1b4a82386 100644 --- a/crawl-ref/source/dat/database/randbook.txt +++ b/crawl-ref/source/dat/database/randbook.txt @@ -539,26 +539,6 @@ Illusion w:2 Slavery %%%% -Divination - -Divination - -Augury - -Prophecy - -Foreboding - -Prediction - -Omens - -Sight - -Visions - -Truth -%%%% Translocation Translocation @@ -712,20 +692,6 @@ Creative Supportive %%%% -Divination adj - -Divine - -Prophetic - -w:5 -All-Knowing - -w:5 -All-Seeing - -Spiritual -%%%% Translocation adj Spatial @@ -995,10 +961,6 @@ Murray Nergalle %%%% -Divination owner - -__NONE -%%%% highlevel Translocation owner Lom Lobon diff --git a/crawl-ref/source/dat/uniques.des b/crawl-ref/source/dat/uniques.des index 83bcfbad9c..344d1efa26 100644 --- a/crawl-ref/source/dat/uniques.des +++ b/crawl-ref/source/dat/uniques.des @@ -285,7 +285,7 @@ MAP ENDMAP NAME: uniq_nessos -DEPTH: 11-16, !Lair +DEPTH: 14-16, 17-19, !Lair TAGS: place_unique MONS: Nessos MAP diff --git a/crawl-ref/source/dat/volcano.des b/crawl-ref/source/dat/volcano.des index a9bdddab9e..ded2ddfe8f 100644 --- a/crawl-ref/source/dat/volcano.des +++ b/crawl-ref/source/dat/volcano.des @@ -986,45 +986,39 @@ NSUBST: M = 4:1 / 1:2 / *:. NSUBST: N = 6:1 / *:. SUBST: " = ..' KFEAT: ' = alarm trap +: set_border_fill_type("open_sea") : fiery_humans(_G) : volcano_setup(_G) : place_chained_volcano(_G) MAP -######################################################### -######################################################### -######################################################### -######################################################### -######################################################### -######################################################### -######################################################### -######################################################### -########wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww######## -########wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww######## -########wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww######## -########wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww######## -########wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww######## -########wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww######## -########wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww######## -########wwwwwwwwWwWwWwWwWwWwWwWwWwWwWwWwWwwwwwwww######## -########wwwwwwwWWWWWWWWWWWWWWWWWWWWWWWWWWWwwwwwww######## -########wwwwwwx...."""....."""....."""....xxwwwww######## -########wwwxxxx...xx+xx...xxxxx...xx+xx...'xxwwww######## -########wwxx.xx..xxMMMxx.xxIIIxx.xxNNNxx..x.xxxww######## -########SSx.x.x..xMMMMMx.xIIIIIx.xNNNNNx..x.xAxSS######## -#######xSSx<x.x..xMMMMMx.xIIIIIx.xNNNNNx..x.x<xSSx####### -#######xlRxxx.x..xxMMMxx.xxIIIxx.xxNNNxx..xx.xxRlx####### -#######xRlllxx....xxxxx...xx+xx...xxxxx...xxxxllRx####### -#######xlRlllxx...."""....."""....."""....xllllRlx####### -#######xRllllllLLLLLLLLLLLLLLLLLLLLLLLLLLLllllllRx####### - xlRllllllLlLlLlLlLlLlLlLlLlLlLlLlLllllllRlx - xRlllVllllllllllllllllllllllllllllllVllllRx - xlRlllllllllllVllllllVllllllllVlllllllllRlx - xRlRlllllllllllllllllllllllllllllllllllRlRx - xRlllRlllRlllRlllRlllRlllRlllRlllRlllRlllRx - xlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlx - xRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRx - xRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRx - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +########################################### +#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww# +#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww# +#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww# +#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww# +#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww# +#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww# +#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww# +#wwwwwwwwWwWwWwWwWwWwWwWwWwWwWwWwWwwwwwwww# +#wwwwwwwWWWWWWWWWWWWWWWWWWWWWWWWWWWwwwwwww# +#wwwwwwx...."""....."""....."""....xxwwwww# +#wwwxxxx...xx+xx...xxxxx...xx+xx...'xxwwww# +#wwxx.xx..xxMMMxx.xxIIIxx.xxNNNxx..x.xxxww# +#SSx.x.x..xMMMMMx.xIIIIIx.xNNNNNx..x.xAxSS# +xSSx<x.x..xMMMMMx.xIIIIIx.xNNNNNx..x.x<xSSx +xlRxxx.x..xxMMMxx.xxIIIxx.xxNNNxx..xx.xxRlx +xRlllxx....xxxxx...xx+xx...xxxxx...xxxxllRx +xlRlllxx...."""....."""....."""....xllllRlx +xRllllllLLLLLLLLLLLLLLLLLLLLLLLLLLLllllllRx +xlRllllllLlLlLlLlLlLlLlLlLlLlLlLlLllllllRlx +xRlllVllllllllllllllllllllllllllllllVllllRx +xlRlllllllllllVllllllVllllllllVlllllllllRlx +xRlRlllllllllllllllllllllllllllllllllllRlRx +xRlllRlllRlllRlllRlllRlllRlllRlllRlllRlllRx +xlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlx +xRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRlRx +xRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRx +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ENDMAP ############################################################################### diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h index 8da0d7cd2b..382eacb187 100644 --- a/crawl-ref/source/defines.h +++ b/crawl-ref/source/defines.h @@ -4,9 +4,6 @@ * Written by: Linley Henzel * * Abstract: A variety of miscellaneous constant values are found here. - * I think we should move the colors into an enum or something - * because there are in numerical order. But I'm too lazy to - * do it myself. * * Copyright © 1999 Brian Robinson. // Me? How come? */ @@ -191,33 +188,36 @@ const int MAX_SEC_ENCHANT = 2; // colors, such pretty colors ... #ifndef TARGET_OS_DOS - #define BLACK 0 - #define BLUE 1 - #define GREEN 2 - #define CYAN 3 - #define RED 4 - #define MAGENTA 5 - #define BROWN 6 - #define LIGHTGREY 7 - #define DARKGREY 8 - #define LIGHTBLUE 9 - #define LIGHTGREEN 10 - #define LIGHTCYAN 11 - #define LIGHTRED 12 - #define LIGHTMAGENTA 13 - #define YELLOW 14 - #define WHITE 15 - - #define LIGHTGRAY LIGHTGREY - #define DARKGRAY DARKGREY +// The order is important (IRGB bit patterns). +enum COLORS +{ + BLACK, + BLUE, + GREEN, + CYAN, + RED, + MAGENTA, + BROWN, + LIGHTGRAY, + LIGHTGREY = LIGHTGRAY, + DARKGRAY, + DARKGREY = DARKGRAY, + LIGHTBLUE, + LIGHTGREEN, + LIGHTCYAN, + LIGHTRED, + LIGHTMAGENTA, + YELLOW, + WHITE, + MAX_TERM_COLOUR +}; #else - #include <conio.h> - #define LIGHTGREY LIGHTGRAY - #define DARKGREY DARKGRAY +# include <conio.h> +# define LIGHTGREY LIGHTGRAY +# define DARKGREY DARKGRAY +# define MAX_TERM_COLOUR 16 #endif -#define MAX_TERM_COLOUR 16 - // Colour options... these are used as bit flags along with the colour // value in the low byte. diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index d210a64827..e75423ded2 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -15,10 +15,6 @@ #include <iomanip> #include <numeric> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "options.h" #include "species.h" @@ -2776,10 +2772,20 @@ void get_monster_db_desc(const monsters& mons, describe_info &inf, inf.title = "A mimic"; } + // This is somewhat hackish, but it's a good way of over-riding monsters' + // descriptions in Lua vaults by using MonPropsMarker. This is also the + // method used by set_feature_desc_long, etc. {due} + if (mons.props.exists("description")) + inf.body << std::string(mons.props["description"]); // Don't get description for player ghosts. - if (mons.type != MONS_PLAYER_GHOST) + else if (mons.type != MONS_PLAYER_GHOST) inf.body << getLongDescription(db_name); - inf.quote = getQuoteString(db_name); + + // And quotes {due} + if (mons.props.exists("quote")) + inf.body << std::string(mons.props["quote"]); + else + inf.quote = getQuoteString(db_name); std::string symbol; symbol += get_monster_data(mons.type)->showchar; diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index abca5f8fd4..afb9d62566 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -16,10 +16,6 @@ #include <stdio.h> #include <algorithm> -#ifdef TARGET_OS_DOS - #include <conio.h> -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 45d30acaaf..99f01b41f9 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1721,7 +1721,7 @@ static int _spell_weight(spell_type spell) // When randomly picking a book for acquirement, use the sum of the // weights of all unknown spells in the book. -static int _book_weight(int book) +static int _book_weight(book_type book) { ASSERT(book >= 0 && book <= MAX_FIXED_BOOK); @@ -1843,7 +1843,7 @@ static bool _do_book_acquirement(item_def &book, int agent) weights[bk] = 0; continue; } - weights[bk] = _book_weight(bk); + weights[bk] = _book_weight(static_cast<book_type>(bk)); total_weights += weights[bk]; } diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index ad5fd564bd..0a9f8193aa 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -242,8 +242,9 @@ enum beam_type // beam[].flavour BEAM_DISINTEGRATION, BEAM_ENSLAVE_DEMON, BEAM_BLINK, + BEAM_BLINK_CLOSE, BEAM_PETRIFY, - BEAM_CORONA, // 45 + BEAM_CORONA, BEAM_PORKALATOR, BEAM_HIBERNATION, BEAM_BERSERK, @@ -278,54 +279,51 @@ enum beam_type // beam[].flavour enum book_type { - BOOK_MINOR_MAGIC_I, // 0 + BOOK_MINOR_MAGIC_I, BOOK_MINOR_MAGIC_II, BOOK_MINOR_MAGIC_III, BOOK_CONJURATIONS_I, BOOK_CONJURATIONS_II, - BOOK_FLAMES, // 5 + BOOK_FLAMES, BOOK_FROST, BOOK_SUMMONINGS, BOOK_FIRE, BOOK_ICE, - BOOK_SURVEYANCES, // 10 BOOK_SPATIAL_TRANSLOCATIONS, BOOK_ENCHANTMENTS, BOOK_YOUNG_POISONERS, BOOK_TEMPESTS, - BOOK_DEATH, // 15 + BOOK_DEATH, BOOK_HINDERANCE, BOOK_CHANGES, BOOK_TRANSFIGURATIONS, - BOOK_PRACTICAL_MAGIC, - BOOK_WAR_CHANTS, // 20 + BOOK_WAR_CHANTS, BOOK_CLOUDS, BOOK_NECROMANCY, BOOK_CALLINGS, BOOK_CHARMS, - BOOK_AIR, // 25 + BOOK_AIR, BOOK_SKY, - BOOK_DIVINATIONS, BOOK_WARP, BOOK_ENVENOMATIONS, - BOOK_UNLIFE, // 30 + BOOK_UNLIFE, BOOK_CONTROL, BOOK_MUTATIONS, BOOK_TUKIMA, BOOK_GEOMANCY, - BOOK_EARTH, // 35 + BOOK_EARTH, BOOK_WIZARDRY, BOOK_POWER, - BOOK_CANTRIPS, //jmf: 04jan2000 - BOOK_PARTY_TRICKS, //jmf: 04jan2000 - BOOK_BEASTS, // 40 - BOOK_STALKING, // renamed -- assassination was confusing -- bwr + BOOK_CANTRIPS, + BOOK_PARTY_TRICKS, + BOOK_BEASTS, + BOOK_STALKING, BOOK_ELEMENTAL_MISSILES, BOOK_WARPED_MISSILES, BOOK_DEVASTATING_MISSILES, - MAX_NORMAL_BOOK = BOOK_DEVASTATING_MISSILES, + MAX_NORMAL_BOOK = BOOK_DEVASTATING_MISSILES, - MIN_GOD_ONLY_BOOK, // 45 + MIN_GOD_ONLY_BOOK, BOOK_ANNIHILATIONS = MIN_GOD_ONLY_BOOK, BOOK_DEMONOLOGY, BOOK_NECRONOMICON, @@ -333,20 +331,16 @@ enum book_type MAX_FIXED_BOOK = MAX_GOD_ONLY_BOOK, - BOOK_RANDART_LEVEL, // 48 + BOOK_RANDART_LEVEL, BOOK_RANDART_THEME, - BOOK_CARD_EFFECT, // not implemented - - MAX_MEMORISABLE_BOOK = BOOK_CARD_EFFECT, BOOK_MANUAL, - BOOK_DESTRUCTION, // 52 + BOOK_DESTRUCTION, NUM_BOOKS }; #define NUM_NORMAL_BOOKS (MAX_NORMAL_BOOK + 1) #define NUM_FIXED_BOOKS (MAX_FIXED_BOOK + 1) -#define NUM_MEMORISABLE_BOOK (MAX_MEMORISABLE_BOOK + 1) enum branch_type // you.where_are_you { @@ -2606,42 +2600,40 @@ enum size_type // order. enum skill_type { - SK_FIGHTING, // 0 + SK_FIGHTING, SK_SHORT_BLADES, SK_LONG_BLADES, - SK_UNUSED_1, // SK_GREAT_SWORDS - now unused SK_AXES, - SK_MACES_FLAILS, // 5 + SK_MACES_FLAILS, SK_POLEARMS, SK_STAVES, SK_SLINGS, SK_BOWS, - SK_CROSSBOWS, // 10 + SK_CROSSBOWS, SK_DARTS, SK_THROWING, SK_ARMOUR, SK_DODGING, - SK_STEALTH, // 15 + SK_STEALTH, SK_STABBING, SK_SHIELDS, SK_TRAPS_DOORS, - SK_UNARMED_COMBAT, // 19 + SK_UNARMED_COMBAT, // 20 // 21 // 22 // 23 // 24 - SK_SPELLCASTING = 25, // 25 + SK_SPELLCASTING = 25, SK_CONJURATIONS, SK_ENCHANTMENTS, SK_SUMMONINGS, SK_NECROMANCY, - SK_TRANSLOCATIONS, // 30 + SK_TRANSLOCATIONS, SK_TRANSMUTATIONS, - SK_DIVINATIONS, SK_FIRE_MAGIC, SK_ICE_MAGIC, - SK_AIR_MAGIC, // 35 + SK_AIR_MAGIC, SK_EARTH_MAGIC, SK_POISON_MAGIC, SK_INVOCATIONS, @@ -2904,6 +2896,10 @@ enum spell_type SPELL_EARTH_ELEMENTALS, SPELL_AIR_ELEMENTALS, SPELL_SLEEP, + SPELL_BLINK_OTHER_CLOSE, + SPELL_BLINK_CLOSE, + SPELL_BLINK_RANGE, + SPELL_BLINK_AWAY, NUM_SPELLS }; diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index ef309a63cc..0090ce03e0 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -13,10 +13,6 @@ #include <stdio.h> #include <algorithm> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "options.h" @@ -587,6 +583,8 @@ bool melee_attack::attack() identify_mimic(attacker); identify_mimic(defender); + coord_def defender_pos = defender->pos(); + if (attacker->atype() == ACT_PLAYER && defender->atype() == ACT_MONSTER) { if (stop_attack_prompt(defender_as_monster(), false, attacker->pos())) @@ -719,7 +717,7 @@ bool melee_attack::attack() if (attacker->atype() == ACT_PLAYER) { - handle_noise(); + handle_noise(defender_pos); if (damage_brand == SPWPN_CHAOS) chaos_affects_attacker(); @@ -992,6 +990,7 @@ bool melee_attack::player_aux_unarmed() bool simple_miss_message = false; std::string miss_verb; + coord_def defender_pos = defender->pos(); if (can_do_unarmed) { if (you.species == SP_NAGA) @@ -1266,7 +1265,7 @@ bool melee_attack::player_aux_unarmed() make_hungry(2, true); - handle_noise(); + handle_noise(defender_pos); alert_nearby_monsters(); // XXX We're clobbering did_hit @@ -3455,7 +3454,7 @@ bool melee_attack::apply_damage_brand() // // * Randart property to make randart weapons louder or softer when // they hit. -void melee_attack::handle_noise() +void melee_attack::handle_noise(const coord_def & pos) { // Successful stabs make no noise. if (stab_attempt) @@ -3471,7 +3470,7 @@ void melee_attack::handle_noise() level = std::max(1, level); if (level > 0) - noisy(level, defender->pos(), attacker->mindex()); + noisy(level, pos, attacker->mindex()); noise_factor = 0; extra_noise = 0; @@ -5146,7 +5145,7 @@ void melee_attack::mons_perform_attack_rounds() { const int nrounds = attacker_as_monster()->has_hydra_multi_attack() ? attacker_as_monster()->number : 4; - const coord_def pos = defender->pos(); + coord_def pos = defender->pos(); const bool was_delayed = you_are_delayed(); // Melee combat, tell attacker to wield its melee weapon. @@ -5156,7 +5155,8 @@ void melee_attack::mons_perform_attack_rounds() for (attack_number = 0; attack_number < nrounds; ++attack_number) { // Handle noise from previous round. - handle_noise(); + if(attack_number > 0) + handle_noise(pos); // Monster went away? if (!defender->alive() || defender->pos() != pos) @@ -5188,6 +5188,7 @@ void melee_attack::mons_perform_attack_rounds() { defender = mons; end = false; + pos = mons->pos(); break; } } @@ -5525,7 +5526,7 @@ void melee_attack::mons_perform_attack_rounds() } // Handle noise from last round. - handle_noise(); + handle_noise(pos); if (def_copy) delete def_copy; diff --git a/crawl-ref/source/fight.h b/crawl-ref/source/fight.h index 3dd95ddf93..3b18c6fea1 100644 --- a/crawl-ref/source/fight.h +++ b/crawl-ref/source/fight.h @@ -210,7 +210,7 @@ private: std::vector<attack_final_effect> final_effects; - void handle_noise(); + void handle_noise(const coord_def & pos); private: // Monster-attack specific stuff diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 5a8f18f599..5f32136ae6 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -21,7 +21,6 @@ #include <functional> #ifdef TARGET_OS_DOS -#include <conio.h> #include <file.h> #endif diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 0be46caba1..641aa5ce8c 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -14,10 +14,6 @@ #include <stdio.h> #include <ctype.h> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index 83c94fe9f9..6149d99b48 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -14,10 +14,6 @@ #include <sstream> #include <iomanip> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index caf76bfd2d..61c0dda3cf 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2313,11 +2313,9 @@ void throw_noise(actor* act, const bolt &pbolt, const item_def &ammo) { const item_def* launcher = act->weapon(); - if (launcher == NULL) + if (launcher == NULL || launcher->base_type != OBJ_WEAPONS) return; - ASSERT(launcher->base_type == OBJ_WEAPONS); - if (is_launched(act, launcher, ammo) != LRET_LAUNCHED) return; diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index ea9c56062e..d1b01e9a1e 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -13,9 +13,6 @@ #include <ctype.h> #include <string.h> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif #include "clua.h" #include "externs.h" @@ -847,7 +844,6 @@ static const char* book_type_name(int booktype) case BOOK_SUMMONINGS: return "Summonings"; case BOOK_FIRE: return "Fire"; case BOOK_ICE: return "Ice"; - case BOOK_SURVEYANCES: return "Surveyances"; case BOOK_SPATIAL_TRANSLOCATIONS: return "Spatial Translocations"; case BOOK_ENCHANTMENTS: return "Enchantments"; case BOOK_TEMPESTS: return "the Tempests"; @@ -855,7 +851,6 @@ static const char* book_type_name(int booktype) case BOOK_HINDERANCE: return "Hinderance"; case BOOK_CHANGES: return "Changes"; case BOOK_TRANSFIGURATIONS: return "Transfigurations"; - case BOOK_PRACTICAL_MAGIC: return "Practical Magic"; case BOOK_WAR_CHANTS: return "War Chants"; case BOOK_CLOUDS: return "Clouds"; case BOOK_NECROMANCY: return "Necromancy"; @@ -864,7 +859,6 @@ static const char* book_type_name(int booktype) case BOOK_DEMONOLOGY: return "Demonology"; case BOOK_AIR: return "Air"; case BOOK_SKY: return "the Sky"; - case BOOK_DIVINATIONS: return "Divinations"; case BOOK_WARP: return "the Warp"; case BOOK_ENVENOMATIONS: return "Envenomations"; case BOOK_ANNIHILATIONS: return "Annihilations"; @@ -884,7 +878,6 @@ static const char* book_type_name(int booktype) case BOOK_DEVASTATING_MISSILES: return "Devastating Missiles"; case BOOK_RANDART_LEVEL: return "Fixed Level"; case BOOK_RANDART_THEME: return "Fixed Theme"; - case BOOK_CARD_EFFECT: return "Card Effects"; default: return "Bugginess"; } } diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index fd192212c5..095d19df50 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -13,10 +13,6 @@ #include <stdlib.h> #include <stdio.h> -#ifdef TARGET_OS_DOS - #include <conio.h> -#endif - #include "externs.h" #include "artefact.h" diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 2e366841c7..9c012ee199 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -15,10 +15,6 @@ #include <stdio.h> #include <ctype.h> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/l_dgnit.cc b/crawl-ref/source/l_dgnit.cc index 7d17571356..6512c3233e 100644 --- a/crawl-ref/source/l_dgnit.cc +++ b/crawl-ref/source/l_dgnit.cc @@ -12,6 +12,7 @@ #include "dungeon.h" #include "items.h" #include "mapdef.h" +#include "stash.h" #define ITEMLIST_METATABLE "crawldgn.item_list" @@ -87,12 +88,63 @@ static int dgn_create_item(lua_State *ls) return (0); } +// Returns two arrays: one of floor items, one of shop items. +static int dgn_stash_items(lua_State *ls) +{ + unsigned min_value = lua_isnumber(ls, 1) ? luaL_checkint(ls, 1) : 0; + bool skip_stackable = lua_isboolean(ls, 2) ? lua_toboolean(ls, 2) + : false; + std::vector<const item_def*> floor_items; + std::vector<const item_def*> shop_items; + + for (ST_ItemIterator stii; stii; ++stii) + { + if (skip_stackable && is_stackable_item(*stii)) + continue; + if (min_value > 0) + { + if (stii.shop()) + { + if (stii.price() < min_value) + continue; + } + else if (item_value(*stii, true) < min_value) + continue; + } + if (stii.shop()) + shop_items.push_back(&(*stii)); + else + floor_items.push_back(&(*stii)); + } + + lua_newtable(ls); + int index = 0; + + for (unsigned int i = 0; i < floor_items.size(); i++) + { + lua_pushlightuserdata(ls, const_cast<item_def*>(floor_items[i])); + lua_rawseti(ls, -2, ++index); + } + + lua_newtable(ls); + index = 0; + + for (unsigned int i = 0; i < shop_items.size(); i++) + { + lua_pushlightuserdata(ls, const_cast<item_def*>(floor_items[i])); + lua_rawseti(ls, -2, ++index); + } + + return (2); +} + const struct luaL_reg dgn_item_dlib[] = { { "item_from_index", dgn_item_from_index }, { "items_at", dgn_items_at }, { "create_item", dgn_create_item }, { "item_spec", _dgn_item_spec }, +{ "stash_items", dgn_stash_items }, { NULL, NULL } }; diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 90963d600e..b25fc498cd 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -1263,6 +1263,9 @@ static brand_type _determine_weapon_brand(const item_def& item, int item_level) if (one_chance_in(8)) rc = SPWPN_DRAINING; + if (one_chance_in(8)) + rc = SPWPN_SPEED; + if (one_chance_in(6)) rc = SPWPN_VENOM; break; @@ -1275,6 +1278,9 @@ static brand_type _determine_weapon_brand(const item_def& item, int item_level) case WPN_SCIMITAR: if (one_chance_in(25)) rc = SPWPN_PAIN; + + if (one_chance_in(7)) + rc = SPWPN_SPEED; // **** intentional fall through here **** case WPN_GREAT_SWORD: case WPN_DOUBLE_SWORD: @@ -1357,6 +1363,9 @@ static brand_type _determine_weapon_brand(const item_def& item, int item_level) rc = SPWPN_REACHING; if (one_chance_in(5)) + rc = SPWPN_SPEED; + + if (one_chance_in(5)) rc = SPWPN_ELECTROCUTION; break; @@ -1373,6 +1382,9 @@ static brand_type _determine_weapon_brand(const item_def& item, int item_level) if (one_chance_in(4)) rc = SPWPN_PROTECTION; + + if (one_chance_in(5)) + rc = SPWPN_SPEED; // **** intentional fall through here **** case WPN_SPEAR: if (one_chance_in(25)) @@ -1415,14 +1427,16 @@ static brand_type _determine_weapon_brand(const item_def& item, int item_level) rc = SPWPN_FLAME; else if (tmp < 500) rc = SPWPN_FROST; - else if (tmp < 660) + else if (tmp < 650) rc = SPWPN_PENETRATION; - else if (tmp < 820) + else if (tmp < 800) rc = SPWPN_REAPING; - else if (tmp < 940) + else if (tmp < 920) rc = SPWPN_PROTECTION; - else + else if (tmp < 980) rc = SPWPN_VORPAL; + else + rc = SPWPN_SPEED; if (item.sub_type == WPN_HAND_CROSSBOW || item.sub_type == WPN_CROSSBOW) if (one_chance_in(5)) rc = SPWPN_ELECTROCUTION; @@ -1438,6 +1452,9 @@ static brand_type _determine_weapon_brand(const item_def& item, int item_level) if (_got_distortion_roll(item_level)) rc = SPWPN_DISTORTION; + if (one_chance_in(5)) + rc = SPWPN_SPEED; + if (one_chance_in(10)) rc = SPWPN_VORPAL; @@ -1446,7 +1463,9 @@ static brand_type _determine_weapon_brand(const item_def& item, int item_level) break; case WPN_LAJATANG: - if (one_chance_in(12)) + if (one_chance_in(8)) + rc = SPWPN_SPEED; + else if (one_chance_in(12)) rc = SPWPN_PAIN; else if (_got_distortion_roll(item_level)) rc = SPWPN_DISTORTION; @@ -2734,12 +2753,7 @@ static void _generate_book_item(item_def& item, int allow_uniques, if (one_chance_in(4)) item.plus = SK_SPELLCASTING + random2(NUM_SKILLS - SK_SPELLCASTING); else - { item.plus = random2(SK_UNARMED_COMBAT); - - if (item.plus == SK_UNUSED_1) - item.plus = SK_UNARMED_COMBAT; - } // Set number of reads possible before it "crumbles to dust". item.plus2 = 3 + random2(15); } diff --git a/crawl-ref/source/map_knowledge.cc b/crawl-ref/source/map_knowledge.cc index e46d7fb45c..d79e727507 100644 --- a/crawl-ref/source/map_knowledge.cc +++ b/crawl-ref/source/map_knowledge.cc @@ -6,9 +6,10 @@ #include "dgnevent.h" #include "directn.h" #include "env.h" +#include "feature.h" +#include "mon-util.h" #include "notes.h" #include "overmap.h" -#include "showsymb.h" #include "stuff.h" #include "terrain.h" #include "view.h" @@ -26,7 +27,13 @@ unsigned map_cell::glyph() const { if (!object) return (' '); - return get_symbol(object, !(flags & MAP_SEEN_FLAG)); + if (object.cls < SH_MONSTER) + { + const feature_def &fdef = get_feature_def(object); + return ((flags & MAP_SEEN_FLAG) ? fdef.symbol : fdef.magic_symbol); + } + else + return (mons_char(object.mons)); } bool map_cell::known() const diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index 77fb18d697..8958d52e27 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -13,10 +13,6 @@ #include <cstring> #include <sstream> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index abd1026f6e..92bc01db73 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -24,10 +24,6 @@ #include <cstdio> #include <cmath> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "options.h" #include "misc.h" diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc index e51d95214e..15cb21337d 100644 --- a/crawl-ref/source/mon-abil.cc +++ b/crawl-ref/source/mon-abil.cc @@ -10,10 +10,6 @@ #include "externs.h" #include "options.h" -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "arena.h" #include "beam.h" #include "colour.h" diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc index 4349a2f3c3..fa6d52143b 100644 --- a/crawl-ref/source/mon-act.cc +++ b/crawl-ref/source/mon-act.cc @@ -7,10 +7,6 @@ #include "AppHdr.h" #include "mon-act.h" -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "arena.h" #include "attitude-change.h" #include "beam.h" diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index bc910a887d..798dba18fd 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -6,10 +6,6 @@ #include "AppHdr.h" #include "mon-cast.h" -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "beam.h" #include "cloud.h" #include "colour.h" @@ -27,13 +23,14 @@ #include "mon-util.h" #include "random.h" #include "religion.h" +#include "shout.h" #include "spl-util.h" #include "spl-cast.h" #include "spells1.h" #include "spells3.h" #include "stuff.h" +#include "teleport.h" #include "view.h" -#include "shout.h" #include "viewchar.h" static bool _valid_mon_spells[NUM_SPELLS]; @@ -625,6 +622,11 @@ bolt mons_spells( monsters *mons, spell_type spell_cast, int power, beam.is_beam = true; break; + case SPELL_BLINK_OTHER_CLOSE: + beam.flavour = BEAM_BLINK_CLOSE; + beam.is_beam = true; + break; + case SPELL_FIRE_BREATH: beam.name = "blast of flame"; beam.aux_source = "blast of fiery breath"; @@ -798,6 +800,9 @@ bool setup_mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, case SPELL_KRAKEN_TENTACLES: case SPELL_BLINK: case SPELL_CONTROLLED_BLINK: + case SPELL_BLINK_RANGE: + case SPELL_BLINK_AWAY: + case SPELL_BLINK_CLOSE: case SPELL_TOMB_OF_DOROKLOHE: case SPELL_CHAIN_LIGHTNING: // the only user is reckless case SPELL_SUMMON_EYEBALLS: @@ -1286,6 +1291,12 @@ bool handle_mon_spell(monsters *monster, bolt &beem) else return (false); } + else if (spell_cast == SPELL_BLINK_RANGE) + blink_range(monster); + else if (spell_cast == SPELL_BLINK_AWAY) + blink_away(monster); + else if (spell_cast == SPELL_BLINK_CLOSE) + blink_close(monster); else { if (spell_needs_foe(spell_cast)) @@ -2040,6 +2051,18 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, } break; } + case SPELL_BLINK_OTHER_CLOSE: + { + // Allow the caster to comment on moving the foe. + std::string msg = getSpeakString(monster->name(DESC_PLAIN) + + " blink_other_close"); + if (!msg.empty() && msg != "__NONE") + { + mons_speaks_msg(monster, msg, MSGCH_TALK, + silenced(you.pos()) || silenced(monster->pos())); + } + break; + } case SPELL_TOMB_OF_DOROKLOHE: { sumcount = 0; diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index ca2c117fcf..788e6f7ef5 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -4879,7 +4879,7 @@ static monsterentry mondata[] = { }, { - MONS_KIRKE, '@', YELLOW, "Kirke", + MONS_KIRKE, '@', LIGHTGREEN, "Kirke", M_UNIQUE | M_SPELLCASTER | M_ACTUAL_SPELLS | M_WARM_BLOOD | M_SEE_INVIS | M_SPEAKS, MR_NO_FLAGS, diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index 4f8897c6eb..49d07dcd99 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -2698,7 +2698,7 @@ bool player_will_anger_monster(monsters *mon, bool *holy, bool *antimagical) { const bool isHoly = - (is_good_god(you.religion) && mon->is_evil()); + (is_good_god(you.religion) && (mon->is_unholy() || mon->is_evil())); const bool isUnholy = (is_evil_god(you.religion) && mon->is_holy()); const bool isLawful = diff --git a/crawl-ref/source/mon-speak.cc b/crawl-ref/source/mon-speak.cc index 3f21434520..5d780e8317 100644 --- a/crawl-ref/source/mon-speak.cc +++ b/crawl-ref/source/mon-speak.cc @@ -12,10 +12,6 @@ #include <stdio.h> #include <algorithm> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "beam.h" diff --git a/crawl-ref/source/mon-spll.h b/crawl-ref/source/mon-spll.h index ace571eae5..0a17a4a77f 100644 --- a/crawl-ref/source/mon-spll.h +++ b/crawl-ref/source/mon-spll.h @@ -1001,7 +1001,7 @@ { SPELL_LEHUDIBS_CRYSTAL_SPEAR, SPELL_IRON_SHOT, - SPELL_BLINK_OTHER, + SPELL_BLINK_OTHER_CLOSE, SPELL_BOLT_OF_MAGMA, SPELL_ISKENDERUNS_MYSTIC_BLAST, SPELL_STONE_ARROW @@ -1066,7 +1066,7 @@ { MST_NESSOS, { SPELL_NO_SPELL, - SPELL_NO_SPELL, + SPELL_BLINK_RANGE, SPELL_HASTE, SPELL_ANIMATE_DEAD, SPELL_NO_SPELL, diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index eff21048af..0e0ae3489a 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -7,15 +7,6 @@ #include "AppHdr.h" #include "mon-stuff.h" -//#include <stdlib.h> -//#include <string.h> -//#include <stdio.h> -//#include <algorithm> - -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "arena.h" #include "artefact.h" #include "attitude-change.h" @@ -2618,29 +2609,8 @@ bool monster_blink(monsters *monster, bool quiet) { coord_def near = _random_monster_nearby_habitable_space(*monster, false, true); - if (near == monster->pos()) - return (false); - - if (!quiet) - simple_monster_message(monster, " blinks!"); - if (!(monster->flags & MF_WAS_IN_VIEW)) - monster->seen_context = "thin air"; - - const coord_def oldplace = monster->pos(); - if (!monster->move_to_pos(near)) - return (false); - - // Leave a purple cloud. - place_cloud(CLOUD_TLOC_ENERGY, oldplace, 1 + random2(3), - monster->kill_alignment()); - - monster->check_redraw(oldplace); - monster->apply_location_effects(oldplace); - - mons_relocated(monster); - - return (true); + return (monster->blink_to(near)); } bool mon_can_be_slimified(monsters *monster) diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index e84cc2d55e..3d07524355 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -1443,9 +1443,31 @@ static bool _get_spellbook_list(mon_spellbook_type book[6], return (retval); } -void define_monster(int index) +static void _get_spells(mon_spellbook_type& book, monsters *mon) { - define_monster(menv[index]); + if (book == MST_NO_SPELLS && mons_class_flag(mon->type, M_SPELLCASTER)) + { + mon_spellbook_type multi_book[6]; + if (_get_spellbook_list(multi_book, mon->type)) + { + do + book = multi_book[random2(6)]; + while (book == MST_NO_SPELLS); + } + } + + mon->load_spells(book); + + // (Dumb) special casing to give ogre mages Haste Other. -cao + if (mon->type == MONS_OGRE_MAGE) + mon->spells[0] = SPELL_HASTE_OTHER; + + mon->bind_spell_flags(); +} + +void define_monster(int midx) +{ + define_monster(menv[midx]); } // Generate a shiny new and unscarred monster. @@ -1562,19 +1584,6 @@ void define_monster(monsters &mons) if (col == BLACK) col = random_colour(); - if (m->sec == MST_NO_SPELLS && mons_class_flag(mons.type, M_SPELLCASTER)) - { - mon_spellbook_type book[6]; - if (_get_spellbook_list(book, mons.type)) - { - do - spells = book[random2(6)]; - while (spells == MST_NO_SPELLS); - } - } - else - spells = m->sec; - // Some calculations. hp = hit_points(hd, m->hpdice[1], m->hpdice[2]); hp += m->hpdice[3]; @@ -1599,13 +1608,8 @@ void define_monster(monsters &mons) mons.experience = 0L; mons.colour = col; - mons.load_spells(spells); - - // (Dumb) special casing to give ogre mages Haste Other. -cao - if (mons.type == MONS_OGRE_MAGE) - mons.spells[0] = SPELL_HASTE_OTHER; - - mons.bind_spell_flags(); + spells = m->sec; + _get_spells(spells, &mons); // Reset monster enchantments. mons.enchantments.clear(); @@ -2258,6 +2262,11 @@ bool ms_low_hitpoint_cast( const monsters *mon, spell_type monspell ) case SPELL_MINOR_HEALING: case SPELL_MAJOR_HEALING: return true; + case SPELL_BLINK_AWAY: + case SPELL_BLINK_RANGE: + return true; + case SPELL_BLINK_OTHER: + return !targ_sanct && targ_adj; case SPELL_BLINK: return targ_adj; case SPELL_TOMB_OF_DOROKLOHE: diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h index 7999466af5..df57a774d7 100644 --- a/crawl-ref/source/mon-util.h +++ b/crawl-ref/source/mon-util.h @@ -577,7 +577,7 @@ void mons_load_spells(monsters *mon, mon_spellbook_type book); monster_type royal_jelly_ejectable_monster(); monster_type random_draconian_monster_species(); -void define_monster(int mid); +void define_monster(int midx); void define_monster(monsters &mons); void mons_pacify(monsters *mon); diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index fc1a726713..c8f0b8fa7f 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -6024,8 +6024,7 @@ int mon_enchant::calc_duration(const monsters *mons, case ENCH_SPORE_PRODUCTION: // This is used as a simple timer, when the enchantment runs out // the monster will create a giant spore. - cturn = 150; - break; + return (random_range(75, 125) * 10); case ENCH_ABJ: if (deg >= 6) diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h index 051018c82e..dce3d7e60e 100644 --- a/crawl-ref/source/monster.h +++ b/crawl-ref/source/monster.h @@ -129,6 +129,7 @@ public: void moveto(const coord_def& c); bool move_to_pos(const coord_def &newpos); + bool blink_to(const coord_def& c, bool quiet = false); kill_category kill_alignment() const; diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index b59cb87431..a606296705 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -13,10 +13,6 @@ #include <sstream> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #if defined(UNIX) && !defined(USE_TILE) #include "libunix.h" #endif diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index 6cbc55326d..d6e6d578db 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -19,11 +19,6 @@ #include <time.h> #include <algorithm> -#ifdef TARGET_OS_DOS -#include <conio.h> -#include <dos.h> -#endif - #ifdef UNIX #include <sys/types.h> #include <fcntl.h> @@ -2378,7 +2373,7 @@ static void _give_wanderer_spell(skill_type skill) spell_type spell = SPELL_NO_SPELL; // Doing a rejection loop for this because I am lazy. - while (skill == SK_SPELLCASTING || skill == SK_DIVINATIONS) + while (skill == SK_SPELLCASTING) { int value = SK_POISON_MAGIC-SK_CONJURATIONS + 1; skill = skill_type(SK_CONJURATIONS + random2(value)); diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 06f8eb2d09..42c8a9f25d 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -14,7 +14,6 @@ #include <ctype.h> #ifdef TARGET_OS_DOS -#include <conio.h> #include <file.h> #endif diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index a1494fe726..82e4fbaecc 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -11,10 +11,6 @@ #include <stdlib.h> #include <sstream> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "options.h" #include "species.h" diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 5b3ccc4ce7..e59cf44cd9 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -8,10 +8,6 @@ #include "player.h" -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include <string.h> #include <stdlib.h> #include <stdio.h> diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index 55894921f0..20c8bcdeab 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -313,6 +313,7 @@ public: void moveto(const coord_def &c); // Move the player during an abyss shift. void shiftto(const coord_def &c); + bool blink_to(const coord_def& c, bool quiet = false); void reset_prev_move(); diff --git a/crawl-ref/source/random-weight.h b/crawl-ref/source/random-weight.h index 7b9995520f..2c7f8b9bca 100644 --- a/crawl-ref/source/random-weight.h +++ b/crawl-ref/source/random-weight.h @@ -1,6 +1,12 @@ #ifndef RANDOM_WEIGHT_H #define RANDOM_WEIGHT_H +/* + * Weighted choice. + * + * Weights are assumed to be non-negative, but are allowed to be zero. + * Returns NULL if nothing found, i.e., if all weights are zero. + */ template <typename T> T* random_choose_weighted(std::vector<std::pair<T, int> > choices) { diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 9e99867dac..8ff2dbcc04 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -221,7 +221,7 @@ const char* god_gain_power_messages[NUM_GODS][MAX_GOD_ABILITIES] = "", "", "Kikubaaqudgha is protecting you from unholy torment.", - "invoke torment by sacrificing corpses" }, + "invoke torment by praying over a corpse" }, // Yredelemnul { "animate remains", "recall your undead slaves", @@ -328,7 +328,7 @@ const char* god_lose_power_messages[NUM_GODS][MAX_GOD_ABILITIES] = "", "", "Kikubaaqudgha will no longer protect you from unholy torment.", - "invoke torment by sacrificing corpses" }, + "invoke torment by praying over a corpse" }, // Yredelemnul { "animate remains", "recall your undead slaves", diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 44cd017fb9..22dfc10cea 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -13,10 +13,6 @@ #include <stdlib.h> #include <string.h> -#ifdef TARGET_OS_DOS - #include <conio.h> -#endif - #include "externs.h" #include "options.h" #include "artefact.h" diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc index ca595e2ff8..a6886f17ca 100644 --- a/crawl-ref/source/show.cc +++ b/crawl-ref/source/show.cc @@ -132,8 +132,32 @@ void show_def::_update_cloud(int cloudno) #endif } -bool show_def::update_monster(const monsters* mons) +static void _check_monster_pos(const monsters* monster) { + int s = monster->mindex(); + ASSERT(mgrd(monster->pos()) == s); + + // [rob] The following in case asserts aren't enabled. + // [enne] - It's possible that mgrd and monster->x/y are out of + // sync because they are updated separately. If we can see this + // monster, then make sure that the mgrd is set correctly. + if (mgrd(monster->pos()) != s) + { + // If this mprf triggers for you, please note any special + // circumstances so we can track down where this is coming + // from. + mprf(MSGCH_ERROR, "monster %s (%d) at (%d, %d) was " + "improperly placed. Updating mgrd.", + monster->name(DESC_PLAIN, true).c_str(), s, + monster->pos().x, monster->pos().y); + mgrd(monster->pos()) = s; + } +} + +void show_def::_update_monster(const monsters* mons) +{ + _check_monster_pos(mons); + const coord_def e = grid2show(mons->pos()); if (!mons->visible_to(&you)) @@ -171,7 +195,7 @@ bool show_def::update_monster(const monsters* mons) grid(e).colour = ripple_table[base_colour & 0x0f]; } - return (false); + return; } // Mimics are always left on map. @@ -182,7 +206,9 @@ bool show_def::update_monster(const monsters* mons) grid(e).mons = mons->type; grid(e).colour = get_mons_colour(mons); - return (true); +#ifdef USE_TILE + tile_place_monster(mons->pos().x, mons->pos().y, mons->mindex(), true); +#endif } void show_def::update_at(const coord_def &gp, const coord_def &ep) @@ -204,7 +230,7 @@ void show_def::update_at(const coord_def &gp, const coord_def &ep) const monsters *mons = monster_at(gp); if (mons && mons->alive()) - update_monster(mons); + _update_monster(mons); } void show_def::init() diff --git a/crawl-ref/source/show.h b/crawl-ref/source/show.h index f35c44c790..a7b31033b7 100644 --- a/crawl-ref/source/show.h +++ b/crawl-ref/source/show.h @@ -73,6 +73,7 @@ class show_def void _update_feat_at(const coord_def &gp, const coord_def &ep); void _update_item_at(const coord_def &gp, const coord_def &ep); void _update_cloud(int cloudno); + void _update_monster(const monsters *monster); void _set_backup(const coord_def &e); public: @@ -80,7 +81,6 @@ public: show_type get_backup(const coord_def &ep) const { return backup(ep); } void init(); - bool update_monster(const monsters *monster); void update_at(const coord_def &gp, const coord_def &ep); }; diff --git a/crawl-ref/source/showsymb.cc b/crawl-ref/source/showsymb.cc index b35fdaeeea..5b2c4bf528 100644 --- a/crawl-ref/source/showsymb.cc +++ b/crawl-ref/source/showsymb.cc @@ -122,8 +122,7 @@ static unsigned short _feat_colour(const coord_def &where, void get_symbol(const coord_def& where, show_type object, unsigned *ch, - unsigned short *colour, - bool magic_mapped) + unsigned short *colour) { ASSERT(ch != NULL); @@ -138,8 +137,7 @@ void get_symbol(const coord_def& where, } const feature_def &fdef = get_feature_def(object); - *ch = magic_mapped ? fdef.magic_symbol - : fdef.symbol; + *ch = fdef.symbol; // Note anything we see that's notable if (!where.origin() && fdef.is_notable()) @@ -158,13 +156,6 @@ void get_symbol(const coord_def& where, *colour = real_colour(*colour); } -unsigned get_symbol(show_type object, bool magic_mapped) -{ - unsigned ch; - get_symbol(coord_def(0,0), object, &ch, NULL, magic_mapped); - return (ch); -} - void get_show_symbol(show_type object, unsigned *ch, unsigned short *colour) { @@ -188,11 +179,6 @@ unsigned grid_character_at(const coord_def &c) return glych; } -dungeon_char_type get_feature_dchar(dungeon_feature_type feat) -{ - return (get_feature_def(feat).dchar); -} - int get_mons_colour(const monsters *mons) { int col = mons->colour; diff --git a/crawl-ref/source/showsymb.h b/crawl-ref/source/showsymb.h index db70462af0..b44612ec40 100644 --- a/crawl-ref/source/showsymb.h +++ b/crawl-ref/source/showsymb.h @@ -19,11 +19,9 @@ unsigned get_screen_glyph( const coord_def &p ); int get_mons_colour(const monsters *mons); unsigned grid_character_at(const coord_def &c); -unsigned get_symbol(show_type object, bool magic_mapped = false); void get_symbol(const coord_def& where, show_type object, unsigned *ch, - unsigned short *colour, - bool magic_mapped = false); + unsigned short *colour); void get_show_symbol(show_type object, unsigned *ch, unsigned short *colour); #endif diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc index 04a33efca1..64fd439fc2 100644 --- a/crawl-ref/source/skills.cc +++ b/crawl-ref/source/skills.cc @@ -270,7 +270,7 @@ static int _exercise2(int exsk) // Experimental restriction (too many spell schools). -- bwr int skill_rank = 1; - for (int i = SK_CONJURATIONS; i <= SK_DIVINATIONS; ++i) + for (int i = SK_CONJURATIONS; i < SK_FIRE_MAGIC; ++i) { if (you.skills[exsk] < you.skills[i]) skill_rank++; diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc index d1719a175b..33ecdb4d31 100644 --- a/crawl-ref/source/skills2.cc +++ b/crawl-ref/source/skills2.cc @@ -16,10 +16,6 @@ #include <stdlib.h> #include <ctype.h> -#ifdef TARGET_OS_DOS - #include <conio.h> -#endif - #include "artefact.h" #include "cio.h" #include "describe.h" @@ -76,66 +72,63 @@ typedef skill_title_key_t stk; const char *skills[50][6] = { // Skill name levels 1-7 levels 8-14 levels 15-20 levels 21-26 level 27 - {"Fighting", "Skirmisher", "Fighter", "Warrior", "Slayer", "Conqueror"}, // 0 + {"Fighting", "Skirmisher", "Fighter", "Warrior", "Slayer", "Conqueror"}, {"Short Blades", "Cutter", "Slicer", "Swashbuckler", "Blademaster", "Eviscerator"}, {"Long Blades", "Slasher", "Carver", "Fencer", "@Adj@ Blade", "Swordmaster"}, - {NULL}, // 3- was: great swords {dlb} {"Axes", "Chopper", "Cleaver", "Severer", "Executioner", "Axe Maniac"}, - {"Maces & Flails", "Cudgeler", "Basher", "Bludgeoner", "Shatterer", "Skullcrusher"}, // 5 + {"Maces & Flails", "Cudgeler", "Basher", "Bludgeoner", "Shatterer", "Skullcrusher"}, {"Polearms", "Poker", "Spear-Bearer", "Impaler", "Phalangite", "@Adj@ Porcupine"}, {"Staves", "Twirler", "Cruncher", "Stickfighter", "Pulveriser", "Chief of Staff"}, {"Slings", "Vandal", "Slinger", "Whirler", "Slingshot", "@Adj@ Catapult"}, {"Bows", "Shooter", "Archer", "Marks@genus@", "Crack Shot", "Merry @Genus@"}, - {"Crossbows", "Bolt Thrower", "Quickloader", "Sharpshooter", "Sniper", "@Adj@ Arbalest"}, // 10 + {"Crossbows", "Bolt Thrower", "Quickloader", "Sharpshooter", "Sniper", "@Adj@ Arbalest"}, {"Darts", "Dart Thrower", "Hurler", "Hedgehog", "Darts Champion", "Perforator"}, {"Throwing", "Chucker", "Thrower", "Deadly Accurate", "Hawkeye", "@Adj@ Ballista"}, {"Armour", "Covered", "Protected", "Tortoise", "Impregnable", "Invulnerable"}, {"Dodging", "Ducker", "Nimble", "Spry", "Acrobat", "Intangible"}, - {"Stealth", "Sneak", "Covert", "Unseen", "Imperceptible", "Ninja"}, // 15 + {"Stealth", "Sneak", "Covert", "Unseen", "Imperceptible", "Ninja"}, {"Stabbing", "Miscreant", "Blackguard", "Backstabber", "Cutthroat", "Politician"}, {"Shields", "Shield-Bearer", "Hoplite", "Blocker", "Peltast", "@Adj@ Barricade"}, {"Traps & Doors", "Scout", "Disarmer", "Vigilant", "Perceptive", "Dungeon Master"}, // STR based fighters, for DEX/martial arts titles see below {"Unarmed Combat", "Ruffian", "Grappler", "Brawler", "Wrestler", "@Weight@weight Champion"}, - {NULL}, // 20- empty - {NULL}, // 21- empty - {NULL}, // 22- empty - {NULL}, // 23- empty - {NULL}, // 24- empty + {NULL}, + {NULL}, + {NULL}, + {NULL}, + {NULL}, + {NULL}, - {"Spellcasting", "Magician", "Thaumaturge", "Eclecticist", "Sorcerer", "Archmage"}, // 25 + {"Spellcasting", "Magician", "Thaumaturge", "Eclecticist", "Sorcerer", "Archmage"}, {"Conjurations", "Ruinous", "Conjurer", "Destroyer", "Devastator", "Annihilator"}, {"Enchantments", "Charm-Maker", "Infuser", "Bewitcher", "Enchanter", "Spellbinder"}, {"Summonings", "Caller", "Summoner", "Convoker", "Demonologist", "Hellbinder"}, {"Necromancy", "Grave Robber", "Reanimator", "Necromancer", "Thanatomancer", "@Genus_Short@ of Death"}, - {"Translocations", "Grasshopper", "Placeless @Genus@", "Blinker", "Portalist", "Plane @Walker@"}, // 30 + {"Translocations", "Grasshopper", "Placeless @Genus@", "Blinker", "Portalist", "Plane @Walker@"}, {"Transmutations", "Changer", "Transmogrifier", "Alchemist", "Malleable", "Shapeless @Genus@"}, - {"Divinations", "Seer", "Clairvoyant", "Diviner", "Augur", "Oracle"}, {"Fire Magic", "Firebug", "Arsonist", "Scorcher", "Pyromancer", "Infernalist"}, {"Ice Magic", "Chiller", "Frost Mage", "Gelid", "Cryomancer", "Englaciator"}, - {"Air Magic", "Gusty", "Cloud Mage", "Aerator", "Anemomancer", "Meteorologist"}, // 35 + {"Air Magic", "Gusty", "Cloud Mage", "Aerator", "Anemomancer", "Meteorologist"}, {"Earth Magic", "Digger", "Geomancer", "Earth Mage", "Metallomancer", "Petrodigitator"}, {"Poison Magic", "Stinger", "Tainter", "Polluter", "Contaminator", "Envenomancer"}, // These titles apply to atheists only, worshippers of the various gods // use the god titles instead, depending on piety or, in Xom's case, mood. {"Invocations", "Unbeliever", "Agnostic", "Dissident", "Heretic", "Apostate"}, - {"Evocations", "Charlatan", "Prestidigitator", "Fetichist", "Evocator", "Talismancer"}, // 39 - -/*NOTE: If more skills are added, must change ranges in level_change() in player.cc */ - - {NULL}, // 40- empty - {NULL}, // 41- empty - {NULL}, // 42- empty - {NULL}, // 43- empty - {NULL}, // 44- empty - {NULL}, // 45- empty - {NULL}, // 46- empty - {NULL}, // 47- empty - {NULL}, // 48- empty - {NULL} // 49- empty {end of array} + {"Evocations", "Charlatan", "Prestidigitator", "Fetichist", "Evocator", "Talismancer"}, + + {NULL}, + {NULL}, + {NULL}, + {NULL}, + {NULL}, + {NULL}, + {NULL}, + {NULL}, + {NULL}, + {NULL} }; const char *martial_arts_titles[6] = @@ -153,7 +146,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -175,6 +167,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 100, // SK_ENCHANTMENTS @@ -182,7 +175,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -196,7 +188,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_FIGHTING 70, // SK_SHORT_BLADES 70, // SK_LONG_BLADES - 100, // SK_UNUSED_1 130, // SK_AXES 150, // SK_MACES_FLAILS 150, // SK_POLEARMS @@ -218,6 +209,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 90, // SK_SPELLCASTING 90, // SK_CONJURATIONS 70, // SK_ENCHANTMENTS @@ -225,7 +217,6 @@ const int spec_skills[NUM_SPECIES][40] = 130, // SK_NECROMANCY 90, // SK_TRANSLOCATIONS 90, // SK_TRANSMUTATIONS - 110, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 70, // SK_AIR_MAGIC @@ -239,7 +230,6 @@ const int spec_skills[NUM_SPECIES][40] = 150, // SK_FIGHTING 100, // SK_SHORT_BLADES 110, // SK_LONG_BLADES - 100, // SK_UNUSED_1 150, // SK_AXES 170, // SK_MACES_FLAILS 170, // SK_POLEARMS @@ -261,6 +251,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 70, // SK_SPELLCASTING 80, // SK_CONJURATIONS 50, // SK_ENCHANTMENTS @@ -268,7 +259,6 @@ const int spec_skills[NUM_SPECIES][40] = 70, // SK_NECROMANCY 80, // SK_TRANSLOCATIONS 80, // SK_TRANSMUTATIONS - 80, // SK_DIVINATIONS 90, // SK_FIRE_MAGIC 90, // SK_ICE_MAGIC 80, // SK_AIR_MAGIC @@ -282,7 +272,6 @@ const int spec_skills[NUM_SPECIES][40] = 80, // SK_FIGHTING 110, // SK_SHORT_BLADES 110, // SK_LONG_BLADES - 100, // SK_UNUSED_1 130, // SK_AXES 140, // SK_MACES_FLAILS 140, // SK_POLEARMS @@ -304,6 +293,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 90, // SK_SPELLCASTING 130, // SK_CONJURATIONS 130, // SK_ENCHANTMENTS @@ -311,7 +301,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 60, // SK_TRANSMUTATIONS - 130, // SK_DIVINATIONS 80, // SK_FIRE_MAGIC 80, // SK_ICE_MAGIC 80, // SK_AIR_MAGIC @@ -325,7 +314,6 @@ const int spec_skills[NUM_SPECIES][40] = 70, // SK_FIGHTING 80, // SK_SHORT_BLADES 90, // SK_LONG_BLADES - 100, // SK_UNUSED_1 70, // SK_AXES 70, // SK_MACES_FLAILS 110, // SK_POLEARMS @@ -347,6 +335,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 210, // SK_SPELLCASTING 120, // SK_CONJURATIONS 150, // SK_ENCHANTMENTS @@ -354,7 +343,6 @@ const int spec_skills[NUM_SPECIES][40] = 160, // SK_NECROMANCY 150, // SK_TRANSLOCATIONS 120, // SK_TRANSMUTATIONS - 130, // SK_DIVINATIONS 70, // SK_FIRE_MAGIC 130, // SK_ICE_MAGIC 150, // SK_AIR_MAGIC @@ -368,7 +356,6 @@ const int spec_skills[NUM_SPECIES][40] = 120, // SK_FIGHTING 60, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 120, // SK_AXES 150, // SK_MACES_FLAILS 160, // SK_POLEARMS @@ -390,6 +377,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 170, // SK_SPELLCASTING 130, // SK_CONJURATIONS 100, // SK_ENCHANTMENTS @@ -397,7 +385,6 @@ const int spec_skills[NUM_SPECIES][40] = 150, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 150, // SK_TRANSMUTATIONS - 140, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 90, // SK_AIR_MAGIC @@ -411,7 +398,6 @@ const int spec_skills[NUM_SPECIES][40] = 70, // SK_FIGHTING 100, // SK_SHORT_BLADES 80, // SK_LONG_BLADES - 100, // SK_UNUSED_1 70, // SK_AXES 80, // SK_MACES_FLAILS 80, // SK_POLEARMS @@ -433,6 +419,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 200, // SK_SPELLCASTING 100, // SK_CONJURATIONS 120, // SK_ENCHANTMENTS @@ -440,7 +427,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 150, // SK_TRANSLOCATIONS 160, // SK_TRANSMUTATIONS - 160, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 150, // SK_AIR_MAGIC @@ -454,7 +440,6 @@ const int spec_skills[NUM_SPECIES][40] = 80, // SK_FIGHTING 60, // SK_SHORT_BLADES 140, // SK_LONG_BLADES - 100, // SK_UNUSED_1 110, // SK_AXES 100, // SK_MACES_FLAILS 150, // SK_POLEARMS @@ -476,6 +461,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 140, // SK_SPELLCASTING 110, // SK_CONJURATIONS 110, // SK_ENCHANTMENTS @@ -483,7 +469,6 @@ const int spec_skills[NUM_SPECIES][40] = 110, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 110, // SK_TRANSMUTATIONS - 130, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -497,7 +482,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_FIGHTING 140, // SK_SHORT_BLADES 140, // SK_LONG_BLADES - 100, // SK_UNUSED_1 140, // SK_AXES 140, // SK_MACES_FLAILS 140, // SK_POLEARMS @@ -518,6 +502,7 @@ const int spec_skills[NUM_SPECIES][40] = 140, // undefined 140, // undefined 140, // undefined + 100, // undefined 140, // undefined 130, // SK_SPELLCASTING 140, // SK_CONJURATIONS @@ -526,7 +511,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 140, // SK_TRANSLOCATIONS 140, // SK_TRANSMUTATIONS - 140, // SK_DIVINATIONS 140, // SK_FIRE_MAGIC 140, // SK_ICE_MAGIC 140, // SK_AIR_MAGIC @@ -540,7 +524,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -562,6 +545,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 100, // SK_ENCHANTMENTS @@ -569,7 +553,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -583,7 +566,6 @@ const int spec_skills[NUM_SPECIES][40] = 70, // SK_FIGHTING 200, // SK_SHORT_BLADES 180, // SK_LONG_BLADES - 100, // SK_UNUSED_1 180, // SK_AXES 90, // SK_MACES_FLAILS 110, // SK_POLEARMS @@ -605,6 +587,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 90, // SK_SPELLCASTING 160, // SK_CONJURATIONS 160, // SK_ENCHANTMENTS @@ -612,7 +595,6 @@ const int spec_skills[NUM_SPECIES][40] = 160, // SK_NECROMANCY 160, // SK_TRANSLOCATIONS 160, // SK_TRANSMUTATIONS - 160, // SK_DIVINATIONS 160, // SK_FIRE_MAGIC 160, // SK_ICE_MAGIC 160, // SK_AIR_MAGIC @@ -626,7 +608,6 @@ const int spec_skills[NUM_SPECIES][40] = 140, // SK_FIGHTING 150, // SK_SHORT_BLADES 150, // SK_LONG_BLADES - 100, // SK_UNUSED_1 150, // SK_AXES 130, // SK_MACES_FLAILS 150, // SK_POLEARMS @@ -648,6 +629,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 260, // SK_SPELLCASTING 160, // SK_CONJURATIONS 200, // SK_ENCHANTMENTS @@ -655,7 +637,6 @@ const int spec_skills[NUM_SPECIES][40] = 150, // SK_NECROMANCY 160, // SK_TRANSLOCATIONS 160, // SK_TRANSMUTATIONS - 200, // SK_DIVINATIONS 160, // SK_FIRE_MAGIC 160, // SK_ICE_MAGIC 200, // SK_AIR_MAGIC @@ -669,7 +650,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -691,6 +671,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 120, // SK_ENCHANTMENTS @@ -698,7 +679,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 70, // SK_FIRE_MAGIC 140, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -712,7 +692,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -734,6 +713,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 120, // SK_ENCHANTMENTS @@ -741,7 +721,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 140, // SK_FIRE_MAGIC 70, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -755,7 +734,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -777,6 +755,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 120, // SK_ENCHANTMENTS @@ -784,7 +763,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -798,7 +776,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -820,6 +797,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 120, // SK_ENCHANTMENTS @@ -827,7 +805,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -841,7 +818,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -863,6 +839,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 120, // SK_ENCHANTMENTS @@ -870,7 +847,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -884,7 +860,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -906,6 +881,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 120, // SK_ENCHANTMENTS @@ -913,7 +889,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 70, // SK_AIR_MAGIC @@ -927,7 +902,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -949,6 +923,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 90, // SK_SPELLCASTING 100, // SK_CONJURATIONS 90, // SK_ENCHANTMENTS @@ -956,7 +931,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -970,7 +944,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -992,6 +965,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 120, // SK_ENCHANTMENTS @@ -999,7 +973,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 80, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -1013,7 +986,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -1035,6 +1007,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 120, // SK_ENCHANTMENTS @@ -1042,7 +1015,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 90, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 90, // SK_AIR_MAGIC @@ -1056,7 +1028,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_FIGHTING 100, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 100, // SK_AXES 100, // SK_MACES_FLAILS 100, // SK_POLEARMS @@ -1078,6 +1049,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 120, // SK_ENCHANTMENTS @@ -1085,7 +1057,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 100, // SK_TRANSLOCATIONS 100, // SK_TRANSMUTATIONS - 100, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -1099,7 +1070,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_FIGHTING 120, // SK_SHORT_BLADES 110, // SK_LONG_BLADES - 100, // SK_UNUSED_1 110, // SK_AXES 110, // SK_MACES_FLAILS 110, // SK_POLEARMS @@ -1121,6 +1091,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 180, // SK_SPELLCASTING 120, // SK_CONJURATIONS 110, // SK_ENCHANTMENTS @@ -1128,7 +1099,6 @@ const int spec_skills[NUM_SPECIES][40] = 120, // SK_NECROMANCY 120, // SK_TRANSLOCATIONS 120, // SK_TRANSMUTATIONS - 130, // SK_DIVINATIONS 120, // SK_FIRE_MAGIC 120, // SK_ICE_MAGIC 120, // SK_AIR_MAGIC @@ -1142,7 +1112,6 @@ const int spec_skills[NUM_SPECIES][40] = 110, // SK_FIGHTING 110, // SK_SHORT_BLADES 110, // SK_LONG_BLADES - 100, // SK_UNUSED_1 110, // SK_AXES 110, // SK_MACES_FLAILS 110, // SK_POLEARMS @@ -1162,6 +1131,7 @@ const int spec_skills[NUM_SPECIES][40] = 110, // undefined 110, // undefined 110, // undefined + 100, // undefined 110, // undefined 110, // undefined 140, // SK_SPELLCASTING @@ -1171,7 +1141,6 @@ const int spec_skills[NUM_SPECIES][40] = 110, // SK_NECROMANCY 110, // SK_TRANSLOCATIONS 110, // SK_TRANSMUTATIONS - 110, // SK_DIVINATIONS 110, // SK_FIRE_MAGIC 110, // SK_ICE_MAGIC 110, // SK_AIR_MAGIC @@ -1185,7 +1154,6 @@ const int spec_skills[NUM_SPECIES][40] = 150, // SK_FIGHTING 90, // SK_SHORT_BLADES 140, // SK_LONG_BLADES - 100, // SK_UNUSED_1 150, // SK_AXES 160, // SK_MACES_FLAILS 180, // SK_POLEARMS @@ -1207,6 +1175,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 80, // SK_SPELLCASTING 160, // SK_CONJURATIONS 50, // SK_ENCHANTMENTS @@ -1214,7 +1183,6 @@ const int spec_skills[NUM_SPECIES][40] = 120, // SK_NECROMANCY 50, // SK_TRANSLOCATIONS 60, // SK_TRANSMUTATIONS - 70, // SK_DIVINATIONS 140, // SK_FIRE_MAGIC 140, // SK_ICE_MAGIC 120, // SK_AIR_MAGIC @@ -1228,7 +1196,6 @@ const int spec_skills[NUM_SPECIES][40] = 70, // SK_FIGHTING 70, // SK_SHORT_BLADES 70, // SK_LONG_BLADES - 100, // SK_UNUSED_1 70, // SK_AXES 70, // SK_MACES_FLAILS 70, // SK_POLEARMS @@ -1250,6 +1217,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 230, // SK_SPELLCASTING 170, // SK_CONJURATIONS 170, // SK_ENCHANTMENTS @@ -1257,7 +1225,6 @@ const int spec_skills[NUM_SPECIES][40] = 170, // SK_NECROMANCY 170, // SK_TRANSLOCATIONS 170, // SK_TRANSMUTATIONS - 170, // SK_DIVINATIONS 170, // SK_FIRE_MAGIC 170, // SK_ICE_MAGIC 170, // SK_AIR_MAGIC @@ -1271,7 +1238,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_FIGHTING 110, // SK_SHORT_BLADES 110, // SK_LONG_BLADES - 100, // SK_UNUSED_1 110, // SK_AXES 110, // SK_MACES_FLAILS 110, // SK_POLEARMS @@ -1293,6 +1259,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 100, // SK_CONJURATIONS 110, // SK_ENCHANTMENTS @@ -1300,7 +1267,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_NECROMANCY 110, // SK_TRANSLOCATIONS 110, // SK_TRANSMUTATIONS - 110, // SK_DIVINATIONS 100, // SK_FIRE_MAGIC 110, // SK_ICE_MAGIC 110, // SK_AIR_MAGIC @@ -1314,7 +1280,6 @@ const int spec_skills[NUM_SPECIES][40] = 80, // SK_FIGHTING 110, // SK_SHORT_BLADES 110, // SK_LONG_BLADES - 100, // SK_UNUSED_1 110, // SK_AXES 110, // SK_MACES_FLAILS 110, // SK_POLEARMS @@ -1336,6 +1301,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 160, // SK_SPELLCASTING 130, // SK_CONJURATIONS 130, // SK_ENCHANTMENTS @@ -1343,7 +1309,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_NECROMANCY 120, // SK_TRANSLOCATIONS 120, // SK_TRANSMUTATIONS - 120, // SK_DIVINATIONS 150, // SK_FIRE_MAGIC 90, // SK_ICE_MAGIC 150, // SK_AIR_MAGIC @@ -1357,7 +1322,6 @@ const int spec_skills[NUM_SPECIES][40] = 100, // SK_FIGHTING 80, // SK_SHORT_BLADES 80, // SK_LONG_BLADES - 100, // SK_UNUSED_1 80, // SK_AXES 80, // SK_MACES_FLAILS 80, // SK_POLEARMS @@ -1379,6 +1343,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 60, // SK_CONJURATIONS 160, // SK_ENCHANTMENTS @@ -1386,7 +1351,6 @@ const int spec_skills[NUM_SPECIES][40] = 80, // SK_NECROMANCY 150, // SK_TRANSLOCATIONS 150, // SK_TRANSMUTATIONS - 180, // SK_DIVINATIONS 90, // SK_FIRE_MAGIC 120, // SK_ICE_MAGIC 90, // SK_AIR_MAGIC @@ -1400,7 +1364,6 @@ const int spec_skills[NUM_SPECIES][40] = 80, // SK_FIGHTING 70, // SK_SHORT_BLADES 90, // SK_LONG_BLADES - 100, // SK_UNUSED_1 140, // SK_AXES 150, // SK_MACES_FLAILS 50, // SK_POLEARMS @@ -1422,6 +1385,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 130, // SK_SPELLCASTING 140, // SK_CONJURATIONS 90, // SK_ENCHANTMENTS @@ -1429,7 +1393,6 @@ const int spec_skills[NUM_SPECIES][40] = 150, // SK_NECROMANCY 140, // SK_TRANSLOCATIONS 60, // SK_TRANSMUTATIONS - 80, // SK_DIVINATIONS 160, // SK_FIRE_MAGIC 80, // SK_ICE_MAGIC 150, // SK_AIR_MAGIC @@ -1443,7 +1406,6 @@ const int spec_skills[NUM_SPECIES][40] = 110, // SK_FIGHTING 90, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 110, // SK_AXES 140, // SK_MACES_FLAILS 110, // SK_POLEARMS @@ -1464,6 +1426,7 @@ const int spec_skills[NUM_SPECIES][40] = 140, // undefined 140, // undefined 140, // undefined + 100, // undefined 140, // undefined 130, // SK_SPELLCASTING 160, // SK_CONJURATIONS @@ -1472,7 +1435,6 @@ const int spec_skills[NUM_SPECIES][40] = 90, // SK_NECROMANCY 140, // SK_TRANSLOCATIONS 90, // SK_TRANSMUTATIONS - 120, // SK_DIVINATIONS 140, // SK_FIRE_MAGIC 100, // SK_ICE_MAGIC 100, // SK_AIR_MAGIC @@ -1486,7 +1448,6 @@ const int spec_skills[NUM_SPECIES][40] = 110, // SK_FIGHTING 120, // SK_SHORT_BLADES 100, // SK_LONG_BLADES - 100, // SK_UNUSED_1 90, // SK_AXES 100, // SK_MACES_FLAILS 120, // SK_POLEARMS @@ -1508,6 +1469,7 @@ const int spec_skills[NUM_SPECIES][40] = 100, // undefined 100, // undefined 100, // undefined + 100, // undefined 160, // SK_SPELLCASTING 120, // SK_CONJURATIONS 120, // SK_ENCHANTMENTS @@ -1515,7 +1477,6 @@ const int spec_skills[NUM_SPECIES][40] = 80, // SK_NECROMANCY 90, // SK_TRANSLOCATIONS 120, // SK_TRANSMUTATION - 120, // SK_DIVINATIONS 110, // SK_FIRE_MAGIC 110, // SK_ICE_MAGIC 170, // SK_AIR_MAGIC @@ -1584,7 +1545,7 @@ static const skill_type skill_display_order[] = SK_COLUMN_BREAK, SK_SPELLCASTING, SK_CONJURATIONS, SK_ENCHANTMENTS, SK_SUMMONINGS, - SK_NECROMANCY, SK_TRANSLOCATIONS, SK_TRANSMUTATIONS, SK_DIVINATIONS, + SK_NECROMANCY, SK_TRANSLOCATIONS, SK_TRANSMUTATIONS, SK_FIRE_MAGIC, SK_ICE_MAGIC, SK_AIR_MAGIC, SK_EARTH_MAGIC, SK_POISON_MAGIC, SK_BLANK_LINE, @@ -2208,7 +2169,7 @@ void wield_warning(bool newWeapon) bool is_invalid_skill(int skill) { - if (skill < 0 || skill == SK_UNUSED_1 || skill >= NUM_SKILLS) + if (skill < 0 || skill >= NUM_SKILLS) return (true); if (skill > SK_UNARMED_COMBAT && skill < SK_SPELLCASTING) diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index c805c37a04..74c8bb9d8e 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -14,10 +14,6 @@ #include <algorithm> #include <iomanip> -#ifdef TARGET_OS_DOS - #include <conio.h> -#endif - #include "artefact.h" #include "externs.h" #include "species.h" @@ -55,7 +51,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = { - // 0 - Minor Magic I (fire) + // Minor Magic I (fire) {SPELL_MAGIC_DART, SPELL_SUMMON_SMALL_MAMMALS, SPELL_THROW_FLAME, @@ -66,7 +62,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 1 - Minor Magic II (ice) + // Minor Magic II (ice) {SPELL_MAGIC_DART, SPELL_THROW_FROST, SPELL_BLINK, @@ -77,7 +73,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 2 - Minor Magic III (summ) + // Minor Magic III (summ) {SPELL_MAGIC_DART, SPELL_SUMMON_SMALL_MAMMALS, SPELL_BLINK, @@ -88,7 +84,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 3 - Book of Conjurations I - Fire and Earth + // Book of Conjurations I - Fire and Earth {SPELL_MAGIC_DART, SPELL_THROW_FLAME, SPELL_STONE_ARROW, @@ -99,7 +95,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 4 - Book of Conjurations II - Air and Ice + // Book of Conjurations II - Air and Ice {SPELL_MAGIC_DART, SPELL_THROW_FROST, SPELL_MEPHITIC_CLOUD, @@ -110,7 +106,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 5 - Book of Flames + // Book of Flames {SPELL_FLAME_TONGUE, SPELL_THROW_FLAME, SPELL_CONJURE_FLAME, @@ -121,7 +117,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 6 - Book of Frost + // Book of Frost {SPELL_FREEZE, SPELL_THROW_FROST, SPELL_OZOCUBUS_ARMOUR, @@ -132,7 +128,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 7 - Book of Summonings + // Book of Summonings {SPELL_ABJURATION, SPELL_RECALL, SPELL_CALL_CANINE_FAMILIAR, @@ -143,7 +139,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 8 - Book of Fire + // Book of Fire {SPELL_EVAPORATE, SPELL_FIRE_BRAND, SPELL_SUMMON_ELEMENTAL, @@ -154,7 +150,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 9 - Book of Ice + // Book of Ice {SPELL_FREEZING_AURA, SPELL_HIBERNATION, SPELL_CONDENSATION_SHIELD, @@ -165,18 +161,8 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 10 - Book of Surveyances - {SPELL_DETECT_SECRET_DOORS, - SPELL_DETECT_TRAPS, - SPELL_DETECT_ITEMS, - SPELL_NO_SPELL, - SPELL_NO_SPELL, - SPELL_NO_SPELL, - SPELL_NO_SPELL, - SPELL_NO_SPELL - }, - // 11 - Book of Spatial Translocations + // Book of Spatial Translocations {SPELL_APPORTATION, SPELL_PORTAL_PROJECTILE, SPELL_BLINK, @@ -187,7 +173,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 12 - Book of Enchantments (fourth one) + // Book of Enchantments (fourth one) {SPELL_LEVITATION, SPELL_SELECTIVE_AMNESIA, SPELL_SEE_INVISIBLE, @@ -198,7 +184,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 13 - Young Poisoner's Handbook + // Young Poisoner's Handbook {SPELL_STING, SPELL_CURE_POISON, SPELL_POISON_WEAPON, @@ -209,7 +195,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 14 - Book of the Tempests + // Book of the Tempests {SPELL_DISCHARGE, SPELL_LIGHTNING_BOLT, SPELL_FIREBALL, @@ -220,7 +206,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 15 - Book of Death + // Book of Death {SPELL_CORPSE_ROT, SPELL_LETHAL_INFUSION, SPELL_BONE_SHARDS, @@ -231,7 +217,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 16 - Book of Hinderance + // Book of Hinderance {SPELL_CONFUSING_TOUCH, SPELL_SLOW, SPELL_CONFUSE, @@ -242,7 +228,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 17 - Book of Changes + // Book of Changes {SPELL_FULSOME_DISTILLATION, SPELL_STICKS_TO_SNAKES, SPELL_EVAPORATE, @@ -253,7 +239,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 18 - Book of Transfigurations + // Book of Transfigurations {SPELL_SANDBLAST, SPELL_POLYMORPH_OTHER, SPELL_STATUE_FORM, @@ -264,18 +250,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 19 - Book of Practical Magic - {SPELL_PROJECTED_NOISE, - SPELL_SELECTIVE_AMNESIA, - SPELL_DIG, - SPELL_NO_SPELL, - SPELL_NO_SPELL, - SPELL_NO_SPELL, - SPELL_NO_SPELL, - SPELL_NO_SPELL, - }, - - // 20 - Book of War Chants + // Book of War Chants {SPELL_FIRE_BRAND, SPELL_FREEZING_AURA, SPELL_REPEL_MISSILES, @@ -286,7 +261,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 21 - Book of Clouds + // Book of Clouds {SPELL_EVAPORATE, SPELL_MEPHITIC_CLOUD, SPELL_CONJURE_FLAME, @@ -297,7 +272,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 22 - Book of Necromancy + // Book of Necromancy {SPELL_PAIN, SPELL_ANIMATE_SKELETON, SPELL_VAMPIRIC_DRAINING, @@ -308,7 +283,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 23 - Book of Callings + // Book of Callings {SPELL_SUMMON_SMALL_MAMMALS, SPELL_STICKS_TO_SNAKES, SPELL_CALL_IMP, @@ -319,7 +294,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 24 - Book of Charms + // Book of Charms {SPELL_CORONA, SPELL_REPEL_MISSILES, SPELL_HIBERNATION, @@ -330,7 +305,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 25 - Book of Air + // Book of Air {SPELL_SHOCK, SPELL_SWIFTNESS, SPELL_REPEL_MISSILES, @@ -341,7 +316,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 26 - Book of the Sky + // Book of the Sky {SPELL_SUMMON_ELEMENTAL, SPELL_INSULATION, SPELL_AIRSTRIKE, @@ -352,18 +327,8 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_CONJURE_BALL_LIGHTNING, }, - // 27 - Book of Divinations - {SPELL_DETECT_SECRET_DOORS, - SPELL_DETECT_CREATURES, - SPELL_DETECT_ITEMS, - SPELL_NO_SPELL, - SPELL_NO_SPELL, - SPELL_NO_SPELL, - SPELL_NO_SPELL, - SPELL_NO_SPELL, - }, - // 28 - Book of the Warp + // Book of the Warp {SPELL_BANISHMENT, SPELL_PHASE_SHIFT, SPELL_WARP_BRAND, @@ -374,7 +339,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 29 - Book of Envenomations + // Book of Envenomations {SPELL_SPIDER_FORM, SPELL_SUMMON_SCORPIONS, SPELL_POISON_AMMUNITION, @@ -385,7 +350,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 30 - Book of Unlife + // Book of Unlife {SPELL_SUBLIMATION_OF_BLOOD, SPELL_ANIMATE_DEAD, SPELL_TWISTED_RESURRECTION, @@ -396,7 +361,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 31 - Book of Control + // Book of Control {SPELL_CONTROL_TELEPORT, SPELL_ENSLAVEMENT, SPELL_TAME_BEASTS, @@ -407,19 +372,18 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 32 - Book of Morphology + // Book of Morphology {SPELL_FRAGMENTATION, SPELL_POLYMORPH_OTHER, SPELL_CIGOTUVIS_DEGENERATION, SPELL_ALTER_SELF, - // SPELL_IGNITE_POISON, // moved to Fire which was a bit slim -- bwr SPELL_SHATTER, SPELL_NO_SPELL, SPELL_NO_SPELL, SPELL_NO_SPELL, }, - // 33 - Book of Tukima + // Book of Tukima {SPELL_SURE_BLADE, SPELL_TUKIMAS_VORPAL_BLADE, SPELL_TUKIMAS_DANCE, @@ -430,7 +394,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 34 - Book of Geomancy + // Book of Geomancy {SPELL_SANDBLAST, SPELL_STONESKIN, SPELL_PASSWALL, @@ -441,7 +405,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 35 - Book of Earth + // Book of Earth {SPELL_MAXWELLS_SILVER_HAMMER, SPELL_DIG, SPELL_STATUE_FORM, @@ -452,8 +416,8 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL }, - // 36 - Book of Wizardry - {SPELL_DETECT_CREATURES, + // Book of Wizardry + {SPELL_SELECTIVE_AMNESIA, SPELL_SUMMON_ELEMENTAL, SPELL_TELEPORT_SELF, SPELL_FIREBALL, @@ -463,7 +427,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 37 - Book of Power + // Book of Power {SPELL_ANIMATE_DEAD, SPELL_TELEPORT_OTHER, SPELL_VENOM_BOLT, @@ -474,18 +438,18 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 38 - Book of Cantrips //jmf: added 04jan2000 + // Book of Cantrips {SPELL_CONFUSING_TOUCH, SPELL_ANIMATE_SKELETON, SPELL_SUMMON_SMALL_MAMMALS, - SPELL_DETECT_SECRET_DOORS, SPELL_APPORTATION, SPELL_NO_SPELL, SPELL_NO_SPELL, SPELL_NO_SPELL, + SPELL_NO_SPELL, }, - // 39 - Book of Party Tricks //jmf: added 04jan2000 + // Book of Party Tricks {SPELL_SUMMON_BUTTERFLIES, SPELL_APPORTATION, SPELL_PROJECTED_NOISE, @@ -496,18 +460,18 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 40 - Book of Beasts //jmf: added 19mar2000 + // Book of Beasts {SPELL_SUMMON_SMALL_MAMMALS, SPELL_STICKS_TO_SNAKES, - SPELL_DETECT_CREATURES, SPELL_CALL_CANINE_FAMILIAR, SPELL_TAME_BEASTS, SPELL_DRAGON_FORM, SPELL_NO_SPELL, SPELL_NO_SPELL, + SPELL_NO_SPELL, }, - // 41 - Book of Stalking //jmf: 24jun2000 + // Book of Stalking {SPELL_STING, SPELL_SURE_BLADE, SPELL_PROJECTED_NOISE, @@ -518,7 +482,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 42 - Book of Elemental Missiles + // Book of Elemental Missiles {SPELL_CORONA, SPELL_SWIFTNESS, SPELL_REPEL_MISSILES, @@ -529,7 +493,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 43 - Book of Warped Missiles + // Book of Warped Missiles {SPELL_APPORTATION, SPELL_PORTAL_PROJECTILE, SPELL_REPEL_MISSILES, @@ -539,8 +503,8 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, SPELL_NO_SPELL, }, - - // 44 Book of Devastating Missiles + + // Book of Devastating Missiles {SPELL_POISON_AMMUNITION, SPELL_WARP_AMMUNITION, SPELL_SHOCKING_AMMUNITION, @@ -551,7 +515,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 45 - Book of Annihilations - Vehumet special + // Book of Annihilations - Vehumet special {SPELL_ISKENDERUNS_MYSTIC_BLAST, SPELL_POISON_ARROW, SPELL_CHAIN_LIGHTNING, @@ -562,7 +526,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 46 - Book of Demonology - Vehumet special + // Book of Demonology - Vehumet special {SPELL_ABJURATION, SPELL_RECALL, SPELL_CALL_IMP, @@ -573,7 +537,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 47 - Necronomicon - Kikubaaqudgha special + // Necronomicon - Kikubaaqudgha special {SPELL_SYMBOL_OF_TORMENT, SPELL_CONTROL_UNDEAD, SPELL_HAUNT, @@ -584,7 +548,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 48 - Randart Spellbook (by level) + // Randart Spellbook (by level) {SPELL_NO_SPELL, SPELL_NO_SPELL, SPELL_NO_SPELL, @@ -595,7 +559,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 49 - Randart Spellbook (by theme) + // Randart Spellbook (by theme) {SPELL_NO_SPELL, SPELL_NO_SPELL, SPELL_NO_SPELL, @@ -606,7 +570,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 50 - Book of Card Effects + // Book of Card Effects {SPELL_NO_SPELL, SPELL_NO_SPELL, SPELL_NO_SPELL, @@ -617,7 +581,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 51 - manuals of all kinds + // manuals of all kinds {SPELL_NO_SPELL, SPELL_NO_SPELL, SPELL_NO_SPELL, @@ -628,7 +592,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 52 - Tome of Destruction + // Tome of Destruction {SPELL_NO_SPELL, SPELL_NO_SPELL, SPELL_NO_SPELL, @@ -641,7 +605,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = // Rods - start at NUM_BOOKS. - // 53 - Rod of smiting + // Rod of smiting {SPELL_SMITING, SPELL_NO_SPELL, SPELL_NO_SPELL, @@ -652,7 +616,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 54 - Rod of summoning + // Rod of summoning {SPELL_ABJURATION, SPELL_RECALL, SPELL_SUMMON_ELEMENTAL, @@ -663,7 +627,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 55 - Rod of destruction (fire) + // Rod of destruction (fire) {SPELL_THROW_FLAME, SPELL_BOLT_OF_FIRE, SPELL_FIREBALL, @@ -674,7 +638,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 56 - Rod of destruction (ice) + // Rod of destruction (ice) {SPELL_THROW_FROST, SPELL_THROW_ICICLE, SPELL_FREEZING_CLOUD, @@ -685,7 +649,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 57 - Rod of destruction (lightning, iron, fireball) + // Rod of destruction (lightning, iron, fireball) {SPELL_LIGHTNING_BOLT, SPELL_IRON_SHOT, SPELL_FIREBALL, @@ -696,7 +660,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 58 - Rod of destruction (inaccuracy, magma, cold) + // Rod of destruction (inaccuracy, magma, cold) {SPELL_BOLT_OF_INACCURACY, SPELL_BOLT_OF_MAGMA, SPELL_BOLT_OF_COLD, @@ -707,7 +671,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 59 - Rod of warding + // Rod of warding {SPELL_ABJURATION, SPELL_CONDENSATION_SHIELD, SPELL_CAUSE_FEAR, @@ -718,7 +682,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 60 - Rod of discovery + // Rod of discovery {SPELL_DETECT_SECRET_DOORS, SPELL_DETECT_TRAPS, SPELL_DETECT_ITEMS, @@ -729,7 +693,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 61 - Rod of demonology + // Rod of demonology {SPELL_ABJURATION, SPELL_RECALL, SPELL_CALL_IMP, @@ -740,7 +704,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 62 - Rod of striking + // Rod of striking {SPELL_STRIKING, SPELL_NO_SPELL, SPELL_NO_SPELL, @@ -751,7 +715,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] = SPELL_NO_SPELL, }, - // 63 - Rod of venom + // Rod of venom {SPELL_CURE_POISON, SPELL_VENOM_BOLT, SPELL_POISON_ARROW, @@ -947,7 +911,6 @@ int book_rarity(unsigned char which_book) case BOOK_MINOR_MAGIC_I: case BOOK_MINOR_MAGIC_II: case BOOK_MINOR_MAGIC_III: - case BOOK_SURVEYANCES: case BOOK_HINDERANCE: case BOOK_CANTRIPS: //jmf: added 04jan2000 return 1; @@ -958,7 +921,6 @@ int book_rarity(unsigned char which_book) case BOOK_CONJURATIONS_I: case BOOK_CONJURATIONS_II: - case BOOK_PRACTICAL_MAGIC: case BOOK_NECROMANCY: case BOOK_CALLINGS: case BOOK_WIZARDRY: @@ -984,7 +946,6 @@ int book_rarity(unsigned char which_book) return 7; case BOOK_TRANSFIGURATIONS: - case BOOK_DIVINATIONS: return 8; case BOOK_FIRE: diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 171bbe08d7..968f1c85b1 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -56,10 +56,6 @@ #include "view.h" #include "shout.h" -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - static int _calc_spell_range(spell_type spell, int power = 0, bool real_cast = false); @@ -816,7 +812,7 @@ bool cast_a_spell(bool check_range, spell_type spell) static bool _spell_is_utility_spell(spell_type spell_id) { return (spell_typematch(spell_id, - SPTYP_ENCHANTMENT | SPTYP_TRANSLOCATION | SPTYP_DIVINATION)); + SPTYP_ENCHANTMENT | SPTYP_TRANSLOCATION)); } bool maybe_identify_staff(item_def &item, spell_type spell) diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h index 4e678f2ce1..24f171e2e6 100644 --- a/crawl-ref/source/spl-data.h +++ b/crawl-ref/source/spl-data.h @@ -559,7 +559,7 @@ { SPELL_DETECT_TRAPS, "Detect Traps", - SPTYP_DIVINATION, + 0, SPFLAG_MAPPING, 2, 50, @@ -571,7 +571,7 @@ }, { - SPELL_BLINK, "Blink", + SPELL_BLINK, "Blink", SPTYP_TRANSLOCATION, SPFLAG_ESCAPE, 2, @@ -583,6 +583,45 @@ true }, +{ + SPELL_BLINK_RANGE, "Blink Range", // XXX needs better name + SPTYP_TRANSLOCATION, + SPFLAG_ESCAPE | SPFLAG_MONSTER, + 2, + 0, + -1, -1, + 0, + NULL, + false, + false +}, + +{ + SPELL_BLINK_AWAY, "Blink Away", + SPTYP_TRANSLOCATION, + SPFLAG_ESCAPE | SPFLAG_MONSTER, + 2, + 0, + -1, -1, + 0, + NULL, + false, + false +}, + +{ + SPELL_BLINK_CLOSE, "Blink Close", + SPTYP_TRANSLOCATION, + SPFLAG_MONSTER, + 2, + 0, + -1, -1, + 0, + NULL, + false, + false +}, + // The following name was found in the hack.exe file of an early version // of PCHACK - credit goes to its creator (whoever that may be): { @@ -729,7 +768,7 @@ { SPELL_DETECT_ITEMS, "Detect Items", - SPTYP_DIVINATION, + 0, SPFLAG_MAPPING, 2, 50, @@ -1210,7 +1249,7 @@ { SPELL_DETECT_CREATURES, "Detect Creatures", - SPTYP_DIVINATION, + 0, SPFLAG_MAPPING, 2, 60, // not 50, note the fuzz @@ -1691,7 +1730,7 @@ { SPELL_DETECT_SECRET_DOORS, "Detect Secret Doors", - SPTYP_DIVINATION, + 0, SPFLAG_NONE, 1, 200, @@ -2239,6 +2278,19 @@ }, { + SPELL_BLINK_OTHER_CLOSE, "Blink Other Close", + SPTYP_TRANSLOCATION, + SPFLAG_TARGET | SPFLAG_MONSTER, + 2, + 0, + LOS_RADIUS, LOS_RADIUS, + 0, + NULL, + true, + false +}, + +{ SPELL_SUMMON_MUSHROOMS, "Summon Mushrooms", SPTYP_SUMMONING, SPFLAG_MONSTER, diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index 0a002bf72a..dcdc1382eb 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -32,14 +32,9 @@ #include "religion.h" #include "spells4.h" #include "spl-cast.h" -#include "spl-util.h" #include "terrain.h" -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - struct spell_desc { int id; @@ -859,7 +854,6 @@ int spell_type2skill(unsigned int spelltype) case SPTYP_TRANSMUTATION: return (SK_TRANSMUTATIONS); case SPTYP_NECROMANCY: return (SK_NECROMANCY); case SPTYP_SUMMONING: return (SK_SUMMONINGS); - case SPTYP_DIVINATION: return (SK_DIVINATIONS); case SPTYP_TRANSLOCATION: return (SK_TRANSLOCATIONS); case SPTYP_POISON: return (SK_POISON_MAGIC); case SPTYP_EARTH: return (SK_EARTH_MAGIC); @@ -867,6 +861,7 @@ int spell_type2skill(unsigned int spelltype) default: case SPTYP_HOLY: + case SPTYP_DIVINATION: #ifdef DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "spell_type2skill: called with spelltype %u", spelltype ); @@ -875,33 +870,6 @@ int spell_type2skill(unsigned int spelltype) } } // end spell_type2skill() -int spell_skill2type(unsigned int skill) -{ - switch (skill) - { - case SK_CONJURATIONS: return (SPTYP_CONJURATION); - case SK_ENCHANTMENTS: return (SPTYP_ENCHANTMENT); - case SK_FIRE_MAGIC: return (SPTYP_FIRE); - case SK_ICE_MAGIC: return (SPTYP_ICE); - case SK_TRANSMUTATIONS: return (SPTYP_TRANSMUTATION); - case SK_NECROMANCY: return (SPTYP_NECROMANCY); - case SK_SUMMONINGS: return (SPTYP_SUMMONING); - case SK_DIVINATIONS: return (SPTYP_DIVINATION); - case SK_TRANSLOCATIONS: return (SPTYP_TRANSLOCATION); - case SK_POISON_MAGIC: return (SPTYP_POISON); - case SK_EARTH_MAGIC: return (SPTYP_EARTH); - case SK_AIR_MAGIC: return (SPTYP_AIR); - - default: - case SPTYP_HOLY: -#ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "spell_skill2type: called with skill %u", - skill); -#endif - return (-1); - } -} // end spell_type2skill() - /* ************************************************** * * diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h index 9715d52eee..cd3d009b31 100644 --- a/crawl-ref/source/spl-util.h +++ b/crawl-ref/source/spl-util.h @@ -116,6 +116,5 @@ bool spell_direction( dist &spelld, bolt &pbolt, bool cancel_at_self = false ); int spell_type2skill (unsigned int which_spelltype); -int spell_skill2type (unsigned int which_skill); #endif diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index 92e670a644..5aa65d2dca 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -35,10 +35,6 @@ #include <stack> -#ifdef TARGET_OS_DOS - #include <conio.h> -#endif - #ifdef UNIX #ifndef USE_TILE #include "libunix.h" diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h index e7399bd705..493e85493b 100644 --- a/crawl-ref/source/tags.h +++ b/crawl-ref/source/tags.h @@ -41,7 +41,7 @@ enum tag_file_type // file types supported by tag system enum tag_major_version { TAG_MAJOR_START = 5, - TAG_MAJOR_VERSION = 7 + TAG_MAJOR_VERSION = 8 }; // Minor version will be reset to zero when major version changes. diff --git a/crawl-ref/source/teleport.cc b/crawl-ref/source/teleport.cc index 30941b1d20..8b96ed6b35 100644 --- a/crawl-ref/source/teleport.cc +++ b/crawl-ref/source/teleport.cc @@ -13,55 +13,144 @@ #include "env.h" #include "fprop.h" #include "los.h" +#include "monster.h" +#include "mon-stuff.h" #include "player.h" #include "random.h" #include "random-weight.h" #include "state.h" #include "terrain.h" +bool player::blink_to(const coord_def& dest, bool quiet) +{ + // We rely on the non-generalized move_player_to_cell. + ASSERT(this == &you); + + if (dest == pos()) + return (false); + if (!quiet) + mpr("You blink."); + const coord_def origin = pos(); + if (!move_player_to_grid(dest, false, true, true)) + return (false); + place_cloud(CLOUD_TLOC_ENERGY, origin, 1 + random2(3), KC_YOU); + return (true); +} + +bool monsters::blink_to(const coord_def& dest, bool quiet) +{ + if (dest == pos()) + return (false); + if (!quiet) + simple_monster_message(this, " blinks!"); + + if (!(flags & MF_WAS_IN_VIEW)) + seen_context = "thin air"; + + const coord_def oldplace = pos(); + if (!move_to_pos(dest)) + return (false); + + // Leave a purple cloud. + place_cloud(CLOUD_TLOC_ENERGY, oldplace, 1 + random2(3), + kill_alignment()); + + check_redraw(oldplace); + apply_location_effects(oldplace); + + mons_relocated(this); + + return (true); +} + + typedef std::pair<coord_def, int> coord_weight; -// Try to find a "safe" place for the victim close to the target. -static coord_def random_close_space(actor* victim, actor* target) +// Try to find a "safe" place for moved close or far from the target. +// keep_los indicates that the destination should be in view of the target. +static coord_def random_space_weighted(actor* moved, actor* target, + bool close, bool keep_los = true, + bool allow_sanct = true) { - std::vector<std::pair<coord_def, int> > dests; + std::vector<coord_weight> dests; const coord_def tpos = target->pos(); - // XXX: should use actor::see_cell_no_trans. - const los_def* vlos = &victim->get_los_no_trans(); + const los_def* mlos = &moved->get_los_no_trans(); const los_def* tlos = &target->get_los_no_trans(); - for (radius_iterator ri(vlos); ri; ++ri) + for (radius_iterator ri(mlos); ri; ++ri) { - if (!tlos->see_cell(*ri) || !victim->is_habitable(*ri) - || actor_at(*ri)) + if (!moved->is_habitable(*ri) || actor_at(*ri) + || keep_los && !tlos->see_cell(*ri) + || !allow_sanct && is_sanctuary(*ri)) { continue; } - int weight = (LOS_RADIUS+1)*(LOS_RADIUS+1) - (tpos - *ri).abs(); + int weight; + int dist = (tpos - *ri).rdist(); + if (close) + weight = (LOS_RADIUS - dist) * (LOS_RADIUS - dist); + else + weight = dist; if (weight < 0) - weight = 1; + weight = 0; dests.push_back(coord_weight(*ri, weight)); } coord_def* choice = random_choose_weighted(dests); return (choice ? *choice : coord_def(0, 0)); } -// Blink the player closer to the monster at target. -void blink_closer(const coord_def &target) +// Blink the victim closer to the monster at target. +void blink_other_close(actor* victim, const coord_def &target) { actor* caster = actor_at(target); if (!caster) return; if (is_sanctuary(you.pos())) return; - coord_def dest = random_close_space(&you, caster); + coord_def dest = random_space_weighted(victim, caster, true); + if (dest.origin()) + return; + bool success = victim->blink_to(dest); + ASSERT(success); +} + +// Blink the monster away from its foe. +void blink_away(monsters* mon) +{ + actor* foe = mon->get_foe(); + if (!foe || !mon->can_see(foe)) + return; + coord_def dest = random_space_weighted(mon, foe, false, false); + if (dest.origin()) + return; + bool success = mon->blink_to(dest); + ASSERT(success); +} + +// Blink the monster within range but at distance to its foe. +void blink_range(monsters* mon) +{ + actor* foe = mon->get_foe(); + if (!foe || !mon->can_see(foe)) + return; + coord_def dest = random_space_weighted(mon, foe, false, true); + if (dest.origin()) + return; + bool success = mon->blink_to(dest); + ASSERT(success); +} + +// Blink the monster close to its foe. +void blink_close(monsters* mon) +{ + actor* foe = mon->get_foe(); + if (!foe || !mon->can_see(foe)) + return; + coord_def dest = random_space_weighted(mon, foe, true); if (dest.origin()) return; - mpr("You blink."); - coord_def origin = you.pos(); - bool success = move_player_to_grid(dest, false, true, true); - if (success) - place_cloud(CLOUD_TLOC_ENERGY, origin, 1 + random2(3), KC_YOU); + bool success = mon->blink_to(dest); + ASSERT(success); } bool random_near_space(const coord_def& origin, coord_def& target, diff --git a/crawl-ref/source/teleport.h b/crawl-ref/source/teleport.h index 7c46188386..e54a437bc6 100644 --- a/crawl-ref/source/teleport.h +++ b/crawl-ref/source/teleport.h @@ -1,7 +1,13 @@ #ifndef TELEPORT_H #define TELEPORT_H -void blink_closer(const coord_def& target); +class actor; +class monsters; + +void blink_other_close(actor* victim, const coord_def& target); +void blink_away(monsters* mon); +void blink_range(monsters* mon); +void blink_close(monsters* mon); bool random_near_space(const coord_def& origin, coord_def& target, bool allow_adjacent = false, bool restrict_LOS = true, diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index 8ff6ca998d..f54ff9337b 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -1159,7 +1159,6 @@ void tut_gained_new_skill(int skill) case SK_NECROMANCY: case SK_TRANSLOCATIONS: case SK_TRANSMUTATIONS: - case SK_DIVINATIONS: case SK_FIRE_MAGIC: case SK_ICE_MAGIC: case SK_AIR_MAGIC: diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index ca9966dfbd..562d1d8498 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -16,10 +16,6 @@ #include <algorithm> #include <memory> -#ifdef TARGET_OS_DOS -#include <conio.h> -#endif - #include "externs.h" #include "map_knowledge.h" @@ -149,43 +145,6 @@ void monster_grid_updates() } } -static void _check_monster_pos(const monsters* monster) -{ - int s = monster->mindex(); - ASSERT(mgrd(monster->pos()) == s); - - // [rob] The following in case asserts aren't enabled. - // [enne] - It's possible that mgrd and monster->x/y are out of - // sync because they are updated separately. If we can see this - // monster, then make sure that the mgrd is set correctly. - if (mgrd(monster->pos()) != s) - { - // If this mprf triggers for you, please note any special - // circumstances so we can track down where this is coming - // from. - mprf(MSGCH_ERROR, "monster %s (%d) at (%d, %d) was " - "improperly placed. Updating mgrd.", - monster->name(DESC_PLAIN, true).c_str(), s, - monster->pos().x, monster->pos().y); - ASSERT(!monster_at(monster->pos())); - mgrd(monster->pos()) = s; - } -} - -void monster_grid() -{ - for (monster_iterator mi(&you.get_los()); mi; ++mi) - { - _check_monster_pos(*mi); - env.show.update_monster(*mi); - -#ifdef USE_TILE - if (mi->visible_to(&you)) - tile_place_monster(mi->pos().x, mi->pos().y, mi->mindex(), true); -#endif - } -} - void update_monsters_in_view() { unsigned int num_hostile = 0; @@ -898,7 +857,6 @@ void viewwindow(bool do_updates) env.show.init(); - monster_grid(); if (do_updates && !crawl_state.arena) monster_grid_updates(); diff --git a/crawl-ref/source/viewchar.cc b/crawl-ref/source/viewchar.cc index a0cef43408..78818642bd 100644 --- a/crawl-ref/source/viewchar.cc +++ b/crawl-ref/source/viewchar.cc @@ -2,6 +2,7 @@ #include "viewchar.h" +#include "feature.h" #include "options.h" #include "state.h" @@ -101,3 +102,7 @@ int multibyte_strlen(const std::string &s) return (s.length()); } +dungeon_char_type get_feature_dchar(dungeon_feature_type feat) +{ + return (get_feature_def(feat).dchar); +} |