Dungeon Crawl Stone Soup Tracker - DCSS
Viewing Issue Advanced Details
5706 Bug Report minor always 2012-05-29 04:49 2015-04-16 23:32
nicolae Local  
wheals Windows  
normal Both  
resolved 0.11 ancient branch  
done  
none    
none 0.16 ancient branch  
0005706: Existing vault syntax crashes when trying to specify spells for a randbook sold in a shop
Vault syntax for defining a shop uses | to separate items.
Vault syntax for defining a randbook's spells uses | to separate spells.
If you make a vault with a shop, and want that shop to sell your own book with two or more specific spells, the map parser will crash on the double meaning of |. For example, this will crash:

KFEAT: a = any shop ; any book | randbook spells:slow|magic_dart

But with only one spell it's fine, since there's no | in the spell list:

KFEAT: a = any shop ; any book | randbook spells:slow
? file icon 0001-update-spellbook-definition-syntax-to-not-conflict-w.patch [^] (9,477 bytes) 2015-04-04 07:58 [Show Content]
Issue History
2012-05-29 04:49 nicolae New Issue
2013-03-19 03:22 mumra Issue Monitored: mumra
2015-04-04 07:58 nicolae File Added: 0001-update-spellbook-definition-syntax-to-not-conflict-w.patch
2015-04-04 07:59 nicolae Note Added: 0028776
2015-04-16 23:32 wheals Note Added: 0028887
2015-04-16 23:32 wheals Status new => resolved
2015-04-16 23:32 wheals Fixed in Branch => 0.16 pre-release branch
2015-04-16 23:32 wheals Resolution open => done
2015-04-16 23:32 wheals Assigned To => wheals

Notes
(0028776)
nicolae   
2015-04-04 07:59   
Well I finally got around to patching this. The simplest solution was simply to change the symbol used to separate spells in a spellbook definition. The symbol is no longer "|". It is now "&". This compiled fine, ran fine, and successfully generated a test shop with a specially-defined randbook inside.

I promise to abuse this new vault-writing power as soon as possible.
(0028887)
wheals   
2015-04-16 23:32   
Applied in https://github.com/crawl/crawl/commit/763bd81fc48186671ad8c5f204bf59321d70a59b, [^] thanks!