Viewing Issue Simple Details
[ Jump to Notes ]
[ Wiki ]
|
[ View Advanced ]
[ Issue History ]
[ Print ]
|
ID |
Category |
Severity |
Reproducibility |
Date Submitted |
Last Update |
0005860 |
[DCSS] Patches |
tweak |
always |
2012-07-02 21:43 |
2012-07-08 20:39 |
|
Reporter |
sgrunt |
View Status |
public |
|
Assigned To |
neil |
Priority |
normal |
Resolution |
done |
|
Status |
closed |
|
Product Branch |
0.11 ancient branch |
|
Summary |
0005860: Allow items defined in monster specifications to respect plus: and plus2: tags |
Description |
I'm not sure if the base issue qualifies as a bug or not, but it has led to some confusion over in ##crawl with respect to some arena scenarios.
Basically, this patch gives meaning to plus: and plus2: tags on items given to monsters in monster definitions. Thus, you can define "ogre ; giant spiked club plus:9 plus2:9" and the ogre will get a +9,+9 giant spiked club, not the +0,+0 that happens without this patch.
I think the chances that this will ever be used outside arena are pretty small (except possibly for forcing mundane item enchantment values), but I think it should be possible to do this nevertheless. |
Additional Information |
|
Tags |
No tags attached. |
|
Attached Files |
crawl-monster-item-spec-plus-plus2.patch [^] (1,572 bytes) 2012-07-02 21:43 [Show Content] [Hide Content]From dba4dcc5823ded2091789503e8514e6614149722 Mon Sep 17 00:00:00 2001
From: Steve Melenchuk <smelenchuk@gmail.com>
Date: Mon, 2 Jul 2012 13:38:29 -0600
Subject: [PATCH] Items in monster definitions now use plus: and plus2:
assigned properly.
Previously these properties were ignored in the specific case of giving
items to monsters in monster specs; this allows a bit more flexibility
(and more arena entertainment!).
---
crawl-ref/source/dungeon.cc | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 593c27c..9e648b5 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -4239,6 +4239,21 @@ static void _dgn_give_mon_spec_items(mons_spec &mspec,
goto retry;
}
+ if ((item.base_type == OBJ_WEAPONS
+ || item.base_type == OBJ_ARMOUR
+ || item.base_type == OBJ_JEWELLERY
+ || item.base_type == OBJ_MISSILES)
+ && spec.props.exists("plus"))
+ {
+ item.plus = spec.props["plus"].get_int();
+ }
+ if ((item.base_type == OBJ_WEAPONS
+ || item.base_type == OBJ_JEWELLERY)
+ && spec.props.exists("plus2"))
+ {
+ item.plus2 = spec.props["plus2"].get_int();
+ }
+
// Mark items on summoned monsters as such.
if (mspec.abjuration_duration != 0)
item.flags |= ISFLAG_SUMMONED;
--
1.7.8.6
|
|