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/it_use3.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/it_use3.cc')
-rw-r--r-- | crawl-ref/source/it_use3.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc index 58f583824a..fb978d7583 100644 --- a/crawl-ref/source/it_use3.cc +++ b/crawl-ref/source/it_use3.cc @@ -17,6 +17,7 @@ REVISION("$Rev$"); #include "externs.h" +#include "artefact.h" #include "beam.h" #include "cloud.h" #include "database.h" @@ -38,7 +39,6 @@ REVISION("$Rev$"); #include "monstuff.h" #include "overmap.h" #include "player.h" -#include "randart.h" #include "religion.h" #include "skills.h" #include "skills2.h" @@ -61,7 +61,7 @@ void special_wielded() const int old_plus2 = weapon.plus2; const char old_colour = weapon.colour; - switch (you.special_wield) + switch (you.unrand_reacts) { case SPWLD_SING: case SPWLD_NOISE: @@ -70,7 +70,7 @@ void special_wielded() { std::string msg; - if (you.special_wield == SPWLD_SING) + if (you.unrand_reacts == SPWLD_SING) { msg = getSpeakString("Singing Sword"); if (!msg.empty()) @@ -130,7 +130,7 @@ void special_wielded() if (msg.empty()) // give default noises { - if (you.special_wield == SPWLD_SING) + if (you.unrand_reacts == SPWLD_SING) msg = "@The_weapon@ sings."; else { @@ -849,7 +849,7 @@ bool evoke_item(int slot) else return (false); } - else if (is_fixed_artefact(item)) + else if (is_unrandom_artefact(item)) { switch (item.special) { |