diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2009-12-28 00:17:23 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2009-12-28 00:29:40 +1000 |
commit | 23929ee3b2452b1c3a133061eff44b31dc70fb09 (patch) | |
tree | 438759a7c65a1d57fb97ec39c7a3a0beca99ed06 /crawl-ref/source/spells1.cc | |
parent | e42132c99bf63b213388404676a54c6610bd613c (diff) | |
download | crawl-ref-23929ee3b2452b1c3a133061eff44b31dc70fb09.tar.gz crawl-ref-23929ee3b2452b1c3a133061eff44b31dc70fb09.zip |
Customisable clouds!
cloud_struct now has members for colour, name, and tile; colour will be
used instead of the default colour of the cloud type, and will be used
to recolour the tile of the cloud (if it exists). Name will be used to
rebrand the cloud's description, and also alter the message generate
while standing in a cloud.
Finally, tile can be used to completely customise the tile used for the
cloud. The value is stored as a string in order to maintain save
compatibility across ASCII and tiles. A random tile (found using
tile_main_count) from that set will also be used, however, no duration
effects will be applied.
Recoloured cloud tiles using just the colour code should be possible,
though aren't yet fully tested.
This commit bumps TAG_MAJOR_VERSION: changing marshalling of the
FogMachine Lua code causes nasty crashes on reloading saved games.
Otherwise, I don't think I broke anything else. :-)
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r-- | crawl-ref/source/spells1.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index 647077f2f4..f6dd4009a3 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -661,29 +661,32 @@ bool stinking_cloud( int pow, bolt &beem ) int cast_big_c(int pow, cloud_type cty, kill_category whose, bolt &beam) { - big_cloud( cty, whose, beam.target, pow, 8 + random2(3) ); + big_cloud( cty, whose, beam.target, pow, 8 + random2(3), -1 ); return (1); } void big_cloud(cloud_type cl_type, kill_category whose, - const coord_def& where, int pow, int size, int spread_rate) + const coord_def& where, int pow, int size, int spread_rate, + int colour, std::string name, std::string tile) { big_cloud(cl_type, whose, cloud_struct::whose_to_killer(whose), - where, pow, size, spread_rate); + where, pow, size, spread_rate, colour, name, tile); } void big_cloud(cloud_type cl_type, killer_type killer, - const coord_def& where, int pow, int size, int spread_rate) + const coord_def& where, int pow, int size, int spread_rate, + int colour, std::string name, std::string tile) { big_cloud(cl_type, cloud_struct::killer_to_whose(killer), killer, - where, pow, size, spread_rate); + where, pow, size, spread_rate, colour, name, tile); } void big_cloud(cloud_type cl_type, kill_category whose, killer_type killer, - const coord_def& where, int pow, int size, int spread_rate) + const coord_def& where, int pow, int size, int spread_rate, + int colour, std::string name, std::string tile) { apply_area_cloud(make_a_normal_cloud, where, pow, size, - cl_type, whose, killer, spread_rate); + cl_type, whose, killer, spread_rate, colour, name, tile); } static bool _mons_hostile(const monsters *mon) |