// Function from file: slaughter.dm
        public override bool death(bool?gibbed = null, bool?toast = null)
        {
            Obj_Effect_Decal_Cleanable_Blood innards = null;
            Mob_Living M = null;

            base.death(true, toast);
            new Obj_Effect_Decal_Cleanable_Blood(GlobalFuncs.get_turf(this));
            innards            = new Obj_Effect_Decal_Cleanable_Blood(GlobalFuncs.get_turf(this));
            innards.icon       = "icons/obj/surgery.dmi";
            innards.icon_state = "innards";
            innards.name       = "pile of viscera";
            innards.desc       = "A repulsive pile of guts and gore.";
            new Obj_Item_Organ_Internal_Heart_Demon(this.loc);
            GlobalFuncs.playsound(GlobalFuncs.get_turf(this), "sound/magic/demon_dies.ogg", 200, 1);
            this.visible_message("<span class='danger'>" + this + " screams in anger as it collapses into a puddle of viscera, its most recent meals spilling out of it.</span>");

            foreach (dynamic _a in Lang13.Enumerate(this.consumed_mobs, typeof(Mob_Living)))
            {
                M = _a;

                M.loc = GlobalFuncs.get_turf(this);
            }
            this.ghostize();
            GlobalFuncs.qdel(this);
            return(false);
        }
Beispiel #2
0
        // Function from file: mulebot.dm
        public void RunOver(Mob_Living H = null)
        {
            int damage = 0;
            Obj_Effect_Decal_Cleanable_Blood B = null;

            GlobalFuncs.add_logs(this, H, "run over", null, "(DAMTYPE: " + String13.ToUpper("brute") + ")");
            H.visible_message("<span class='danger'>" + this + " drives over " + H + "!</span>", "<span class='userdanger'>" + this + " drives over you!<span>");
            GlobalFuncs.playsound(this.loc, "sound/effects/splat.ogg", 50, 1);
            damage = Rand13.Int(5, 15);
            H.apply_damage(damage * 2, "brute", "head", this.run_armor_check("head", "melee"));
            H.apply_damage(damage * 2, "brute", "chest", this.run_armor_check("chest", "melee"));
            H.apply_damage(damage * 0.5, "brute", "l_leg", this.run_armor_check("l_leg", "melee"));
            H.apply_damage(damage * 0.5, "brute", "r_leg", this.run_armor_check("r_leg", "melee"));
            H.apply_damage(damage * 0.5, "brute", "l_arm", this.run_armor_check("l_arm", "melee"));
            H.apply_damage(damage * 0.5, "brute", "r_arm", this.run_armor_check("r_arm", "melee"));
            B = new Obj_Effect_Decal_Cleanable_Blood(this.loc);
            B.add_blood_list(H);
            this.add_blood_list(H);
            this.bloodiness += 4;
            return;
        }
Beispiel #3
0
        // Function from file: shuttle_loan.dm
        public override void end(  )
        {
            ByTable empty_shuttle_turfs = null;
            Tile_Simulated_Floor T      = null;
            ByTable shuttle_spawns      = null;
            dynamic pack       = null;
            dynamic pack2      = null;
            dynamic pack3      = null;
            dynamic T2         = null;
            dynamic virus_type = null;
            dynamic T3         = null;
            int?    i          = null;
            Obj_Effect_Decal_Cleanable_Blood b = null;
            dynamic    D              = null;
            ByTable    crate_types    = null;
            dynamic    crate          = null;
            dynamic    pack4          = null;
            double     i2             = 0;
            dynamic    decal          = null;
            int        false_positive = 0;
            Ent_Static T4             = null;
            dynamic    spawn_type     = null;


            if (GlobalVars.SSshuttle.shuttle_loan != null && GlobalVars.SSshuttle.shuttle_loan.dispatched)
            {
                GlobalVars.SSshuttle.shuttle_loan = null;
                empty_shuttle_turfs = new ByTable();

                foreach (dynamic _a in Lang13.Enumerate(GlobalVars.SSshuttle.supply.areaInstance, typeof(Tile_Simulated_Floor)))
                {
                    T = _a;


                    if (T.density || T.contents.len != 0)
                    {
                        continue;
                    }
                    empty_shuttle_turfs.Add(T);
                }

                if (!(empty_shuttle_turfs.len != 0))
                {
                    return;
                }
                shuttle_spawns = new ByTable();

                switch (this.dispatch_type)
                {
                case 1:
                    pack = GlobalVars.SSshuttle.supply_packs[typeof(SupplyPack_Emergency_Specialops)];
                    pack.generate(GlobalFuncs.pick_n_take(empty_shuttle_turfs));
                    shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Syndicate));
                    shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Syndicate));

                    if (Rand13.PercentChance(75))
                    {
                        shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Syndicate));
                    }

                    if (Rand13.PercentChance(50))
                    {
                        shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Syndicate));
                    }
                    break;

                case 2:
                    pack2 = GlobalVars.SSshuttle.supply_packs[typeof(SupplyPack_Organic_Party)];
                    pack2.generate(GlobalFuncs.pick_n_take(empty_shuttle_turfs));
                    shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Russian));
                    shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Russian_Ranged));
                    shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Bear));

                    if (Rand13.PercentChance(75))
                    {
                        shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Russian));
                    }

                    if (Rand13.PercentChance(50))
                    {
                        shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Bear));
                    }
                    break;

                case 3:
                    pack3 = GlobalVars.SSshuttle.supply_packs[typeof(SupplyPack_Emergency_Specialops)];
                    pack3.generate(GlobalFuncs.pick_n_take(empty_shuttle_turfs));
                    shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider));
                    shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider));
                    shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider_Nurse));

                    if (Rand13.PercentChance(50))
                    {
                        shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider_Hunter));
                    }
                    T2 = Rand13.PickFromTable(empty_shuttle_turfs);
                    empty_shuttle_turfs.Remove(T2);
                    new Obj_Effect_Decal_Remains_Human(T2);
                    new Obj_Item_Clothing_Shoes_SpaceNinja(T2);
                    new Obj_Item_Clothing_Mask_Balaclava(T2);
                    T2 = Rand13.PickFromTable(empty_shuttle_turfs);
                    new Obj_Effect_Spider_Stickyweb(T2);
                    T2 = Rand13.PickFromTable(empty_shuttle_turfs);
                    new Obj_Effect_Spider_Stickyweb(T2);
                    T2 = Rand13.PickFromTable(empty_shuttle_turfs);
                    new Obj_Effect_Spider_Stickyweb(T2);
                    T2 = Rand13.PickFromTable(empty_shuttle_turfs);
                    new Obj_Effect_Spider_Stickyweb(T2);
                    T2 = Rand13.PickFromTable(empty_shuttle_turfs);
                    new Obj_Effect_Spider_Stickyweb(T2);
                    break;

                case 5:
                    virus_type = Rand13.Pick(new object [] { typeof(Disease_Beesease), typeof(Disease_Brainrot), typeof(Disease_Fluspanish) });
                    T3         = null;
                    i          = null;
                    i          = 0;

                    while ((i ?? 0) < 10)
                    {
                        if (Rand13.PercentChance(15))
                        {
                            shuttle_spawns.Add(typeof(Obj_Item_Weapon_ReagentContainers_Glass_Bottle));
                        }
                        else if (Rand13.PercentChance(15))
                        {
                            shuttle_spawns.Add(typeof(Obj_Item_Weapon_ReagentContainers_Syringe));
                        }
                        else if (Rand13.PercentChance(25))
                        {
                            shuttle_spawns.Add(typeof(Obj_Item_Weapon_Shard));
                        }
                        T3          = GlobalFuncs.pick_n_take(empty_shuttle_turfs);
                        b           = new Obj_Effect_Decal_Cleanable_Blood(T3);
                        D           = Lang13.Call(virus_type);
                        D.longevity = 1000;
                        b.viruses.Add(D);
                        D.holder = b;
                        i++;
                    }
                    shuttle_spawns.Add(typeof(Obj_Structure_Closet_Crate));
                    shuttle_spawns.Add(typeof(Obj_Item_Weapon_ReagentContainers_Glass_Bottle_PierrotThroat));
                    shuttle_spawns.Add(typeof(Obj_Item_Weapon_ReagentContainers_Glass_Bottle_Magnitis));
                    break;

                case 4:
                    crate_types = new ByTable(new object [] {
                        typeof(SupplyPack_Emergency_Equipment),
                        typeof(SupplyPack_Security_Supplies),
                        typeof(SupplyPack_Organic_Food),
                        typeof(SupplyPack_Emergency_Weedcontrol),
                        typeof(SupplyPack_Engineering_Tools),
                        typeof(SupplyPack_Engineering_Engiequipment),
                        typeof(SupplyPack_Science_Robotics),
                        typeof(SupplyPack_Science_Plasma),
                        typeof(SupplyPack_Medical_Supplies)
                    });

                    foreach (dynamic _b in Lang13.Enumerate(crate_types))
                    {
                        crate = _b;

                        pack4 = GlobalVars.SSshuttle.supply_packs[crate];
                        pack4.generate(GlobalFuncs.pick_n_take(empty_shuttle_turfs));
                    }

                    foreach (dynamic _c in Lang13.IterateRange(1, 5))
                    {
                        i2 = _c;

                        decal = Rand13.Pick(new object [] { typeof(Obj_Effect_Decal_Cleanable_Flour), typeof(Obj_Effect_Decal_Cleanable_RobotDebris), typeof(Obj_Effect_Decal_Cleanable_Oil) });
                        Lang13.Call(decal, GlobalFuncs.pick_n_take(empty_shuttle_turfs));
                    }
                    break;
                }
                false_positive = 0;

                while (shuttle_spawns.len != 0 && empty_shuttle_turfs.len != 0)
                {
                    T4 = GlobalFuncs.pick_n_take(empty_shuttle_turfs);

                    if (T4.contents.len != 0 && false_positive < 5)
                    {
                        false_positive++;
                        continue;
                    }
                    spawn_type = GlobalFuncs.pick_n_take(shuttle_spawns);
                    Lang13.Call(spawn_type, T4);
                }
            }
            return;
        }
Beispiel #4
0
        // Function from file: other_reagents.dm
        public override void reaction_turf(dynamic T = null, double?volume = null)
        {
            dynamic blood_prop  = null;
            Disease D           = null;
            dynamic newVirus    = null;
            dynamic blood_prop2 = null;
            Disease D2          = null;
            dynamic newVirus2   = null;
            dynamic blood_prop3 = null;
            Disease D3          = null;
            dynamic newVirus3   = null;


            if (!(T is Tile_Simulated))
            {
                return;
            }

            if ((volume ?? 0) < 3)
            {
                return;
            }

            if (!Lang13.Bool(this.data["donor"]) || this.data["donor"] is Mob_Living_Carbon_Human)
            {
                blood_prop = Lang13.FindIn(typeof(Obj_Effect_Decal_Cleanable_Blood), T);

                if (!Lang13.Bool(blood_prop))
                {
                    blood_prop = new Obj_Effect_Decal_Cleanable_Blood(T);
                    blood_prop.blood_DNA[this.data["blood_DNA"]] = this.data["blood_type"];
                }

                foreach (dynamic _a in Lang13.Enumerate(this.data["viruses"], typeof(Disease)))
                {
                    D = _a;

                    newVirus            = D.Copy(true);
                    blood_prop.viruses += newVirus;
                    newVirus.holder     = blood_prop;
                }
            }
            else if (this.data["donor"] is Mob_Living_Carbon_Monkey)
            {
                blood_prop2 = Lang13.FindIn(typeof(Obj_Effect_Decal_Cleanable_Blood), T);

                if (!Lang13.Bool(blood_prop2))
                {
                    blood_prop2 = new Obj_Effect_Decal_Cleanable_Blood(T);
                    blood_prop2.blood_DNA["Non-Human DNA"] = "A+";
                }

                foreach (dynamic _b in Lang13.Enumerate(this.data["viruses"], typeof(Disease)))
                {
                    D2 = _b;

                    newVirus2            = D2.Copy(true);
                    blood_prop2.viruses += newVirus2;
                    newVirus2.holder     = blood_prop2;
                }
            }
            else if (this.data["donor"] is Mob_Living_Carbon_Alien)
            {
                blood_prop3 = Lang13.FindIn(typeof(Obj_Effect_Decal_Cleanable_Xenoblood), T);

                if (!Lang13.Bool(blood_prop3))
                {
                    blood_prop3 = new Obj_Effect_Decal_Cleanable_Xenoblood(T);
                    blood_prop3.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*";
                }

                foreach (dynamic _c in Lang13.Enumerate(this.data["viruses"], typeof(Disease)))
                {
                    D3 = _c;

                    newVirus3            = D3.Copy(true);
                    blood_prop3.viruses += newVirus3;
                    newVirus3.holder     = blood_prop3;
                }
            }
            return;
        }