diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-15 17:48:53 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-15 17:48:53 +0000 |
commit | 13a022160a1d35a2b3305fa44a5f53848fbb0fd2 (patch) | |
tree | bd9af64edfcff0e8c714a3772c515b6eecb4db37 | |
parent | 3cb816927a6238ca030426bdb83309f0584888b4 (diff) | |
download | crawl-ref-13a022160a1d35a2b3305fa44a5f53848fbb0fd2.tar.gz crawl-ref-13a022160a1d35a2b3305fa44a5f53848fbb0fd2.zip |
Trunk->0.3 merge: 2457, 2477-2484, 2486.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2478 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/CREDITS | 16 | ||||
-rw-r--r-- | crawl-ref/docs/crawl_options.txt | 22 | ||||
-rw-r--r-- | crawl-ref/docs/level-design.txt | 8 | ||||
-rw-r--r-- | crawl-ref/source/effects.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/externs.h | 6 | ||||
-rw-r--r-- | crawl-ref/source/fight.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/ghost.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/items.cc | 27 | ||||
-rw-r--r-- | crawl-ref/source/items.h | 4 | ||||
-rw-r--r-- | crawl-ref/source/makeitem.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/mstuff2.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/mutation.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/randart.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/tags.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/travel.cc | 7 |
18 files changed, 84 insertions, 52 deletions
diff --git a/crawl-ref/CREDITS b/crawl-ref/CREDITS index a0ad5fdd85..e14462d1d0 100644 --- a/crawl-ref/CREDITS +++ b/crawl-ref/CREDITS @@ -23,11 +23,11 @@ Peter Borgmann Kornel Kisielewicz Sebastian Salman Rachel Elizabeth Dillon Ryan Kusnery Brett Scarborough Dylan O'Donnell Jukka Kuusisto Roman Sêk Jesse Luehrs Jordan Lewis Sigurd -Mike Drinen Icy Lich Solf -Kieron Dunbar Arien Malec Johan Strandell -Elethiomel Shawn M Moore Marc H. Thoben -Christopher Evenstar Eva Myers Matt Titus -Ben Goetter Onia Ninara Steven Wheeler -Ciaran Hamilton Erkki Nurmi Jeremey Wilson -Chris Hamons nyra Zooko -R. Dan Henry Yuuma Oohara +Mike Drinen Icy Lich Edgar Simo +Kieron Dunbar Arien Malec Solf +Elethiomel Shawn M Moore Johan Strandell +Christopher Evenstar Eva Myers Marc H. Thoben +Ben Goetter Onia Ninara Matt Titus +Ciaran Hamilton Erkki Nurmi Steven Wheeler +Chris Hamons nyra Jeremey Wilson +R. Dan Henry Yuuma Oohara Zooko diff --git a/crawl-ref/docs/crawl_options.txt b/crawl-ref/docs/crawl_options.txt index 2f305b38fd..ab01af2387 100644 --- a/crawl-ref/docs/crawl_options.txt +++ b/crawl-ref/docs/crawl_options.txt @@ -504,8 +504,8 @@ stair_item_brand = reverse trap_item_brand = none Brands traps that would otherwise be hidden by items. If you - use this brand, the items on the square are hidden by the trap - symbol (^) and the trap symbol is branded. + use this brand, the items on the square are hidden by the trap + symbol (^) and the trap symbol is branded. 4-e Level Map Functions. ---------------------------- @@ -637,8 +637,7 @@ explore_greedy = false explore behaviour is used). Greedy explore is also best with pickup_dropped = false. Explore greed is disabled if you're temporarily unable to pick up items (from uncontrolled levitation, - for instance). Default is false (no greedy explore) and using greedy - explore may slow down the performance. + for instance). explore_stop = items,stairs,shops,altars,gates Explore will stop for one of these conditions. Whatever you set this @@ -665,13 +664,14 @@ runrest_ignore_poison = <poison damage>:<minimum hp> runrest_ignore_monster = <string>:<distance> This only works if runrest.lua has been sourced already in init.txt. - Any monster containing the string will only interrupt your activity - if the distance between you and the monster is less than the - specified number. E.g. with - runrest_ingore_monster = fish:3 - all of big fish, jellyfish, giant goldfish and lavafish will be - considered safe for travel, explore and resting as long as the distance - is at least 3. + + Any monster containing the string will only interrupt your + activity if the distance between you and the monster is + less than the specified number. E.g. with + runrest_ingore_monster = fish:3 + all of big fish, jellyfish, giant goldfish and lavafish will be + considered safe for travel, explore and resting as long as the distance + is at least 3. trapwalk_safe_hp = <trap_name>:<minimum_hp>, ... This only works if trapwalk.lua has been sourced already in init.txt. diff --git a/crawl-ref/docs/level-design.txt b/crawl-ref/docs/level-design.txt index 6412a812d2..1c894dfc6e 100644 --- a/crawl-ref/docs/level-design.txt +++ b/crawl-ref/docs/level-design.txt @@ -437,7 +437,13 @@ MONS: (list of monsters) You can use weights as for ITEM: lines. Individual monsters may be prefixed with the "generate_awake" - (without the quotes). Use this sparingly. + (without the quotes). Use this sparingly: + MONS: generate_awake giant beetle + + Monsters can also be given colours that override their default + colour. Use this *very* sparingly: + MONS: col:darkgrey fungus + Note that 8, 9, 0 also place monsters (see the table). diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 5356f4f59d..3dc3bd891f 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1167,9 +1167,13 @@ bool acquirement(object_class_type class_wanted, int agent) if ((doodad.base_type == OBJ_WEAPONS && !can_wield(&doodad, false, true)) || (doodad.base_type == OBJ_ARMOUR - && !can_wear_armour(doodad, false, true))) + && !can_wear_armour(doodad, false, true)) + + // Trog does not gift the Wrath of Trog. + || (agent == GOD_TROG && is_fixed_artefact(doodad) + && doodad.special == SPWPN_WRATH_OF_TROG)) { - destroy_item(thing_created); + destroy_item(thing_created, true); thing_created = NON_ITEM; continue; } diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index f7ac02b85c..a9f9f5ff3a 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -307,9 +307,9 @@ struct dice_def struct run_check_dir { - unsigned char grid; - char dx; - char dy; + dungeon_feature_type grid; + int dx; + int dy; }; diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 225af20a2d..7947807ae8 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2925,7 +2925,7 @@ std::string melee_attack::mons_attack_verb(const mon_attack_def &attk) "engulf", "claw", "tail-slap", - "butt" + "gore" }; return attack_types[ attk.type ]; diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc index 3e4746a984..1b30a89a4c 100644 --- a/crawl-ref/source/ghost.cc +++ b/crawl-ref/source/ghost.cc @@ -157,11 +157,13 @@ void ghost_demon::init_random_demon() values[ GVAL_BRAND ] = random2(17); /* some brands inappropriate (eg holy wrath) */ } while (values[ GVAL_BRAND ] == SPWPN_HOLY_WRATH - || values[ GVAL_BRAND ] == SPWPN_ORC_SLAYING + || (values[ GVAL_BRAND ] == SPWPN_ORC_SLAYING + && you.mons_species() != MONS_ORC) || values[ GVAL_BRAND ] == SPWPN_PROTECTION || values[ GVAL_BRAND ] == SPWPN_FLAME || values[ GVAL_BRAND ] == SPWPN_FROST - || values[ GVAL_BRAND ] == SPWPN_DISRUPTION); + || (values[ GVAL_BRAND ] == SPWPN_DISRUPTION + && you.holiness() != MH_UNDEAD)); } // is demon a spellcaster? @@ -439,6 +441,8 @@ int ghost_demon::translate_spell(int spel) const case SPELL_SYMBOL_OF_TORMENT: /* Too powerful to give ghosts Torment for Agony? Nah. */ return (SPELL_SYMBOL_OF_TORMENT); + case SPELL_DELAYED_FIREBALL: + return (SPELL_FIREBALL); default: break; } diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 4fa3b85669..9d17d4d2a3 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -205,7 +205,7 @@ int cull_items(void) // 9. unmark unrandart int z = find_unrandart_index(item); if (z >= 0) - set_unrandart_exist(z, 0); + set_unrandart_exist(z, false); } // POOF! @@ -479,7 +479,7 @@ void unlink_item( int dest ) #endif } // end unlink_item() -void destroy_item( int dest ) +void destroy_item( int dest, bool never_created ) { // Don't destroy non-items, but this function may be called upon // to remove items reduced to zero quantity, so we allow "invalid" @@ -489,6 +489,19 @@ void destroy_item( int dest ) unlink_item( dest ); + if (never_created) + { + if (is_fixed_artefact(mitm[dest])) + set_unique_item_status( mitm[dest].base_type, mitm[dest].special, + UNIQ_NOT_EXISTS ); + else if (is_unrandom_artefact(mitm[dest])) + { + const int unrand = find_unrandart_index(dest); + if (unrand != -1) + set_unrandart_exist( unrand, false ); + } + } + // paranoia, shouldn't be needed mitm[dest].clear(); } @@ -1470,11 +1483,11 @@ int move_item_to_player( int obj, int quant_got, bool quiet ) // // Done this way in the hopes that it will be obvious from // calling code that "obj" is possibly modified. -void move_item_to_grid( int *const obj, int x, int y ) +bool move_item_to_grid( int *const obj, int x, int y ) { // must be a valid reference to a valid object if (*obj == NON_ITEM || !is_valid_item( mitm[*obj] )) - return; + return (false); // If it's a stackable type... if (is_stackable_item( mitm[*obj] )) @@ -1484,7 +1497,7 @@ void move_item_to_grid( int *const obj, int x, int y ) { // check if item already linked here -- don't want to unlink it if (*obj == i) - return; + return (false); if (items_stack( mitm[*obj], mitm[i] )) { @@ -1493,7 +1506,7 @@ void move_item_to_grid( int *const obj, int x, int y ) inc_mitm_item_quantity( i, mitm[*obj].quantity ); destroy_item( *obj ); *obj = i; - return; + return (true); } } } @@ -1526,7 +1539,7 @@ void move_item_to_grid( int *const obj, int x, int y ) mitm[*obj].link = igrd[x][y]; igrd[x][y] = *obj; - return; + return (true); } void move_item_stack_to_grid( int x, int y, int targ_x, int targ_y ) diff --git a/crawl-ref/source/items.h b/crawl-ref/source/items.h index f223c35382..57669b42cd 100644 --- a/crawl-ref/source/items.h +++ b/crawl-ref/source/items.h @@ -37,7 +37,7 @@ bool dec_mitm_item_quantity( int obj, int amount ); void inc_inv_item_quantity( int obj, int amount ); void inc_mitm_item_quantity( int obj, int amount ); -void move_item_to_grid( int *const obj, int x, int y ); +bool move_item_to_grid( int *const obj, int x, int y ); void move_item_stack_to_grid( int x, int y, int targ_x, int targ_y ); int move_item_to_player( int obj, int quant_got, bool quiet = false ); bool is_stackable_item( const item_def &item ); @@ -75,7 +75,7 @@ int get_item_slot( int reserve = 50 ); * religion - spells2 - spells3 - spells4 * *********************************************************************** */ void unlink_item(int dest); -void destroy_item(int dest); +void destroy_item(int dest, bool never_created = false); void destroy_item_stack( int x, int y ); // last updated: 08jun2000 {dlb} diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 930ee0e44b..7cbaf63fe2 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -2897,9 +2897,10 @@ static bool weapon_is_visibly_special(const item_def &item) const int brand = get_weapon_brand(item); const bool visibly_branded = brand != SPWPN_NORMAL; - return ((is_random_artefact(item) || visibly_branded) - || ((item.plus != 0 || item.plus2 != 0) - && !one_chance_in(3))) + return (is_random_artefact(item) || visibly_branded + || ((item.plus || item.plus2) + && (get_equip_race(item)? one_chance_in(7) + : one_chance_in(3)))) && item.sub_type != WPN_CLUB && item.sub_type != WPN_GIANT_CLUB && item.sub_type != WPN_GIANT_SPIKED_CLUB diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 76dbb429c6..41d85c85a1 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -2747,9 +2747,7 @@ bool monsters::drop_item(int eslot, int near) } const std::string iname = mitm[index].name(DESC_NOCAP_A); - move_item_to_grid(&index, x, y); - - if (index == inv[eslot]) + if (!move_item_to_grid(&index, x, y)) { // Re-equip item if we somehow failed to drop it. if (was_unequipped) @@ -2774,7 +2772,7 @@ bool monsters::pickup_launcher(item_def &launch, int near) { if (const item_def *elaunch = mslot_item(static_cast<mon_inv_type>(i))) { - if (is_range_weapon(*elaunch)) + if (!is_range_weapon(*elaunch)) continue; return (fires_ammo_type(*elaunch) == mt diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 0458dbea59..ffe027e0fc 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -4189,7 +4189,8 @@ static bool handle_pickup(monsters *monster) hps_gained += (quant * item_mass( mitm[item] )) / 20 + quant; eaten += quant; - if (mons_is_caught(monster) && mitm[item].base_type == OBJ_MISSILES + if (mons_is_caught(monster) + && mitm[item].base_type == OBJ_MISSILES && mitm[item].sub_type == MI_THROWING_NET && item_is_stationary(mitm[item])) { diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index 55f55cbc41..7b7822af94 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -1954,6 +1954,7 @@ bolt mons_spells( int spell_cast, int power ) case SPELL_HELLFIRE: // fiend's hellfire beam.name = "hellfire"; + beam.aux_source = "blast of hellfire"; beam.colour = RED; beam.range = 4; beam.rangeMax = 13; diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index b7b7e29e7e..2152a9d7b6 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -2345,8 +2345,11 @@ void demonspawn(void) bool perma_mutate(mutation_type which_mut, int how_much) { - char levels = 0; + int levels = 0; + how_much = std::min(static_cast<short>(how_much), + mutation_defs[which_mut].levels); + if (mutate(which_mut, false, true, true)) levels++; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 7fab274f31..57c7b71f4f 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5057,7 +5057,7 @@ void player::init() unique_items.init(UNIQ_NOT_EXISTS); for (int i = 0; i < NO_UNRANDARTS; i++) - set_unrandart_exist(i, 0); + set_unrandart_exist(i, false); skills.init(0); skill_points.init(0); diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index ffd630cf52..14c468f6e6 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -1981,7 +1981,7 @@ bool make_item_unrandart( item_def &item, int unrand_index ) if (unranddata[ unrand_index ].prpty[ RAP_CURSED ]) do_curse_item( item ); - set_unrandart_exist( unrand_index, 1 ); + set_unrandart_exist( unrand_index, true ); return (true); } // end make_item_unrandart() diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index b2a5a78100..ceda2f906f 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -1349,7 +1349,7 @@ static void tag_read_you_items(struct tagHeader &th, char minorVersion) // # of unrandarts could certainly change. If it does, // the new ones won't exist yet - zero them out. for (; j < NO_UNRANDARTS; j++) - set_unrandart_exist(j, 0); + set_unrandart_exist(j, false); } static PlaceInfo unmarshallPlaceInfo(struct tagHeader &th) diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 9648200892..e9c0876d99 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -3589,7 +3589,7 @@ const runrest &runrest::operator = (int newrunmode) return (*this); } -static char base_grid_type( char grid ) +static dungeon_feature_type base_grid_type( dungeon_feature_type grid ) { // Don't stop for undiscovered traps: if (grid == DNGN_UNDISCOVERED_TRAP) @@ -3599,7 +3599,7 @@ static char base_grid_type( char grid ) return (DNGN_FLOOR); // Or secret doors (which currently always look like rock walls): - if (grid == DNGN_SECRET_DOOR) + if (grid_is_wall(grid)) return (DNGN_ROCK_WALL); return (grid); @@ -3640,7 +3640,8 @@ bool runrest::run_grids_changed() const { const int targ_x = you.x_pos + run_check[i].dx; const int targ_y = you.y_pos + run_check[i].dy; - const int targ_grid = base_grid_type( grd[ targ_x ][ targ_y ] ); + const dungeon_feature_type targ_grid = + base_grid_type( grd[ targ_x ][ targ_y ] ); if (run_check[i].grid != targ_grid) return (true); |