Snake Sneak
Posts: 104
Joined: Thursday, 16th May 2013, 12:57
New trove, can this be improved w/ Lua?
- Code:
NAME: trove_trog
: if trove.weapon_skills() >= trove.spell_skills() and trove.weapon_skills() >= you.skill("Unarmed Combat") then
WEIGHT: 15
: else
WEIGHT: 5
: end
ORIENT: encompass
TAGS: no_item_gen no_monster_gen allow_dup no_species_fe
ITEM: acquire:trog weapon / any useful weapon good_item / any weapon w:2
KITEM: e = acquire:trog weapon / any useful weapon good_item / any weapon w:2
NSUBST: d = 4:e / *:d
KPROP: e = bloody
NSUBST: ' = 4:' / *:.
KPROP: ' = bloody
KFEAT: _ = altar_trog
: trove.setup_features(_G)
: set_border_fill_type("endless_lava")
MAP
.
.....
..'d'..
.ddddd.
.dd_dd.
.ddddd.
.''d''.
.'''''.
..'''..
..A..
.<.
ENDMAP
So, I'm shooting for an alternative to the existing weapon troves that uses Trog acquirements instead of standard ones. What I'd like to do is have the game reroll if "any useful weapon" or "any weapon" generate with pain brand, since Trog will never gift pain. Ditto if it generates unrands that he doesn't like, e.g. Wucad Mu. Can this be done with Lua?
Why am I doing this? The existing 3 weapon troves all use standard acquirements for their high-end loot. Trog acquirements weight the top-tier base types (e.g. triple blades) lower, but on average start with a higher enchantment. They also, obviously, are much more likely to get the antimagic brand, which is rare for non-Trog worshipers, and also a very good brand. As I see it, the loot here should be of comparable quality to the existing weapon troves, while still remaining distinctive. Comments and criticisms welcome!