From fca2ba3fa41951c7337c13a7a147bcbe5ba8f671 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 29 Dec 2008 18:37:38 +0000 Subject: * 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 --- crawl-ref/source/itemprop.cc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'crawl-ref/source/itemprop.cc') 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) -- cgit v1.2.3-54-g00ecf