diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-25 02:29:14 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-25 02:29:14 +0000 |
commit | 2fad05374f70f21d4af3d147325581bf1047b5be (patch) | |
tree | 40a46254f044837f658e4dbabb07ce3c52b72804 /crawl-ref/source/xom.cc | |
parent | ab0e3274d569d1cdea4010f4ed1d4b24cd3804e9 (diff) | |
download | crawl-ref-2fad05374f70f21d4af3d147325581bf1047b5be.tar.gz crawl-ref-2fad05374f70f21d4af3d147325581bf1047b5be.zip |
First part of the merger of fixed artefacts into unrandom artefacts
(further changes will be much smaller). Breaks savefile compatibility,
and bumps the major savefile version up to 6.
Some changes made to some tiles files, but it hasn't been tested with a tiles
build.
Overview of changes:
* Unrand artefacts are now defined in art-data.txt and is turned into
C code via util/art-data.pl. This has the dual advantage of being
more readable by humans, and that if the unrand data structure
changes then you can just change util/art-data.pl and regenerate
the C code rather than having to change some 70 different C structs
by hand.
* util/art-data.pl automatically updates NO_UNRANDARTS, and also
automatically generates an enumeration of all the unrands which are
equal to their item.special field.
* randart.cc and randart.h have been renamed to artefact.cc and artefact.h,
since the files covers all types of artefacts, and the differences
between randarts, unrandarts and (former) fixed arts have been
minimized since the terms were introduced. Also renamed unrand.h to
art-data.h
* The brands and resistances of former fixed arts are now handled via
artefact properties, but the rest of their special behaviours are still
hardcoded.
* Unrandarts are now distinguished between normal and "special",
with the special ones currently just being identical to the list of
the formed fixed arts. Special unrandarts are randomly generated less
often than normal unrandarts, can be generated in the Abyss if they've
been lost, can't be picked up by monsters, and can't be affected by
Tukima's Dance.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10035 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r-- | crawl-ref/source/xom.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 872e51db31..1f1015f774 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -11,6 +11,7 @@ REVISION("$Rev$"); #include <algorithm> +#include "artefact.h" #include "beam.h" #include "branch.h" #include "database.h" @@ -29,7 +30,6 @@ REVISION("$Rev$"); #include "notes.h" #include "ouch.h" #include "player.h" -#include "randart.h" #include "religion.h" #include "spells1.h" #include "spells2.h" @@ -536,7 +536,7 @@ static void _try_brand_switch(const int item_index) if (item.base_type != OBJ_WEAPONS || is_range_weapon(item)) return; - if (is_unrandom_artefact(item) || is_fixed_artefact(item)) + if (is_unrandom_artefact(item)) return; // Only do it some of the time. @@ -775,7 +775,7 @@ static bool _is_chaos_upgradeable(const item_def &item, { // Since Xom is a god he is capable of changing randarts, but not // other artifacts. - if (is_artefact(item) && !is_random_artefact(item)) + if (is_unrandom_artefact(item)) return (false); // Only upgrade permanent items, since the player should get a @@ -914,7 +914,7 @@ static void _do_chaos_upgrade(item_def &item, const monsters* mon) { ASSERT(item.base_type == OBJ_MISSILES || item.base_type == OBJ_WEAPONS); - ASSERT(!is_unrandom_artefact(item) && !is_fixed_artefact(item)); + ASSERT(!is_unrandom_artefact(item)); bool seen = false; if (mon && you.can_see(mon) && item.base_type == OBJ_WEAPONS) @@ -3074,7 +3074,7 @@ void xom_check_lost_item(const item_def& item) { if (item.base_type == OBJ_ORBS) xom_is_stimulated(255, "Xom laughs nastily.", true); - else if (is_fixed_artefact(item)) + else if (is_special_unrandom_artefact(item)) xom_is_stimulated(128, "Xom snickers.", true); else if (is_rune(item)) { @@ -3119,7 +3119,7 @@ void xom_check_destroyed_item(const item_def& item, int cause) xom_is_stimulated(255, "Xom laughs nastily.", true); return; } - else if (is_fixed_artefact(item)) + else if (is_special_unrandom_artefact(item)) xom_is_stimulated(128, "Xom snickers.", true); else if (is_rune(item)) { |