示例#1
0
        // Function from file: effects_foam.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            user.changeNext_move(8);
            user.do_attack_animation(this);

            if (Convert.ToDouble(((dynamic)user).environment_smash) >= 1)
            {
                user.do_attack_animation(this);
                user.WriteMsg("<span class='notice'>You smash apart the foam wall.</span>");
                GlobalFuncs.qdel(this);
                return(false);
            }
            return(false);
        }
示例#2
0
        // Function from file: mirror.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            Mob_Living M = null;


            if (!(user is Mob_Living_SimpleAnimal))
            {
                return(false);
            }
            M = user;

            if (Convert.ToDouble(((dynamic)M).melee_damage_upper) <= 0)
            {
                return(false);
            }
            user.changeNext_move(8);
            M.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);
        }
示例#3
0
 // Function from file: closets.dm
 public override bool attack_animal(Mob_Living user = null)
 {
     if (Lang13.Bool(((dynamic)user).environment_smash))
     {
         user.do_attack_animation(this);
         this.visible_message(new Txt("<span class='danger'>").item(user).str(" destroys ").the(this).item().str(".</span>").ToString());
         GlobalFuncs.qdel(this);
     }
     return(false);
 }
示例#4
0
 // Function from file: tables_racks.dm
 public override bool attack_animal(Mob_Living user = null)
 {
     if (Lang13.Bool(((dynamic)user).environment_smash))
     {
         user.do_attack_animation(this);
         this.visible_message("<span class='warning'>" + user + " smashes " + this + " apart.</span>");
         this.rack_destroy();
     }
     return(false);
 }
示例#5
0
 // Function from file: Sleeper.dm
 public override bool attack_animal(Mob_Living user = null)
 {
     if (Lang13.Bool(((dynamic)user).environment_smash))
     {
         user.do_attack_animation(this);
         this.visible_message("<span class='danger'>" + user.name + " smashes " + this + " apart!</span>");
         GlobalFuncs.qdel(this);
     }
     return(false);
 }
示例#6
0
 // Function from file: tables_racks.dm
 public override bool attack_animal(Mob_Living user = null)
 {
     if (Lang13.Bool(((dynamic)user).environment_smash))
     {
         user.do_attack_animation(this);
         GlobalFuncs.playsound(this.loc, "sound/weapons/genhit.ogg", 50, 1);
         this.visible_message("<span class='danger'>" + user + " smashes " + this + " apart!</span>");
         this.table_destroy(1);
     }
     return(false);
 }
示例#7
0
        // Function from file: walls.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            user.changeNext_move(8);
            user.do_attack_animation(this);

            if (Convert.ToDouble(((dynamic)user).environment_smash) >= 2)
            {
                GlobalFuncs.playsound(this, "sound/effects/meteorimpact.ogg", 100, 1);
                user.WriteMsg("<span class='notice'>You smash through the wall.</span>");
                this.dismantle_wall(true);
                return(false);
            }
            return(false);
        }
示例#8
0
        // Function from file: deployable.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            user.changeNext_move(8);
            user.do_attack_animation(this);

            if (Lang13.Bool(((dynamic)user).melee_damage_upper) == false || ((dynamic)user).melee_damage_type != "brute" && ((dynamic)user).melee_damage_type != "fire")
            {
                return(false);
            }
            this.visible_message("<span class='danger'>" + user + " " + ((dynamic)user).attacktext + " " + this + "!</span>");
            GlobalFuncs.add_logs(user, this, "attacked");
            this.take_damage(((dynamic)user).melee_damage_upper);
            return(false);
        }
示例#9
0
        // Function from file: grille.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            user.changeNext_move(8);

            if (Lang13.Bool(((dynamic)user).melee_damage_upper) == false || ((dynamic)user).melee_damage_type != "brute" && ((dynamic)user).melee_damage_type != "fire")
            {
                return(false);
            }
            user.do_attack_animation(this);
            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 -= Convert.ToDouble(((dynamic)user).melee_damage_upper);
            this.healthcheck();
            return(false);
        }
示例#10
0
        // Function from file: theblob.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            double damage = 0;


            if (Lang13.Bool(user.faction.Contains("blob")))
            {
                return(false);
            }
            user.changeNext_move(8);
            user.do_attack_animation(this);
            GlobalFuncs.playsound(this.loc, "sound/effects/attackblob.ogg", 50, 1);
            this.visible_message(new Txt("<span class='danger'>").The(user).item().str(" has attacked the ").item(this.name).str("!</span>").ToString());
            damage = Rand13.Int(Convert.ToInt32(((dynamic)user).melee_damage_lower), Convert.ToInt32(((dynamic)user).melee_damage_upper));
            this.take_damage(damage, ((dynamic)user).melee_damage_type, user);
            return(false);
        }
示例#11
0
        // Function from file: walls_reinforced.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            user.changeNext_move(8);
            user.do_attack_animation(this);

            if (Convert.ToInt32(((dynamic)user).environment_smash) == 3)
            {
                this.dismantle_wall(true);
                GlobalFuncs.playsound(this, "sound/effects/meteorimpact.ogg", 100, 1);
                user.WriteMsg("<span class='notice'>You smash through the wall.</span>");
            }
            else
            {
                user.WriteMsg("<span class='warning'>This wall is far too strong for you to destroy.</span>");
            }
            return(false);
        }
示例#12
0
        // Function from file: windowdoor.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            Mob_Living M = null;


            if (!(user is Mob_Living_SimpleAnimal))
            {
                return(false);
            }
            M = user;
            M.do_attack_animation(this);

            if (Convert.ToDouble(((dynamic)M).melee_damage_upper) > 0 && (((dynamic)M).melee_damage_type == "brute" || ((dynamic)M).melee_damage_type == "fire"))
            {
                this.attack_generic(M, Lang13.IntNullable(((dynamic)M).melee_damage_upper));
            }
            return(false);
        }
示例#13
0
        // Function from file: swarmer.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            Mob_Living S = null;


            if (user is Mob_Living_SimpleAnimal)
            {
                S = user;
                S.do_attack_animation(this);
                user.changeNext_move(8);

                if (((dynamic)S).melee_damage_type == "brute" || ((dynamic)S).melee_damage_type == "fire")
                {
                    this.TakeDamage(Rand13.Int(Convert.ToInt32(((dynamic)S).melee_damage_lower), Convert.ToInt32(((dynamic)S).melee_damage_upper)));
                }
            }
            return(false);
        }
示例#14
0
        // Function from file: dominator.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            Mob_Living M = null;


            if (!(user is Mob_Living_SimpleAnimal))
            {
                return(false);
            }
            M = user;
            M.do_attack_animation(this);

            if (Convert.ToDouble(((dynamic)M).melee_damage_upper) <= 0)
            {
                return(false);
            }
            this.healthcheck(((dynamic)M).melee_damage_upper);
            return(false);
        }
示例#15
0
        // Function from file: lighting.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            if (Lang13.Bool(((dynamic)user).melee_damage_upper) == false)
            {
                return(false);
            }

            if (this.status == 1 || this.status == 2)
            {
                user.WriteMsg("<span class='danger'>That object is useless to you.</span>");
                return(false);
            }
            else if (this.status == 0 || this.status == 3)
            {
                user.do_attack_animation(this);
                this.visible_message("<span class='danger'>" + user.name + " smashed the light!</span>", "<span class='italics'>You hear a tinkle of breaking glass.</span>");
                this.broken();
            }
            return(false);
        }