diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-29 18:37:38 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-29 18:37:38 +0000 |
commit | fca2ba3fa41951c7337c13a7a147bcbe5ba8f671 (patch) | |
tree | d0fda56ba3ab7ba87b542bf61a65e4c2f4988b90 /crawl-ref/source | |
parent | a8624b062fb70d41a42c0d23f720ce57f9e8e080 (diff) | |
download | crawl-ref-fca2ba3fa41951c7337c13a7a147bcbe5ba8f671.tar.gz crawl-ref-fca2ba3fa41951c7337c13a7a147bcbe5ba8f671.zip |
* Nerf Dwarfs' Evocations aptitude 45 -> 67 (as e.g. Grey Elf).
* Correct Evoc aptitude listed in aptitudes.txt for High Elf.
* List max charges for wands in their descriptions.
* Mention waypoint number when creating waypoints.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8020 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/dat/database/help.txt | 4 | ||||
-rw-r--r-- | crawl-ref/source/describe.cc | 19 | ||||
-rw-r--r-- | crawl-ref/source/effects.cc | 27 | ||||
-rw-r--r-- | crawl-ref/source/itemprop.cc | 25 | ||||
-rw-r--r-- | crawl-ref/source/itemprop.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/skills2.cc | 115 | ||||
-rw-r--r-- | crawl-ref/source/travel.cc | 4 |
7 files changed, 84 insertions, 111 deletions
diff --git a/crawl-ref/source/dat/database/help.txt b/crawl-ref/source/dat/database/help.txt index e4874df745..9d791b51f3 100644 --- a/crawl-ref/source/dat/database/help.txt +++ b/crawl-ref/source/dat/database/help.txt @@ -74,8 +74,8 @@ level-map <w>Ctrl-E</w> : Erase all travel exclusions on the level. <h>Waypoints -<w>Ctrl-W</w> : Set waypoint. -<w>W</w> : Cycle through waypoints. +<w>Ctrl-W</w> : Set waypoint to current position. +<w>W</w> : Cycle through all waypoints on the level. <h>Cycle through features <w><<</w>/<w>></w> : Cycle through up/down stairs. diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 25a95d3f45..11892384bf 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1878,8 +1878,23 @@ std::string get_item_description( const item_def &item, bool verbose, break; case OBJ_WANDS: - if (item_ident( item, ISFLAG_KNOW_PLUSES ) && item.plus == 0) - description << "Unfortunately, it has no charges left."; + if (item_type_known(item)) + { + const int max_charges = 3 * wand_charge_value(item.sub_type); + if (item.plus < max_charges) + { + description << "$It can have at most " << max_charges + << " charges."; + } + else + description << "$It is fully charged."; + } + + if (item_ident( item, ISFLAG_KNOW_PLUSES ) && item.plus == 0 + || item.plus2 == ZAPCOUNT_EMPTY) + { + description << "$Unfortunately, it has no charges left."; + } description << "$"; break; diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 72de9af7fd..8569033d78 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1895,30 +1895,7 @@ bool recharge_wand(int item_slot) int charge_gain = 0; if (wand.base_type == OBJ_WANDS) { - switch (wand.sub_type) - { - case WAND_INVISIBILITY: - case WAND_FIREBALL: - case WAND_TELEPORTATION: - case WAND_HEALING: - case WAND_HASTING: - charge_gain = 3; - break; - - case WAND_LIGHTNING: - case WAND_DRAINING: - charge_gain = 4; - break; - - case WAND_FIRE: - case WAND_COLD: - charge_gain = 5; - break; - - default: - charge_gain = 8; - break; - } + charge_gain = wand_charge_value(wand.sub_type); // Reinitialize zap counts. wand.plus2 = ZAPCOUNT_RECHARGED; @@ -1930,7 +1907,7 @@ bool recharge_wand(int item_slot) wand.plus + 1 + random2avg( ((charge_gain - 1) * 3) + 1, 3 ))); - const bool charged = new_charges > wand.plus; + const bool charged = (new_charges > wand.plus); std::string desc; if (charged && item_ident(wand, ISFLAG_KNOW_PLUSES)) diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 3f3dd28d1a..401b4cba87 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -1336,6 +1336,31 @@ bool item_is_rechargeable(const item_def &it, bool known) && (!known || item_type_known(it))); } +// Max. charges are 3 times this value. +int wand_charge_value(int type) +{ + switch (type) + { + case WAND_INVISIBILITY: + case WAND_FIREBALL: + case WAND_TELEPORTATION: + case WAND_HEALING: + case WAND_HASTING: + return 3; + + case WAND_LIGHTNING: + case WAND_DRAINING: + return 4; + + case WAND_FIRE: + case WAND_COLD: + return 5; + + default: + return 8; + } +} + bool is_enchantable_weapon(const item_def &wpn, bool uncurse) { if (wpn.base_type != OBJ_WEAPONS && wpn.base_type != OBJ_MISSILES) diff --git a/crawl-ref/source/itemprop.h b/crawl-ref/source/itemprop.h index 4da74c1f11..df7862a950 100644 --- a/crawl-ref/source/itemprop.h +++ b/crawl-ref/source/itemprop.h @@ -635,6 +635,7 @@ bool check_armour_size( const item_def &item, size_type size ); bool check_armour_shape( const item_def &item, bool quiet ); bool item_is_rechargeable(const item_def &it, bool known = false); +int wand_charge_value(int type); bool is_enchantable_weapon(const item_def &wpn, bool uncurse); bool is_enchantable_armour(const item_def &arm, bool uncurse); diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc index 8626b5fef1..49482093d0 100644 --- a/crawl-ref/source/skills2.cc +++ b/crawl-ref/source/skills2.cc @@ -191,7 +191,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_HIGH_ELF (3) 100, // SK_FIGHTING @@ -234,7 +234,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 130, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_GREY_ELF (4) 140, // SK_FIGHTING @@ -277,7 +277,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 110, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (90 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_DEEP_ELF (5) 150, // SK_FIGHTING @@ -320,7 +320,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 80, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (90 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_SLUDGE_ELF (6) 80, // SK_FIGHTING @@ -363,7 +363,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 80, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (110 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_MOUNTAIN_DWARF (8) 70, // SK_FIGHTING @@ -405,8 +405,8 @@ const int spec_skills[ NUM_SPECIES ][40] = 70, // SK_EARTH_MAGIC 130, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS - (60 * 75) / 100, // SK_EVOCATIONS - }, + (90 * 75) / 100, // SK_EVOCATIONS + }, { // SP_HALFLING (9) 120, // SK_FIGHTING @@ -449,7 +449,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 120, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (90 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_HILL_ORC (10) 70, // SK_FIGHTING @@ -492,7 +492,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 110, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_KOBOLD (11) 80, // SK_FIGHTING @@ -535,7 +535,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (80 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_MUMMY (12) 100, // SK_FIGHTING @@ -578,7 +578,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 140, // SK_POISON_MAGIC (140 * 75) / 100, // SK_INVOCATIONS (140 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_NAGA (13) 100, // SK_FIGHTING @@ -621,7 +621,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 60, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_GNOME (14) 100, // SK_FIGHTING @@ -664,7 +664,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 130, // SK_POISON_MAGIC (120 * 75) / 100, // SK_INVOCATIONS (60 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_OGRE (15) 70, // SK_FIGHTING @@ -707,7 +707,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 180, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (180 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_TROLL (16) 140, // SK_FIGHTING @@ -750,7 +750,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 160, // SK_POISON_MAGIC (150 * 75) / 100, // SK_INVOCATIONS (180 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_RED_DRACONIAN (18) 90, // SK_FIGHTING @@ -793,7 +793,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_WHITE_DRACONIAN (19) 90, // SK_FIGHTING @@ -836,7 +836,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_GREEN_DRACONIAN (20) 90, // SK_FIGHTING @@ -879,7 +879,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 70, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_YELLOW_DRACONIAN (21) 90, // SK_FIGHTING @@ -922,7 +922,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_GREY_DRACONIAN (22) 90, // SK_FIGHTING @@ -965,7 +965,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_BLACK_DRACONIAN (23) 90, // SK_FIGHTING @@ -1008,7 +1008,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_PURPLE_DRACONIAN (24) 90, // SK_FIGHTING @@ -1051,7 +1051,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (90 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_MOTTLED_DRACONIAN (25) 90, // SK_FIGHTING @@ -1094,7 +1094,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_PALE_DRACONIAN (26) 90, // SK_FIGHTING @@ -1137,7 +1137,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (90 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_BASE_DRACONIAN (29) 90, // SK_FIGHTING @@ -1180,7 +1180,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_CENTAUR (30) 100, // SK_FIGHTING @@ -1223,7 +1223,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 130, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (130 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_DEMIGOD (31) 110, // SK_FIGHTING @@ -1266,7 +1266,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 110, // SK_POISON_MAGIC (110 * 75) / 100, // SK_INVOCATIONS (110 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_SPRIGGAN (32) 150, // SK_FIGHTING @@ -1309,7 +1309,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (130 * 75) / 100, // SK_INVOCATIONS (70 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_MINOTAUR (33) 70, // SK_FIGHTING @@ -1352,7 +1352,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 170, // SK_POISON_MAGIC (130 * 75) / 100, // SK_INVOCATIONS (170 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_DEMONSPAWN (34) 100, // SK_FIGHTING @@ -1395,7 +1395,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (80 * 75) / 100, // SK_INVOCATIONS (110 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_GHOUL (35) 80, // SK_FIGHTING @@ -1438,7 +1438,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (110 * 75) / 100, // SK_INVOCATIONS (130 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_KENKU (36) 100, // SK_FIGHTING @@ -1481,7 +1481,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 100, // SK_POISON_MAGIC (160 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_MERFOLK (37) 80, // SK_FIGHTING @@ -1524,7 +1524,7 @@ const int spec_skills[ NUM_SPECIES ][40] = 80, // SK_POISON_MAGIC (100 * 75) / 100, // SK_INVOCATIONS (100 * 75) / 100, // SK_EVOCATIONS - }, + }, { // SP_VAMPIRE (38) 110, // SK_FIGHTING @@ -1581,55 +1581,6 @@ const int spec_skills[ NUM_SPECIES ][40] = { }, - -/* ****************************************************** - -// base draconian - { - 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 - 100, // SK_STAVES - 120, // SK_SLINGS - 120, // SK_BOWS - 120, // SK_CROSSBOWS - 120, // SK_DARTS - 120, // SK_THROWING - 200, // SK_ARMOUR - 120, // SK_DODGING - 120, // SK_STEALTH - 100, // SK_STABBING - 100, // SK_SHIELDS - 100, // SK_TRAPS_DOORS - 100, // SK_UNARMED_COMBAT - 100, // undefined - 100, // undefined - 100, // undefined - 100, // undefined - 100, // undefined - 100, // SK_SPELLCASTING - 100, // SK_CONJURATIONS - 120, // SK_ENCHANTMENTS - 100, // SK_SUMMONINGS - 100, // SK_NECROMANCY - 100, // SK_TRANSLOCATIONS - 100, // SK_TRANSMIGRATION - 100, // SK_DIVINATIONS - 100, // SK_FIRE_MAGIC - 100, // SK_ICE_MAGIC - 100, // SK_AIR_MAGIC - 100, // SK_EARTH_MAGIC - 100, // SK_POISON_MAGIC - 100, // SK_INVOCATIONS - 100, // SK_EVOCATIONS - }, - -****************************************************** */ - }; diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 43b5e6d916..4bf3c08b97 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -3763,9 +3763,13 @@ void TravelCache::add_waypoint(int x, int y) const level_id &lid = level_id::current(); + const bool overwrite = waypoints[waynum].is_valid(); waypoints[waynum].id = lid; waypoints[waynum].pos = pos; + mprf("%s waypoint %d to your current position.", + overwrite ? "Reset" : "Set new", waynum); + update_waypoints(); } |