diff options
author | Shmuale Mark <shm.mark@gmail.com> | 2014-06-22 13:01:43 -0400 |
---|---|---|
committer | Shmuale Mark <shm.mark@gmail.com> | 2014-06-22 13:01:43 -0400 |
commit | 99ae1ee20535427a614e4bd574bc810eb6ec5715 (patch) | |
tree | ceea8e2228df06f4720656f5cfd9472a3493a9d3 /crawl-ref/source/art-func.h | |
parent | 4eb87e29c610c5040604c4a76dc87cf937802960 (diff) | |
download | crawl-ref-99ae1ee20535427a614e4bd574bc810eb6ec5715.tar.gz crawl-ref-99ae1ee20535427a614e4bd574bc810eb6ec5715.zip |
Promote intra-cephalopod monarchy synergy.
Octopus king trident gets +1 for every octopus ring worn, ending at
+16, naturally.
Diffstat (limited to 'crawl-ref/source/art-func.h')
-rw-r--r-- | crawl-ref/source/art-func.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/crawl-ref/source/art-func.h b/crawl-ref/source/art-func.h index 7b3fdf108f..0682650c29 100644 --- a/crawl-ref/source/art-func.h +++ b/crawl-ref/source/art-func.h @@ -1156,3 +1156,39 @@ static void _MAJIN_unequip(item_def *item, bool *show_msgs) "The darkness slowly releases its grasp on your magic."); } } + +/////////////////////////////////////////////////// + +static int _octorings_worn() +{ + int worn = 0; + + for (int i = EQ_LEFT_RING; i < NUM_EQUIP; ++i) + { + if (you.melded[i] || you.equip[i] == -1) + continue; + + item_def& ring = you.inv[you.equip[i]]; + if (is_unrandom_artefact(ring) && ring.special == UNRAND_OCTOPUS_KING_RING) + worn++; + } + + return worn; +} + +static void _OCTOPUS_KING_equip(item_def *item, bool *show_msgs, bool unmeld) +{ + int rings = _octorings_worn(); + + if (rings == 8) + _equip_mpr(show_msgs, "You feel like a king!"); + else if (rings) + _equip_mpr(show_msgs, "You feel regal."); + item->plus = 8 + rings; +} + +static void _OCTOPUS_KING_world_reacts(item_def *item) +{ + item->plus = 8 + _octorings_worn(); +} + |