Page 1 of 1

New trove, can this be improved w/ Lua?

PostPosted: Friday, 8th January 2016, 04:47
by Skrybe
  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!

Re: New trove, can this be improved w/ Lua?

PostPosted: Saturday, 9th January 2016, 04:41
by duvessa
you should change those to ammo instead since trog gifts assloads of ammo now even if you have no ranged skills

Re: New trove, can this be improved w/ Lua?

PostPosted: Saturday, 10th September 2016, 18:51
by Midn8
I think that this is a great idea, but maybe something else that identifies it as trog, like burning spellbooks.

Also maybe have manuals for melee skills? (Because trog book acquirement always gives manuals.) Just an idea.

Re: New trove, can this be improved w/ Lua?

PostPosted: Saturday, 10th September 2016, 20:31
by Skrybe
Yeah, throwing a book in there with a flame cloud on it would be a simple matter. Would probably want the book to just contain Magic Dart or something, so the player isn't rewarded with useful spells in a Trog trove.

As for manuals, off the top of my head I'm not sure if "acquire:trog book" would generate a spellbook or not. If it does, the manuals would need to be weighted by hand, which I'm not a huge fan of. I personally think the RNG should determine the loot when troves are concerned.

Still though, the sticking point is vetoing generation of brands Trog hates.