summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-20 11:13:44 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-20 11:13:44 +0000
commit1326ea6a6d343513430861c1ef9a04bfd61dd6a4 (patch)
tree609244ea18aac77bead93abd02f965b747b41834 /crawl-ref/source
parent2d1c74ea75548728bd35270593b98d208a07715d (diff)
downloadcrawl-ref-1326ea6a6d343513430861c1ef9a04bfd61dd6a4.tar.gz
crawl-ref-1326ea6a6d343513430861c1ef9a04bfd61dd6a4.zip
Make randarts with the CURSED property recurse themselves with 1/3
chance when equipped, as was claimed in unrand.h. Make Beogh throw weapons of electrocution (rather than orc slaying) at non-Orcs getting this retribution effect by drawing the card of Wrath. Replace the "Holy Armour of Zin" with the "amulet of the Air" (as suggested by Lemuel). Added the necessary tile, too - my first tile made totally from scratch, and I'm totally proud of it, whoohoo! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4405 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/decks.cc2
-rw-r--r--crawl-ref/source/item_use.cc86
-rw-r--r--crawl-ref/source/religion.cc7
-rw-r--r--crawl-ref/source/rltiles/dc-urand.txt2
-rw-r--r--crawl-ref/source/rltiles/item/amulet/urand_air.bmpbin0 -> 2102 bytes
-rw-r--r--crawl-ref/source/tile1.cc4
-rw-r--r--crawl-ref/source/unrand.h18
7 files changed, 70 insertions, 49 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 05129c6cf5..7e6daee812 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1880,7 +1880,7 @@ static void _focus_card(int power, deck_rarity_type rarity)
if (which_god == GOD_XOM)
cause = "the capriciousness of Xom";
else
- cause = "the 'helpfullness' of " + god_name(which_god);
+ cause = "the 'helpfulness' of " + god_name(which_god);
}
}
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index fce561faac..dda2346e03 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -483,11 +483,12 @@ void wield_effects(int item_wield_2, bool showMsgs)
unsigned char i_dam = 0;
const bool known_cursed = item_known_cursed(you.inv[item_wield_2]);
+ item_def &item = you.inv[item_wield_2];
// and here we finally get to the special effects of wielding {dlb}
- if (you.inv[item_wield_2].base_type == OBJ_MISCELLANY)
+ if (item.base_type == OBJ_MISCELLANY)
{
- if (you.inv[item_wield_2].sub_type == MISC_LANTERN_OF_SHADOWS)
+ if (item.sub_type == MISC_LANTERN_OF_SHADOWS)
{
if (showMsgs)
mpr("The area is filled with flickering shadows.");
@@ -498,47 +499,47 @@ void wield_effects(int item_wield_2, bool showMsgs)
}
}
- if (you.inv[item_wield_2].base_type == OBJ_STAVES)
+ if (item.base_type == OBJ_STAVES)
{
- if (you.inv[item_wield_2].sub_type == STAFF_POWER)
+ if (item.sub_type == STAFF_POWER)
{
// inc_max_mp(13);
calc_mp();
- set_ident_flags( you.inv[item_wield_2], ISFLAG_EQ_WEAPON_MASK );
+ set_ident_flags( item, ISFLAG_EQ_WEAPON_MASK );
mpr("You feel your mana capacity increase.");
}
else
{
// Most staves only give curse status when wielded and
// right now that's always "uncursed". -- bwr
- set_ident_flags( you.inv[item_wield_2], ISFLAG_KNOW_CURSE );
+ set_ident_flags( item, ISFLAG_KNOW_CURSE );
}
}
- if (you.inv[item_wield_2].base_type == OBJ_WEAPONS)
+ if (item.base_type == OBJ_WEAPONS)
{
- if (is_evil_item(you.inv[item_wield_2])
- && (you.religion == GOD_ZIN || you.religion == GOD_SHINING_ONE
- || you.religion == GOD_ELYVILON))
+ if (is_evil_item(item) && is_good_god(you.religion))
{
if (showMsgs)
mpr("You really shouldn't be using a nasty item like this.");
}
- // only used for Singing Sword introduction
- const bool was_known = item_type_known(you.inv[item_wield_2]);
- const char *old_desc = you.inv[item_wield_2].name(DESC_CAP_THE).c_str();
+ const bool was_known = item_type_known(item);
- set_ident_flags( you.inv[item_wield_2], ISFLAG_EQ_WEAPON_MASK );
+ // only used for Singing Sword introducing itself
+ // (could be extended to other talking weapons...)
+ const char *old_desc = item.name(DESC_CAP_THE).c_str();
- if (is_random_artefact( you.inv[item_wield_2] ))
+ set_ident_flags( item, ISFLAG_EQ_WEAPON_MASK );
+
+ if (is_random_artefact( item ))
{
- i_dam = randart_wpn_property(you.inv[item_wield_2], RAP_BRAND);
+ i_dam = randart_wpn_property(item, RAP_BRAND);
use_randart(item_wield_2);
}
else
{
- i_dam = you.inv[item_wield_2].special;
+ i_dam = item.special;
}
if (i_dam != SPWPN_NORMAL)
@@ -563,8 +564,10 @@ void wield_effects(int item_wield_2, bool showMsgs)
case SPWPN_ELECTROCUTION:
if (!silenced(you.x_pos, you.y_pos))
+ {
mpr("You hear the crackle of electricity.",
MSGCH_SOUND);
+ }
else
mpr("You see sparks fly.");
break;
@@ -623,7 +626,10 @@ void wield_effects(int item_wield_2, bool showMsgs)
case SPWPN_SINGING_SWORD:
if (!was_known)
- mprf(MSGCH_TALK, "%s says, \"Hi! I'm the Singing Sword!\"", old_desc);
+ {
+ mprf(MSGCH_TALK, "%s says, "
+ "\"Hi! I'm the Singing Sword!\"", old_desc);
+ }
else
mpr("The Singing Sword hums in delight!", MSGCH_TALK);
break;
@@ -662,7 +668,10 @@ void wield_effects(int item_wield_2, bool showMsgs)
case SPWPN_VAMPIRES_TOOTH:
// mummies cannot smell, and do not hunger {dlb}
if (!you.is_undead)
- mpr("You feel a strange hunger, and smell blood on the air...");
+ {
+ mpr("You feel a strange hunger, and smell blood on the "
+ "air...");
+ }
else
mpr("You feel strangely empty.");
break;
@@ -696,8 +705,15 @@ void wield_effects(int item_wield_2, bool showMsgs)
case SPWPN_SCYTHE_OF_CURSES:
you.special_wield = SPWLD_CURSE;
- if (one_chance_in(5))
- do_curse_item( you.inv[item_wield_2] );
+ if (!item_cursed(item) && one_chance_in(5))
+ {
+ if (was_known)
+ {
+ mprf("%s glows black for a moment.",
+ item.name(DESC_CAP_YOUR).c_str());
+ }
+ do_curse_item( item );
+ }
break;
case SPWPN_MACE_OF_VARIABILITY:
@@ -721,18 +737,18 @@ void wield_effects(int item_wield_2, bool showMsgs)
break;
case SPWPN_STAFF_OF_OLGREB:
- // josh declares mummies cannot smell {dlb}
you.special_wield = SPWLD_OLGREB;
break;
case SPWPN_STAFF_OF_WUCAD_MU:
- miscast_effect( SPTYP_DIVINATION, 9, 90, 100, "the Staff of Wucad Mu" );
+ miscast_effect( SPTYP_DIVINATION, 9, 90, 100,
+ "the Staff of Wucad Mu" );
you.special_wield = SPWLD_WUCAD_MU;
break;
}
}
- if (item_cursed( you.inv[item_wield_2] ))
+ if (item_cursed( item ))
{
mpr("It sticks to your hand!");
if (known_cursed)
@@ -808,7 +824,7 @@ void wear_armour( int slot ) // slot is for tiles
else if (!armour_prompt("Wear which item?", &armour_wear_2, OPER_WEAR))
return;
- if (safe_to_remove_or_wear(you.inv[armour_wear_2], false))
+ if (safe_to_remove_or_wear( you.inv[armour_wear_2], wearing_slot(slot) ))
do_wear_armour( armour_wear_2, false );
}
@@ -1008,7 +1024,7 @@ bool do_wear_armour( int item, bool quiet )
if (!can_wear_armour(you.inv[item], !quiet, false))
return (false);
- const item_def &invitem = you.inv[item];
+ const item_def &invitem = you.inv[item];
const equipment_type slot = get_armour_slot(invitem);
if (item == you.equip[EQ_WEAPON])
@@ -1019,7 +1035,7 @@ bool do_wear_armour( int item, bool quiet )
return (false);
}
- if (wearing_slot(item) )
+ if (wearing_slot(item))
return (!takeoff_armour(item));
// if you're wielding something,
@@ -2881,11 +2897,7 @@ bool puton_item(int item_slot, bool prompt_finger)
|| item_slot == you.equip[EQ_RIGHT_RING]
|| item_slot == you.equip[EQ_AMULET])
{
-// if (Options.easy_unequip)
- return (!remove_ring(item_slot));
-
-// mpr("You've already put that on!");
-// return (true);
+ return (!remove_ring(item_slot));
}
if (item_slot == you.equip[EQ_WEAPON])
@@ -4469,7 +4481,7 @@ void use_randart(item_def &item)
ASSERT( is_random_artefact( item ) );
const bool alreadyknown = item_type_known(item);
- const bool dangerous = player_in_a_dangerous_place();
+ const bool dangerous = player_in_a_dangerous_place();
randart_properties_t proprt;
randart_known_props_t known;
@@ -4552,6 +4564,14 @@ void use_randart(item_def &item)
randart_wpn_learn_prop(item, RAP_BERSERK);
}
+ if (!item_cursed(item) && proprt[RAP_CURSED] && one_chance_in(3))
+ {
+ mprf("%s glows black for a moment.",
+ item.name(DESC_CAP_YOUR).c_str());
+ do_curse_item( item );
+ randart_wpn_learn_prop(item, RAP_CURSED);
+ }
+
if (proprt[RAP_NOISES])
you.special_wield = SPWLD_NOISE;
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index fbb588ddfd..201a2b2e79 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -3126,7 +3126,12 @@ static bool _beogh_retribution()
continue;
item_def& item = mitm[slot];
- set_item_ego_type( item, OBJ_WEAPONS, SPWPN_ORC_SLAYING );
+ // Need a species check in case this retribution is a result of
+ // drawing the Wrath card.
+ if (you.species == SP_HILL_ORC)
+ set_item_ego_type( item, OBJ_WEAPONS, SPWPN_ORC_SLAYING );
+ else
+ set_item_ego_type( item, OBJ_WEAPONS, SPWPN_ELECTROCUTION );
// manually override plusses
item.plus = random2(3);
diff --git a/crawl-ref/source/rltiles/dc-urand.txt b/crawl-ref/source/rltiles/dc-urand.txt
index d24b22149b..e177688dcb 100644
--- a/crawl-ref/source/rltiles/dc-urand.txt
+++ b/crawl-ref/source/rltiles/dc-urand.txt
@@ -30,7 +30,6 @@ weapon/urand_wyrmbane URAND_WYRMBANE
weapon/urand_spriggans_knife URAND_SPRIGGANS_KNIFE
%rim 0
armor/urand_ignorance URAND_IGNORANCE
-armor/urand_zin URAND_ZIN
armor/urand_augmentation URAND_AUGMENTATION
armor/urand_thief URAND_THIEF
armor/urand_bullseye URAND_BULLSEYE
@@ -58,4 +57,5 @@ amulet/urand_cekugob URAND_CEKUGOB
amulet/urand_four_winds URAND_FOUR_WINDS
amulet/urand_bloodlust URAND_BLOODLUST
amulet/urand_brooch_of_shielding URAND_BROOCH_OF_SHIELDING
+amulet/urand_air URAND_AIR
diff --git a/crawl-ref/source/rltiles/item/amulet/urand_air.bmp b/crawl-ref/source/rltiles/item/amulet/urand_air.bmp
new file mode 100644
index 0000000000..c6ba3c557b
--- /dev/null
+++ b/crawl-ref/source/rltiles/item/amulet/urand_air.bmp
Binary files differ
diff --git a/crawl-ref/source/tile1.cc b/crawl-ref/source/tile1.cc
index e3f0d6e52c..f4050e4dc2 100644
--- a/crawl-ref/source/tile1.cc
+++ b/crawl-ref/source/tile1.cc
@@ -864,7 +864,7 @@ static int _tileidx_unrand_artefact(int idx)
case 2: return TILE_URAND_SHADOWS;
case 3: return TILE_URAND_FLAMING_DEATH;
case 4: return TILE_URAND_IGNORANCE;
- case 5: return TILE_URAND_ZIN;
+ case 5: return TILE_URAND_AIR;
case 6: return TILE_URAND_AUGMENTATION;
case 7: return TILE_URAND_BRILLIANCE;
case 8: return TILE_URAND_THIEF;
@@ -3005,8 +3005,6 @@ int tilep_equ_armour(const item_def &item)
{
switch (find_unrandart_index(item) + 1)
{
- // Holy Armour of Zin
- case 6: return TILEP_BODY_ARMOR_MUMMY;
// robe of Augmentation
case 7: return TILEP_BODY_ROBE_WHITE_BLUE;
// robe of Misfortune
diff --git a/crawl-ref/source/unrand.h b/crawl-ref/source/unrand.h
index 1f8fb22b69..87154be150 100644
--- a/crawl-ref/source/unrand.h
+++ b/crawl-ref/source/unrand.h
@@ -37,9 +37,7 @@
But add 100 to make the item stickycursed. Note that the values for
wpns and armr are +50.
plus2: For wpns, plus to-dam. Curses are irrelevant here. Mostly unused
- for armr and totally for rings. Armour: if boots, plus2 == 1 means
- naga barding; 2 means centaur barding. If headgear, 1 means helmet,
- 2 means helm, 3 means cap, 4 means wizard's hat.
+ for armr and totally for rings.
colour: Obvious. Don't use BLACK, use DARKGREY instead.
* Note * any exact combination of class, type, plus & plus2 must be unique,
@@ -240,19 +238,19 @@
/* 6 */
{
- "Holy Armour of Zin", "glowing golden plate mail",
- OBJ_ARMOUR, ARM_PLATE_MAIL, +6, 0, YELLOW,
+ "amulet of the Air", "sky-blue amulet",
+ OBJ_JEWELLERY, AMU_CONTROLLED_FLIGHT, 0, 0, LIGHTCYAN,
{
- 0, 0, 0, 3, 0, 0, // str
- 0, 0, 0, 0, 2, 50, // life prot, magic
- 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0, // EV
+ 0, 0, 1, 0, 0, 0, // resElec
+ 0, 0, 1, 0, 0, 0, // levitate
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
- 0, 0
+ 0, 50 // stealth
}
,
"",
- "A suit of mail and large plates of golden metal.",
+ "A sky-blue amulet.",
""
}
,