summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-29 19:25:47 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-29 19:25:47 +0000
commit4dc30336a62ec7e8261253fc0b9c0674efda1555 (patch)
tree0e9a7c350fbd1725327f6c0a8bae934524d3e1f1 /crawl-ref/source
parent5060b8b617ae6987eb81ba9fde12ff65e9b2beb2 (diff)
downloadcrawl-ref-4dc30336a62ec7e8261253fc0b9c0674efda1555.tar.gz
crawl-ref-4dc30336a62ec7e8261253fc0b9c0674efda1555.zip
Add Eino's totally awesome Grum tile, as well as my own significantly less
awesome tile for Kirke. Thanks, Eino, you rock! Some modifications for Kirke: * reduce the size of Kirke's hog band * replace Summon Ice Beasts with another instance of the "porkalator" * give the porkalator a 33% chance of upgrading a nearby hostile monster to hog Also, open a new category in dc-mon.txt for transformations, so specific tiles are easier to add. The player's pig form now looks subtly different from the other hogs, some greater difference would be better, though. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10076 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/beam.cc12
-rw-r--r--crawl-ref/source/enum.h4
-rw-r--r--crawl-ref/source/mon-spll.h2
-rw-r--r--crawl-ref/source/monplace.cc2
-rw-r--r--crawl-ref/source/monstuff.cc4
-rw-r--r--crawl-ref/source/mstuff2.cc38
-rw-r--r--crawl-ref/source/rltiles/dc-mon.txt13
-rw-r--r--crawl-ref/source/rltiles/dc-mon/animals/hog_player.pngbin0 -> 949 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-mon/unique/grum.pngbin1179 -> 1040 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-mon/unique/kirke.pngbin0 -> 1029 bytes
-rw-r--r--crawl-ref/source/tilemcache.cc4
-rw-r--r--crawl-ref/source/tilepick.cc23
12 files changed, 80 insertions, 22 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 4067b00a24..4411d80d27 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -4700,10 +4700,8 @@ bool _ench_flavour_affects_monster(beam_type flavour, const monsters* mon)
break;
case BEAM_PORKALATOR:
- rc = (mons_holiness(mon) == MH_NATURAL
- && mon->type != MONS_HOG) ||
- (mons_holiness(mon) == MH_DEMONIC
- && mon->type != MONS_HELL_HOG);
+ rc = (mons_holiness(mon) == MH_DEMONIC && mon->type != MONS_HELL_HOG)
+ || (mons_holiness(mon) == MH_NATURAL && mon->type != MONS_HOG);
break;
default:
@@ -5023,9 +5021,11 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon)
return (MON_AFFECTED);
case BEAM_PORKALATOR:
- if (monster_polymorph(mon, (mons_holiness(mon)==MH_DEMONIC)?
- MONS_HELL_HOG : MONS_HOG))
+ if (monster_polymorph(mon, (mons_holiness(mon) == MH_DEMONIC?
+ MONS_HELL_HOG : MONS_HOG)))
+ {
obvious_effect = true;
+ }
return (MON_AFFECTED);
default:
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 2c13800e32..378e695cbb 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2810,12 +2810,12 @@ enum spell_type
SPELL_ACID_SPLASH,
SPELL_STICKY_FLAME_SPLASH,
SPELL_FIRE_BREATH,
- SPELL_COLD_BREATH, // 195
+ SPELL_COLD_BREATH, // 195
SPELL_DRACONIAN_BREATH,
SPELL_WATER_ELEMENTALS,
SPELL_PORKALATOR, // 198
- NUM_SPELLS // 199
+ NUM_SPELLS // 199
};
enum slot_select_mode
diff --git a/crawl-ref/source/mon-spll.h b/crawl-ref/source/mon-spll.h
index 1aa37e5f65..e859034c69 100644
--- a/crawl-ref/source/mon-spll.h
+++ b/crawl-ref/source/mon-spll.h
@@ -1048,7 +1048,7 @@
SPELL_PORKALATOR,
SPELL_SLOW,
SPELL_SUMMON_UGLY_THING,
- SPELL_SUMMON_ICE_BEAST,
+ SPELL_PORKALATOR,
SPELL_BACKLIGHT,
SPELL_INVISIBILITY
}
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 02e457760e..4e56354e58 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -1663,7 +1663,7 @@ static band_type _choose_band(int mon_type, int power, int &band_size)
break;
case MONS_KIRKE:
- band_size = 3 + random2(5);
+ band_size = 2 + random2(3);
case MONS_HOG:
band = BAND_HOGS;
band_size += 1 + random2(3);
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 2673369232..ccc1526130 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1477,7 +1477,7 @@ int monster_die(monsters *monster, killer_type killer,
{
bool notice = false;
- monsters *killer_mon;
+ monsters *killer_mon = NULL;
if (!anon)
{
killer_mon = &menv[killer_index];
@@ -6561,7 +6561,7 @@ static bool _handle_spell(monsters *monster, bolt &beem)
if (ms_low_hitpoint_cast(monster, hspell_pass[i])
&& one_chance_in(++found_spell))
{
- spell_cast = hspell_pass[i];
+ spell_cast = hspell_pass[i];
finalAnswer = true;
}
}
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index e9a4d2fd26..d2e96ec587 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -1037,6 +1037,44 @@ void setup_mons_cast(monsters *monster, bolt &pbolt,
{
pbolt.target = monster->pos();
}
+ else if (spell_cast == SPELL_PORKALATOR && one_chance_in(3))
+ {
+ int target = -1;
+ int count = 0;
+ monster_type hog_type = MONS_HOG;
+ for (int i = 0; i < MAX_MONSTERS; i++)
+ {
+ monsters *targ = &menv[i];
+
+ if (!mon_can_see_monster(monster, targ))
+ continue;
+
+ hog_type = MONS_HOG;
+ if (mons_holiness(targ) == MH_DEMONIC)
+ hog_type = MONS_HELL_HOG;
+ else if (mons_holiness(targ) != MH_NATURAL)
+ continue;
+
+ if (targ->type != hog_type
+ && mons_atts_aligned(monster->attitude, targ->attitude)
+ && mons_power(hog_type) + random2(4) >= mons_power(targ->type)
+ && (!mons_class_flag(targ->type, M_SPELLCASTER) || coinflip)
+ && one_chance_in(++count))
+ {
+ target = i;
+ }
+ }
+
+ if (target != -1)
+ {
+ monsters *targ = &menv[target];
+ pbolt.target = targ->pos();
+ mprf("Porkalator: targetting %s instead",
+ targ->name(DESC_PLAIN).c_str());
+ monster_polymorph(targ, hog_type);
+ }
+ // else target remains as specified
+ }
}
bool monster_random_space(const monsters *monster, coord_def& target,
diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt
index fb467c54c2..3187316566 100644
--- a/crawl-ref/source/rltiles/dc-mon.txt
+++ b/crawl-ref/source/rltiles/dc-mon.txt
@@ -281,6 +281,7 @@ jessica MONS_JESSICA
joseph MONS_JOSEPH
josephine MONS_JOSEPHINE
jozef MONS_JOZEF
+kirke MONS_KIRKE
louise MONS_LOUISE
margery MONS_MARGERY
maud MONS_MAUD
@@ -584,5 +585,17 @@ draco-job-zealot DRACO_ZEALOT
test_spawner MONS_TEST_SPAWNER
dc-misc/unseen PLAYER
+
+## Transformations
+%sdir dc-mon/animals
+giant_bat TRAN_BAT
+wolf_spider TRAN_SPIDER
+hog_player TRAN_PIG
+%sdir dc-mon
+ice_beast TRAN_ICE_BEAST
+stone_golem TRAN_STATUE
+dragon TRAN_DRAGON
+lich TRAN_LICH
+
dc-misc/unseen_monster MONS_UNKNOWN
dc-misc/unseen_monster MCACHE_START
diff --git a/crawl-ref/source/rltiles/dc-mon/animals/hog_player.png b/crawl-ref/source/rltiles/dc-mon/animals/hog_player.png
new file mode 100644
index 0000000000..7cec710d5a
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-mon/animals/hog_player.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-mon/unique/grum.png b/crawl-ref/source/rltiles/dc-mon/unique/grum.png
index 246c28b894..6121d2969d 100644
--- a/crawl-ref/source/rltiles/dc-mon/unique/grum.png
+++ b/crawl-ref/source/rltiles/dc-mon/unique/grum.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-mon/unique/kirke.png b/crawl-ref/source/rltiles/dc-mon/unique/kirke.png
new file mode 100644
index 0000000000..a10a319863
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-mon/unique/kirke.png
Binary files differ
diff --git a/crawl-ref/source/tilemcache.cc b/crawl-ref/source/tilemcache.cc
index 052ab4ac7d..5811bdb94c 100644
--- a/crawl-ref/source/tilemcache.cc
+++ b/crawl-ref/source/tilemcache.cc
@@ -443,6 +443,10 @@ bool mcache_monster::get_weapon_offset(int mon_tile, int &ofs_x, int &ofs_y)
ofs_x = -2;
ofs_y = -7;
break;
+ case TILEP_MONS_KIRKE:
+ ofs_x = -3;
+ ofs_y = -2;
+ break;
case TILEP_MONS_OGRE_MAGE:
ofs_x = -4;
ofs_y = -2;
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index fe1674f94c..1d413ac86a 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -31,6 +31,7 @@ REVISION("$Rev$");
#include "tilemcache.h"
#include "tiledef-dngn.h"
#include "tiledef-unrand.h"
+#include "transfor.h"
#include "traps.h"
#include "travel.h"
#include "view.h"
@@ -995,6 +996,8 @@ int tileidx_monster_base(const monsters *mon, bool detected)
return TILEP_MONS_MARGERY;
case MONS_EUSTACHIO:
return TILEP_MONS_EUSTACHIO;
+ case MONS_KIRKE:
+ return TILEP_MONS_KIRKE;
// unique major demons ('&')
case MONS_MNOLEG:
@@ -2484,17 +2487,17 @@ int tileidx_player(int job)
int ch = TILEP_PLAYER;
// Handle shapechange first
- switch (you.symbol)
+ switch (you.attribute[ATTR_TRANSFORMATION])
{
- case 's': ch = TILEP_MONS_WOLF_SPIDER; break;
- case 'I': ch = TILEP_MONS_ICE_BEAST; break;
- case '8': ch = TILEP_MONS_STONE_GOLEM; break;
- case 'D': ch = TILEP_MONS_DRAGON; break;
- case 'L': ch = TILEP_MONS_LICH; break;
- case '#': ch = TILEP_MONS_VAPOUR; break;
- case 'S': ch = TILEP_MONS_LAVA_SNAKE; break;
- case 'b': ch = TILEP_MONS_GIANT_BAT; break;
- case 'h': ch = TILEP_MONS_HOG; break;
+ // animals
+ case TRAN_BAT: ch = TILEP_TRAN_BAT; break;
+ case TRAN_SPIDER: ch = TILEP_TRAN_SPIDER; break;
+ case TRAN_PIG: ch = TILEP_TRAN_PIG; break;
+ // non-animals
+ case TRAN_ICE_BEAST: ch = TILEP_TRAN_ICE_BEAST; break;
+ case TRAN_STATUE: ch = TILEP_TRAN_STATUE; break;
+ case TRAN_DRAGON: ch = TILEP_TRAN_DRAGON; break;
+ case TRAN_LICH: ch = TILEP_TRAN_LICH; break;
}
if (player_is_airborne())