コード例 #1
0
        // Function from file: mirror.dm
        public override bool attack_slime(Mob_Living_SimpleAnimal_Slime user = null)
        {
            user.changeNext_move(8);
            user.do_attack_animation(this);

            if (this.shattered)
            {
                GlobalFuncs.playsound(this.loc, "sound/effects/hit_on_shattered_glass.ogg", 70, 1);
                return(false);
            }
            user.visible_message("<span class='danger'>" + user + " smashes " + this + "!</span>");
            this.shatter();
            return(false);
        }
コード例 #2
0
        // Function from file: grille.dm
        public override bool attack_slime(Mob_Living_SimpleAnimal_Slime user = null)
        {
            user.changeNext_move(8);
            user.do_attack_animation(this);

            if (!user.is_adult)
            {
                return(false);
            }
            GlobalFuncs.playsound(this.loc, "sound/effects/grillehit.ogg", 80, 1);
            user.visible_message("<span class='warning'>" + user + " smashes against " + this + ".</span>", "<span class='danger'>You smash against " + this + ".</span>", "<span class='italics'>You hear twisting metal.</span>");
            this.health -= Rand13.Int(1, 2);
            this.healthcheck();
            return(false);
        }
コード例 #3
0
        // Function from file: effects_foam.dm
        public override bool attack_slime(Mob_Living_SimpleAnimal_Slime user = null)
        {
            user.changeNext_move(8);
            user.do_attack_animation(this);

            if (!user.is_adult)
            {
                this.attack_hand(user);
                return(false);
            }

            if (Rand13.PercentChance(75 - this.metal * 25))
            {
                user.visible_message("<span class='danger'>" + user + " smashes through the foamed metal!</span>", "<span class='danger'>You smash through the metal foam wall!</span>");
                GlobalFuncs.qdel(this);
            }
            return(false);
        }