summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tile1.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-27 16:15:37 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-27 16:15:37 +0000
commitd03ad7b05a931a1bd0bc69eb809d30fca8177cb6 (patch)
tree8d5d564a84a8d8cc9beb29dcd2f6220a318f268b /crawl-ref/source/tile1.cc
parentd360a8a9373ac6d5760d1869617685d553c7b9fb (diff)
downloadcrawl-ref-d03ad7b05a931a1bd0bc69eb809d30fca8177cb6.tar.gz
crawl-ref-d03ad7b05a931a1bd0bc69eb809d30fca8177cb6.zip
Add a new command for firing without quivering on 'F'.
Use puff of fire/ice tiles for ammo of flame/ice being fired. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6169 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tile1.cc')
-rw-r--r--crawl-ref/source/tile1.cc32
1 files changed, 22 insertions, 10 deletions
diff --git a/crawl-ref/source/tile1.cc b/crawl-ref/source/tile1.cc
index ed2c3bf65a..d088b05d2e 100644
--- a/crawl-ref/source/tile1.cc
+++ b/crawl-ref/source/tile1.cc
@@ -1925,8 +1925,18 @@ int tileidx_item_throw(const item_def &item, int dx, int dy)
int ch = -1;
int dir = _tile_bolt_dir(dx, dy);
+ switch (get_ammo_brand(item))
+ {
+ case SPMSL_FLAME:
+ return (tileidx_zap(RED));
+ case SPMSL_ICE:
+ return (tileidx_zap(WHITE));
+ default:
+ break;
+ }
+
// Thrown items with multiple directions
- switch(item.sub_type)
+ switch (item.sub_type)
{
case MI_ARROW:
ch = TILE_MI_ARROW0;
@@ -1952,7 +1962,7 @@ int tileidx_item_throw(const item_def &item, int dx, int dy)
return ch + dir;
// Thrown items with a single direction
- switch(item.sub_type)
+ switch (item.sub_type)
{
case MI_STONE:
ch = TILE_MI_STONE0;
@@ -2333,12 +2343,14 @@ int tileidx_bolt(const bolt &bolt)
return tileidx_zap(col);
}
-int tileidx_zap(int color)
+int tileidx_zap(int colour)
{
- int col = color;
- if (col > 8) col -= 8;
- if (col < 1) col = 7;
- return TILE_SYM_BOLT_OFS -1 + col;
+ int col = colour;
+ if (col > 8)
+ col -= 8;
+ if (col < 1)
+ col = 7;
+ return (TILE_SYM_BOLT_OFS - 1 + col);
}
// Convert normal tile to 3D tile if it exists
@@ -4472,9 +4484,9 @@ static void _finish_inven_data(int n, int *tiles, int *num, int *idx,
if (q == 1)
q = -1;
- if ( type == OBJ_WANDS
- && ((itm->flags & ISFLAG_KNOW_PLUSES )
- || itm->plus2 == ZAPCOUNT_EMPTY) )
+ if (type == OBJ_WANDS
+ && ((itm->flags & ISFLAG_KNOW_PLUSES)
+ || itm->plus2 == ZAPCOUNT_EMPTY))
{
q = itm->plus;
}