diff options
author | pubby <pubby8@gmail.com> | 2013-06-12 02:34:30 -0500 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2013-08-25 00:12:25 -0400 |
commit | 2211e5ff2f25adfb931eb0ff32b274afa7eb7ed5 (patch) | |
tree | 4568295ed3a6c1bd2c0df4bc8db167db1809c043 /crawl-ref/source/player-act.cc | |
parent | 9c1491e134d7c43d0ad2c4ebd444a3a2199b457b (diff) | |
download | crawl-ref-2211e5ff2f25adfb931eb0ff32b274afa7eb7ed5.tar.gz crawl-ref-2211e5ff2f25adfb931eb0ff32b274afa7eb7ed5.zip |
Create Formicid species and monsters.
Tavern post:
https://crawl.develz.org/tavern/viewtopic.php?f=8&t=8298
Wierdness & mutations:
- poison weakness
- retractable antennae (can wear headgear and ignore mutation)
- chitin skin (+3 AC)
- most weapons 1-handed, big weapons 2-handed
- permanent stasis
- ability to shaft self
- ability to dig
- Starts with 2 curing pots
3 monster versions of formicids were added:
formicid, a weak fighter
formicid drone, a stronger fighter
formicid venom mage, a magician with olgreb's and mass cure poison
[ Pushing to a branch for experimental playtesting on CSZO.
Also optimised the new tiles. -nfm ]
Diffstat (limited to 'crawl-ref/source/player-act.cc')
-rw-r--r-- | crawl-ref/source/player-act.cc | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/crawl-ref/source/player-act.cc b/crawl-ref/source/player-act.cc index d5ea690c83..8d724090a2 100644 --- a/crawl-ref/source/player-act.cc +++ b/crawl-ref/source/player-act.cc @@ -287,6 +287,20 @@ item_def *player::weapon(int /* which_attack */) const return slot_item(EQ_WEAPON, false); } +// Give hands required to wield weapon. +hands_reqd_type player::hands_reqd(const item_def &item) const +{ + if (species == SP_FORMICID) + { + if (weapon_size(item) >= SIZE_BIG) + return HANDS_TWO; + else + return HANDS_ONE; + } + else + return actor::hands_reqd(item); +} + bool player::can_wield(const item_def& item, bool ignore_curse, bool ignore_brand, bool ignore_shield, bool ignore_transform) const @@ -299,7 +313,7 @@ bool player::can_wield(const item_def& item, bool ignore_curse, // Unassigned means unarmed combat. const bool two_handed = item.base_type == OBJ_UNASSIGNED - || hands_reqd(item, body_size()) == HANDS_TWO; + || hands_reqd(item) == HANDS_TWO; if (two_handed && !ignore_shield && player_wearing_slot(EQ_SHIELD)) return false; @@ -312,6 +326,9 @@ bool player::could_wield(const item_def &item, bool ignore_brand, { if (species == SP_FELID) return false; + if (species == SP_FORMICID) + return true; + if (body_size(PSIZE_TORSO, ignore_transform) < SIZE_LARGE && (item_mass(item) >= 500 || item.base_type == OBJ_WEAPONS @@ -690,9 +707,7 @@ bool player::can_go_berserk(bool intentional, bool potion, bool quiet) const { if (verbose) { - const item_def *amulet = you.slot_item(EQ_AMULET, false); - mprf("You cannot go berserk with %s on.", - amulet? amulet->name(DESC_YOUR).c_str() : "your amulet"); + mprf("You cannot go berserk while under stasis"); } return false; } |