Attached Files:
|
0001-update-spellbook-definition-syntax-to-not-conflict-w.patch [^] (9,477 bytes) 2015-04-04 07:58 [Show Content] [Hide Content]From 635fc3e0038ca6d7cc5c194d100a6513ca8e13c6 Mon Sep 17 00:00:00 2001
From: nicolae <xdt731@gmail.com>
Date: Sat, 4 Apr 2015 01:51:10 -0400
Subject: [PATCH] update spellbook definition syntax to not conflict with shop
definition
---
crawl-ref/docs/develop/levels/syntax.txt | 4 ++--
crawl-ref/source/dat/des/altar/lugonu_bribe.des | 8 ++++----
crawl-ref/source/dat/des/branches/zot.des | 4 ++--
crawl-ref/source/dat/des/portals/wizlab.des | 4 ++--
crawl-ref/source/dat/des/tutorial/lesson4.des | 2 +-
crawl-ref/source/dat/des/variable/mini_monsters.des | 8 ++++----
crawl-ref/source/dat/vim/syntax/levdes.vim | 2 +-
crawl-ref/source/mapdef.cc | 2 +-
8 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/crawl-ref/docs/develop/levels/syntax.txt b/crawl-ref/docs/develop/levels/syntax.txt
index 695cf51..4f340e6 100644
--- a/crawl-ref/docs/develop/levels/syntax.txt
+++ b/crawl-ref/docs/develop/levels/syntax.txt
@@ -672,8 +672,8 @@ ITEM: (list of items, separated by comma)
* "slevels:max_levels" the total, combined level of spells to include
in the book. "slevels:6" will use three level two spells, two level
three spells, a level two and a level four spell, and so on.
- * "spells:spell_1|spell_2" a list of spells to include in the book.
- Spells must be separated by "|" without spaces. Within a spell name,
+ * "spells:spell_1&spell_2" a list of spells to include in the book.
+ Spells must be separated by "&" without spaces. Within a spell name,
all of "_" will be replaced with " " and will be parsed as such.
A book may contain at most 8 spells.
* "title:title" will define the title of the book.
diff --git a/crawl-ref/source/dat/des/altar/lugonu_bribe.des b/crawl-ref/source/dat/des/altar/lugonu_bribe.des
index d88b8a7..3030180 100644
--- a/crawl-ref/source/dat/des/altar/lugonu_bribe.des
+++ b/crawl-ref/source/dat/des/altar/lugonu_bribe.des
@@ -38,14 +38,14 @@ function callback.tgw_lugonu_bribe_lugonu_item (data, triggerable,
Elyvilon="lantern of shadows / book of Necromancy w:5 /\
book of Death w:5 / book of Unlife w:5",
Fedhas="randbook owner:Lugonu spells:necromutation numspells:1 /\
- randbook owner:Lugonu spells:simulacrum|cigotuvi's_embrace \
+ randbook owner:Lugonu spells:simulacrum&cigotuvi's_embrace \
numspells:2 /\
- randbook owner:Lugonu spells:animate_dead|sublimation_of_blood \
+ randbook owner:Lugonu spells:animate_dead&sublimation_of_blood \
numspells:2",
Gozag="amulet of the gourmand ident:type /\
- randbook owner:Lugonu spells:corpse_rot|animate_dead numspells:2",
+ randbook owner:Lugonu spells:corpse_rot&animate_dead numspells:2",
Jiyva="stone q:10-20 / large rock q:2-4",
- Kikubaaqudgha="randbook owner:Lugonu spells:control_undead|dispel_undead \
+ Kikubaaqudgha="randbook owner:Lugonu spells:control_undead&dispel_undead \
numspells:2 /\
rat corpse w:5 / kobold corpse w:5 / ugly thing corpse",
Lugonu="no",
diff --git a/crawl-ref/source/dat/des/branches/zot.des b/crawl-ref/source/dat/des/branches/zot.des
index 8f54b34..2892560 100644
--- a/crawl-ref/source/dat/des/branches/zot.des
+++ b/crawl-ref/source/dat/des/branches/zot.des
@@ -1668,8 +1668,8 @@ KFEAT: _ = altar_xom / altar_lugonu / altar_zin / altar_the_shining_one / \
SUBST: 1 = 1.
# What kind of holy books would draconians have?
KITEM: D = book of the Dragon
-KITEM: Z = randbook spells:summon_demon|fireball|animate_dead|airstrike title:the_Zealot
-KITEM: F = randbook spells:bolt_of_fire|fireball|sticky_flame|conjure_flame title:Fire_and_Brimstone
+KITEM: Z = randbook spells:summon_demon&fireball&animate_dead&airstrike title:the_Zealot
+KITEM: F = randbook spells:bolt_of_fire&fireball&sticky_flame&conjure_flame title:Fire_and_Brimstone
KITEM: _ = manual of invocations
COLOUR: r = red, y = yellow, b = blue, g = green, m = magenta, q = cyan, c = magenta
TILE: r = dngn_transparent_stone_red, y = dngn_transparent_stone_yellow, \
diff --git a/crawl-ref/source/dat/des/portals/wizlab.des b/crawl-ref/source/dat/des/portals/wizlab.des
index c7a6d55..8f05069 100644
--- a/crawl-ref/source/dat/des/portals/wizlab.des
+++ b/crawl-ref/source/dat/des/portals/wizlab.des
@@ -1248,7 +1248,7 @@ MONS: statue hd:12 spells:orb_of_destruction.62.magical \
KMONS: 3DEF = purple draconian
KITEM: D = robe ego:archmagi ident:type, star_item / superb_item, star_item
KITEM: E = any book, randbook disc:conjuration owner:Iskenderun \
- spells:iskenderun's_mystic_blast|iskenderun's_battlesphere, \
+ spells:iskenderun's_mystic_blast&iskenderun's_battlesphere, \
randbook disc:conjuration owner:Iskenderun
KITEM: F = any book good_item, any book good_item, any book
KMONS: DEF = purple draconian
@@ -1614,7 +1614,7 @@ KITEM: f = book of spatial translocations w:5 / book of the warp w:5 / \
plane papyrus w:5 / manual of translocations w:5 / \
randbook disc:translocation numspells:5 / \
randbook disc:translocation owner:Golubria numspells:7 \
- spells:shroud_of_golubria|passage_of_golubria
+ spells:shroud_of_golubria&passage_of_golubria
KITEM: g = ring of flight / potion of flight q:2 / \
lantern of shadows / potion of haste w:5 / \
scroll of fog / royal jelly q:3 / \
diff --git a/crawl-ref/source/dat/des/tutorial/lesson4.des b/crawl-ref/source/dat/des/tutorial/lesson4.des
index 547af41..7e1dc1c 100644
--- a/crawl-ref/source/dat/des/tutorial/lesson4.des
+++ b/crawl-ref/source/dat/des/tutorial/lesson4.des
@@ -34,7 +34,7 @@ ORIENT: encompass
KFEAT: ABCDEF = .
COLOUR: ABCDEFdefg = lightblue
FTILE: ABCDEFdefg = tutorial_pad
-ITEM: randbook numspells:2 spells:magic_dart|mephitic_cloud title:Introduction_to_Spellcasting owner:player
+ITEM: randbook numspells:2 spells:magic_dart&mephitic_cloud title:Introduction_to_Spellcasting owner:player
ITEM: ring of magical power not_cursed
ITEM: staff of wizardry not_cursed
ITEM: bread ration
diff --git a/crawl-ref/source/dat/des/variable/mini_monsters.des b/crawl-ref/source/dat/des/variable/mini_monsters.des
index 70a9947..2952330 100644
--- a/crawl-ref/source/dat/des/variable/mini_monsters.des
+++ b/crawl-ref/source/dat/des/variable/mini_monsters.des
@@ -876,9 +876,9 @@ ITEM: any potion
ITEM: Young Poisoner's Handbook / book of Changes / \
randbook disc:Poison disc2:Transmutation slevels:8 w:5 / \
randbook numspells:5 title:Nature \
- spells:beastly_appendage|summon_small_mammal|sticks_to_snakes|call_canine_familiar|spider_form / \
+ spells:beastly_appendage&summon_small_mammal&sticks_to_snakes&call_canine_familiar&spider_form / \
randbook numspells:5 title:Nature \
- spells:beastly_appendage|sting|sticks_to_snakes|cure_poison|spider_form w:245
+ spells:beastly_appendage&sting&sticks_to_snakes&cure_poison&spider_form w:245
: if crawl.coinflip() then
KITEM: f = arrow ego:poisoned / javelin ego:poisoned q:4-6 / tomahawk ego:poisoned
: else
@@ -932,9 +932,9 @@ ITEM: any potion
ITEM: Young Poisoner's Handbook / book of Changes / \
randbook disc:Poison disc2:Transmutation slevels:8 w:5 / \
randbook numspells:5 title:Nature \
- spells:beastly_appendage|summon_small_mammal|sticks_to_snakes|call_canine_familiar|spider_form / \
+ spells:beastly_appendage&summon_small_mammal&sticks_to_snakes&call_canine_familiar&spider_form / \
randbook numspells:5 title:Nature \
- spells:beastly_appendage|sting|sticks_to_snakes|cure_poison|spider_form w:245
+ spells:beastly_appendage&sting&sticks_to_snakes&cure_poison&spider_form w:245
: if crawl.coinflip() then
KITEM: f = arrow ego:poisoned / javelin ego:poisoned q:4-6 / tomahawk ego:poisoned
: else
diff --git a/crawl-ref/source/dat/vim/syntax/levdes.vim b/crawl-ref/source/dat/vim/syntax/levdes.vim
index 094b4ff..5b8151b 100644
--- a/crawl-ref/source/dat/vim/syntax/levdes.vim
+++ b/crawl-ref/source/dat/vim/syntax/levdes.vim
@@ -155,7 +155,7 @@ syn keyword desOrientation vault no_item_gen no_monster_gen no_pool_fixup no_wal
" KPROP
syn keyword desOrientation bloody highlight mold no_cloud_gen no_rtele_into no_ctele_into no_tele_into no_submerge no_tide no_jiyva
-syn match desComment "^\s*#.*$"
+syn match desComment "^\s*#.*$&"
"Note: `;` and `|` are necessary due to monster/randbook `spells:`,
" `.` can be an empty spell slot and `'` is contained in certain spell names,
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index cb12f65..3617fc1 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -5317,7 +5317,7 @@ bool item_list::parse_single_spec(item_spec& result, string s)
const string spells = strip_tag_prefix(s, "spells:");
- vector<string> spell_list = split_string("|", spells);
+ vector<string> spell_list = split_string("&", spells);
CrawlVector &incl_spells
= result.props[RANDBK_SPELLS_KEY].new_vector(SV_INT);
--
2.1.0
|