Skip to content

Commit

Permalink
remove negative rings, make jewelry pluses more discrete
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellmonk committed Mar 20, 2017
1 parent 0c59d27 commit 88f1888
Showing 1 changed file with 5 additions and 25 deletions.
30 changes: 5 additions & 25 deletions crawl-ref/source/makeitem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1517,39 +1517,23 @@ static bool _try_make_jewellery_unrandart(item_def& item, int force_type,
return false;
}

/**
* Generate a random 'bad' plus for a ring type that cares about plusses.
*
* @return a bad 'plus', between -2 and -6 (inclusive).
*/
static int _bad_ring_plus()
{
int plus = -2;
if (coinflip())
--plus;
if (one_chance_in(3))
plus -= random2(4);
return plus;
}

/**
* Generate a random 'good' plus for a ring type that cares about plusses.
*
* @param subtype The type of ring in question.
* @return Between 1 and 6 (inclusive); 2-6 for statrings.
* (+1 stat rings are extremely boring.)
* @return Either 3 or 6.
* Marginal increases of +1 are boring.
*/
static int _good_jewellery_plus(int subtype)
{
switch (subtype)
switch (subtype)
{
case RING_STRENGTH:
case RING_DEXTERITY:
case RING_INTELLIGENCE:
case AMU_REFLECTION:
return 2 + (one_chance_in(3) ? random2(2) : random2avg(5, 2));
return 3 + (one_chance_in(4) ? 3 : 0);
default:
return 1 + (one_chance_in(3) ? random2(3) : random2avg(6, 2));
return 3 + (one_chance_in(6) ? 3 : 0);
}
}

Expand All @@ -1569,10 +1553,6 @@ static int _determine_ring_plus(int subtype)
case RING_EVASION:
case RING_DEXTERITY:
case RING_INTELLIGENCE:
if (one_chance_in(5)) // 20% of such rings are cursed {dlb}
return _bad_ring_plus();
return _good_jewellery_plus(subtype);

case AMU_REFLECTION:
return _good_jewellery_plus(subtype);

Expand Down

0 comments on commit 88f1888

Please sign in to comment.