Patch: Allow Ash to convert curse scrolls


If you are interested in helping with tiles, vaults, patches or documentation, this is the place for that.

Mines Malingerer

Posts: 47

Joined: Tuesday, 3rd December 2013, 19:12

Post Friday, 3rd January 2014, 17:24

Patch: Allow Ash to convert curse scrolls

Tired of having 6 curse weapon scrolls and 3 armour pieces in need of attention? So does Ashenzari! She wants those things to be used!

This patch adds curse weapon, curse armour, and curse jewellery to the scrolls Ashenzari will accept as sacrifices. This has the effect of allowing you to convert your useless or leftover curse scrolls.

The first pass on this did not take because the code to add new scrolls is performed inside the sacrifice loop. Needless to say, adding items to the stacks on the ground during this had interesting results. I took the call to add scrolls out of the individual item sacrifice routine and placed it at the end of item offering - same place as where total sacrifices to Nemelex are checked.

Blades Runner

Posts: 578

Joined: Thursday, 12th January 2012, 21:03

Post Friday, 3rd January 2014, 21:29

Re: Patch: Allow Ash to convert curse scrolls

This sounds really, really convenient, but I'd worry it's too great a buff to an already excellent god. I'll try it out, though, it might work well in practice.
Wins: DsWz(6), DDNe(4), HuIE(5), HuFE(4), MiBe(3)
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Friday, 3rd January 2014, 21:58

Re: Patch: Allow Ash to convert curse scrolls

The problem (underlined by dpeg and myself in the mantis comments), isn't really about power level. The change just makes the god less interesting. And it does it in a bad way: it's tedious to repeatedly sacrifice the same scroll over and over until you get the one you want.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks: 2
duvessa, XuaXua
User avatar

Swamp Slogger

Posts: 143

Joined: Wednesday, 23rd October 2013, 02:30

Post Friday, 3rd January 2014, 22:26

Re: Patch: Allow Ash to convert curse scrolls

Could there perhaps be a guaranteed cycle for the sacrificing? So if you sac curse armor, you get curse weapons, which turns into curse jewelry, which turns into curse armor? That way you'd need to re-sac it a maximum of 2 times?

Vaults Vanquisher

Posts: 508

Joined: Sunday, 16th June 2013, 14:01

Post Friday, 3rd January 2014, 23:21

Re: Patch: Allow Ash to convert curse scrolls

Ash should convert ?RC with a weighted chance, either for available slots or available non-cursed slots (I would prefer the former) so a Human gets 1 ?curse weapon for every 5 ?curse armour on average.

Mines Malingerer

Posts: 47

Joined: Tuesday, 3rd December 2013, 19:12

Post Saturday, 4th January 2014, 00:10

Re: Patch: Allow Ash to convert curse scrolls

1010011010 wrote:Ash should convert ?RC with a weighted chance, either for available slots or available non-cursed slots (I would prefer the former) so a Human gets 1 ?curse weapon for every 5 ?curse armour on average.


I wouldn't want to weight on non-cursed slots. What if you've made a decision to not curse a weapon, or to not curse gloves to be able to swap a ring slot? You wouldn't want to get more scrolls for that.

Presently scroll generation is weighted evenly - except Felids always get jewellery and Octopodes only get a random scroll 1/4 of the time (otherwise they get jewellery, too). If a new patch doing weighting for other species would be supported I'd be happy to make it.

Ziggurat Zagger

Posts: 8786

Joined: Sunday, 5th May 2013, 08:25

Post Saturday, 4th January 2014, 21:21

Re: Patch: Allow Ash to convert curse scrolls

If you're going to do this, just combine the three curse scrolls into "scroll of curse item" instead. In fact I would especially support that if Ashenzari didn't exist; it'd help with consumable creep (since 0.5, for scrolls: +amnesia, curse jewellery, silence; -paper.)

I don't see how being able to curse any item makes the god any less interesting; getting 4 useless scrolls and 2 useful ones is no different from getting 2 useful scrolls and no others, so surely you could just reduce the number of scrolls available to get the same effect.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Sunday, 5th January 2014, 13:24

Re: Patch: Allow Ash to convert curse scrolls

duvessa wrote:I don't see how being able to curse any item makes the god any less interesting; getting 4 useless scrolls and 2 useful ones is no different from getting 2 useful scrolls and no others, so surely you could just reduce the number of scrolls available to get the same effect.

The difference is that if you lack a scroll type, then you have to curse your other parts to get some piety. And it won't be the same one each game. You'll have to adapt to what you get and each game is a bit different (what players sometimes call "being at the mercy of the RNG"). If there's a single scroll type, you can always use the same strategy each game. I think this is less interesting.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
XuaXua

Blades Runner

Posts: 578

Joined: Thursday, 12th January 2012, 21:03

Post Sunday, 5th January 2014, 22:39

Re: Patch: Allow Ash to convert curse scrolls

It might be nice to weight slightly against curse weapon for most races, since there's only ever one slot for that.
Wins: DsWz(6), DDNe(4), HuIE(5), HuFE(4), MiBe(3)

Vaults Vanquisher

Posts: 508

Joined: Sunday, 16th June 2013, 14:01

Post Monday, 6th January 2014, 00:18

Re: Patch: Allow Ash to convert curse scrolls

I wrote a patch which alters/replaces "_ashenzari_sac_scroll" in godprayer.cc
I wrote it but unfortunately I can't make a patch file right now, so here it is for anyone who wants it:

Spoiler: show
  Code:
static void _ashenzari_sac_scroll(const item_def& item)
{
    int scr = SCR_CURSE_JEWELLERY;
   int WS=1;   //weapon slots, number of
   int AS=0;   //armour slots
   int JS=3;   //jewellery slots
   if(you_can_wear(EQ_HELMET,true)) AS++;
   if(you_can_wear(EQ_CLOAK,true)) AS++;
   if(you_can_wear(EQ_BOOTS,true)) AS++;
   if(you_can_wear(EQ_BODY_ARMOUR,true)) AS++;
   if(you_can_wear(EQ_GLOVES,true)) AS++;
   if(you_can_wear(EQ_SHIELD,true)) AS++;
   if(you.species==SP_FELID) WS=0;
   if(you.species==SP_OCTOPODE) JS=9;
   
   
    if       (x_chance_in_y(WS,WS+AS+JS))scr = SCR_CURSE_WEAPON;
   else if (x_chance_in_y(AS,AS+JS))    scr = SCR_CURSE_ARMOUR;
   else                         scr = SCR_CURSE_JEWELLERY;

    int it = items(0, OBJ_SCROLLS, scr, true, 0, MAKE_ITEM_NO_RACE,
                   0, 0, GOD_ASHENZARI);
    if (it == NON_ITEM)
    {
        mpr("You feel the world is against you.");
        return;
    }

    mitm[it].quantity = 1;
    if (!move_item_to_grid(&it, you.pos(), true))
        destroy_item(it, true); // can't happen
}


I've tested it a bit in wiz-mode and it seems to work (maybe too well)

Mines Malingerer

Posts: 48

Joined: Saturday, 18th January 2014, 02:05

Post Wednesday, 29th January 2014, 18:03

Re: Patch: Allow Ash to convert curse scrolls

I don't think that a non-random way of generating scrolls is a bad idea, but I think it shouldn't be free. What about having an active ability to create one of the curse scroll you want out of two ?RC scrolls in your inventory? That way if you really just need that one kind of scroll, you can go for it by hoping for luck (and recieve other scrolls for later) or you can force it to be gotten now, just at a worse deal. Makes for a more interesting choice than any solution that would result in "you get whatever scrolls you want eventually".

Return to Contributions

Who is online

Users browsing this forum: No registered users and 6 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.