diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-27 12:46:08 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-27 12:46:08 +0000 |
commit | a86d2a52392ed50ba63ed9712c05f3574e45d695 (patch) | |
tree | 119721aaeb398f83686f783efcbf92ba5f3cd5f9 /crawl-ref/source/transfor.h | |
parent | 612b5c431864991b19105694131ba1314012e631 (diff) | |
download | crawl-ref-a86d2a52392ed50ba63ed9712c05f3574e45d695.tar.gz crawl-ref-a86d2a52392ed50ba63ed9712c05f3574e45d695.zip |
Fix 1974137: Stat-lowering transformations resulting in death by stat
loss. Now take to-be-removed equipment in account and don't transform
in the removed equipment or the stat loss or both in combination would
decrease one of your stats to (below) 0.
For the vampire bat transformation, this check only happens after the
ability failure check, so this could be improved. In any case, it's
better than dying.
Also, fix wrongly treating armour as worn when checking for stat loss
by wearing.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5294 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/transfor.h')
-rw-r--r-- | crawl-ref/source/transfor.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/transfor.h b/crawl-ref/source/transfor.h index 12a1edc83a..933f512cb8 100644 --- a/crawl-ref/source/transfor.h +++ b/crawl-ref/source/transfor.h @@ -48,6 +48,9 @@ void untransform(void); * called from: item_use * *********************************************************************** */ bool can_equip(equipment_type use_which, bool ignore_temporary); +bool check_transformation_stat_loss(const std::set<equipment_type> &remove, + int str_loss = 0, int dex_loss = 0, + int int_loss = 0, bool quiet = false); size_type transform_size(int psize = PSIZE_BODY); // last updated 12may2000 {dlb} |