示例#1
0
        // Function from file: armor.dm
        public override bool hit_reaction(Mob_Living_Carbon owner = null, string attack_text = null, int?final_block_chance = null, dynamic damage = null, int?attack_type = null)
        {
            Mob_Living M = null;


            if (!this.active)
            {
                return(false);
            }

            if (Rand13.PercentChance(this.hit_reaction_chance))
            {
                owner.visible_message("<span class='danger'>The " + this + " blocks the " + attack_text + ", sending out arcs of lightning!</span>");

                foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInView(owner, 6), typeof(Mob_Living)))
                {
                    M = _a;


                    if (M == owner)
                    {
                        continue;
                    }
                    owner.Beam(M, "lightning" + Rand13.Int(1, 12), "icons/effects/effects.dmi", 5);
                    M.adjustFireLoss(25);
                    GlobalFuncs.playsound(M, "sound/machines/defib_zap.ogg", 50, 1, -1);
                }
                return(true);
            }
            return(false);
        }