diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-17 20:43:18 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-17 20:43:18 +0000 |
commit | 44f56edce815f5ff8fb4124829523439f1cc8ad2 (patch) | |
tree | dc7be3b6e516b32ca8130786b35ebecf43abbabd /crawl-ref/source/makeitem.cc | |
parent | b7516d279965cc139c24507688047172bb7a0f7f (diff) | |
download | crawl-ref-44f56edce815f5ff8fb4124829523439f1cc8ad2.tar.gz crawl-ref-44f56edce815f5ff8fb4124829523439f1cc8ad2.zip |
Complete revamp of cards and decks, following David's ideas.
Many of the cards don't work yet (e.g., all Summoning cards); this
will be fixed in the near future.
Deck rarity, by the way, is encoded in its colour. Yuck - but I was
out of bits in the item_def struct. Better ideas welcome.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1594 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r-- | crawl-ref/source/makeitem.cc | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 6bd00913e7..81bdcd6b86 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -714,6 +714,16 @@ void item_colour( item_def &item ) break; case OBJ_MISCELLANY: + if ( is_deck(item) ) + { + item.colour = GREEN; + if ( one_chance_in(10) ) + item.colour = LIGHTMAGENTA; // legendary + if ( one_chance_in(5) ) + item.colour = (coinflip() ? MAGENTA : BROWN); + break; + } + switch (item.sub_type) { case MISC_BOTTLED_EFREET: @@ -808,11 +818,7 @@ void item_colour( item_def &item ) case MISC_EMPTY_EBONY_CASKET: item.colour = DARKGREY; break; - - case MISC_DECK_OF_SUMMONINGS: - case MISC_DECK_OF_WONDERS: - case MISC_DECK_OF_TRICKS: - case MISC_DECK_OF_POWER: + default: item.colour = random_colour(); break; @@ -2748,18 +2754,21 @@ int items( int allow_uniques, // not just true-false, if (force_type == OBJ_RANDOM) { do + { mitm[p].sub_type = random2(NUM_MISCELLANY); - while //mv: never generated + } + while + //mv: never generated ((mitm[p].sub_type == MISC_RUNE_OF_ZOT) || (mitm[p].sub_type == MISC_HORN_OF_GERYON) - // mv: others are possible but less often - // btw. chances of generating decks are almost the same as - // before, other chances are now distributed more steadily - || (mitm[p].sub_type == MISC_DECK_OF_POWER && !one_chance_in(12)) - || (mitm[p].sub_type == MISC_DECK_OF_SUMMONINGS && !one_chance_in(3)) - || (mitm[p].sub_type == MISC_DECK_OF_TRICKS && !one_chance_in(3)) - || (mitm[p].sub_type == MISC_DECK_OF_WONDERS && !one_chance_in(3)) - ); + || (mitm[p].sub_type == MISC_DECK_OF_PUNISHMENT) + // pure decks are rare in the dungeon + || ((mitm[p].sub_type == MISC_DECK_OF_ESCAPE || + mitm[p].sub_type == MISC_DECK_OF_DESTRUCTION || + mitm[p].sub_type == MISC_DECK_OF_DUNGEONS || + mitm[p].sub_type == MISC_DECK_OF_SUMMONING || + mitm[p].sub_type == MISC_DECK_OF_WONDERS) && + !one_chance_in(5))); // filling those silly empty boxes -- bwr if (mitm[p].sub_type == MISC_EMPTY_EBONY_CASKET @@ -2773,15 +2782,8 @@ int items( int allow_uniques, // not just true-false, mitm[p].sub_type = force_type; } - if (mitm[p].sub_type == MISC_DECK_OF_WONDERS - || mitm[p].sub_type == MISC_DECK_OF_SUMMONINGS - || mitm[p].sub_type == MISC_DECK_OF_POWER) - { + if ( is_deck(mitm[p]) ) mitm[p].plus = 4 + random2(10); - } - - if (mitm[p].sub_type == MISC_DECK_OF_TRICKS) - mitm[p].plus = 6 + random2avg(15, 2); if (mitm[p].sub_type == MISC_RUNE_OF_ZOT) mitm[p].plus = item_race; |