Beispiel #1
0
        // Function from file: touch_attacks.dm
        public bool ChargeHand(Mob_Living_Carbon user = null)
        {
            bool hand_handled = false;

            hand_handled       = true;
            this.attached_hand = Lang13.Call(this.hand_path, this);

            if (user.hand)
            {
                if (!user.equip_to_slot_if_possible(this.attached_hand, 4, false, true, true))
                {
                    if (!user.equip_to_slot_if_possible(this.attached_hand, 5, false, true, true))
                    {
                        hand_handled = false;
                    }
                }
            }
            else if (!user.equip_to_slot_if_possible(this.attached_hand, 5, false, true, true))
            {
                if (!user.equip_to_slot_if_possible(this.attached_hand, 4, false, true, true))
                {
                    hand_handled = false;
                }
            }

            if (!hand_handled)
            {
                GlobalFuncs.qdel(this.attached_hand);
                this.charge_counter = this.charge_max;
                this.attached_hand  = null;
                user.WriteMsg("<span class='warning'>Your hands are full!</span>");
                return(false);
            }
            user.WriteMsg("<span class='notice'>You channel the power of the spell to your hand.</span>");
            return(true);
        }