summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-19 19:12:29 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-19 19:12:29 +0000
commite0859659ec17199eb58c9ea7665e347d23c8be06 (patch)
treeed7267f11409513b207c85cb1e7fc4b8e0c61f9f /crawl-ref/source
parent5f92880b291a90c880107dff6177166608c01f49 (diff)
downloadcrawl-ref-e0859659ec17199eb58c9ea7665e347d23c8be06.tar.gz
crawl-ref-e0859659ec17199eb58c9ea7665e347d23c8be06.zip
Fix inverted logic in summon_elemental().
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4382 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/spells2.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 025e2547e6..ef46dbe93c 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1321,20 +1321,20 @@ bool summon_elemental(int pow, int restricted_type,
// - Air elementals are harder because they're more dynamic/dangerous
// - Earth elementals are more static and easy to tame (as before)
// - Fire elementals fall in between the two (10 is still fairly easy)
- bool friendly = ((type_summoned == MONS_FIRE_ELEMENTAL
- && random2(10) < you.skills[SK_FIRE_MAGIC])
+ bool friendly = ((type_summoned != MONS_FIRE_ELEMENTAL
+ || random2(10) < you.skills[SK_FIRE_MAGIC])
- || (type_summoned == MONS_WATER_ELEMENTAL
- && random2((you.species == SP_MERFOLK) ? 5 : 15)
+ && (type_summoned != MONS_WATER_ELEMENTAL
+ || random2((you.species == SP_MERFOLK) ? 5 : 15)
< you.skills[SK_ICE_MAGIC])
- || (type_summoned == MONS_AIR_ELEMENTAL
- && random2(15) < you.skills[SK_AIR_MAGIC])
+ && (type_summoned != MONS_AIR_ELEMENTAL
+ || random2(15) < you.skills[SK_AIR_MAGIC])
- || (type_summoned == MONS_EARTH_ELEMENTAL
- && random2(5) < you.skills[SK_EARTH_MAGIC])
+ && (type_summoned != MONS_EARTH_ELEMENTAL
+ || random2(5) < you.skills[SK_EARTH_MAGIC])
- || random2(100) >= unfriendly);
+ && random2(100) >= unfriendly);
if (create_monster( type_summoned, numsc,
friendly ? BEH_FRIENDLY : BEH_HOSTILE,