Example #1
0
        // Function from file: aliens.dm
        public Obj_Structure_Alien_Weeds(dynamic pos = null, Obj_Structure_Alien_Weeds_Node node = null) : base((object)(pos))
        {
            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            this.linked_node = node;

            if (this.loc is Tile_Space)
            {
                GlobalFuncs.qdel(this);
                return;
            }

            if (this.icon_state == "weeds")
            {
                this.icon_state = Rand13.Pick(new object [] { "weeds", "weeds1", "weeds2" });
            }
            this.fullUpdateWeedOverlays();
            Task13.Schedule(Rand13.Int(150, 200), (Task13.Closure)(() => {
                if (this != null)
                {
                    this.Life();
                }
                return;
            }));
            return;
        }
Example #2
0
        // Function from file: aliens.dm
        public override dynamic Destroy(  )
        {
            Ent_Static T = null;
            Obj_Structure_Alien_Weeds W = null;

            T        = this.loc;
            this.loc = null;

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(T, 1), typeof(Obj_Structure_Alien_Weeds)))
            {
                W = _a;

                W.updateWeedOverlays();
            }
            this.linked_node = null;
            return(base.Destroy());
        }
Example #3
0
        // Function from file: special_shadowling_abilities.dm
        public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null)
        {
            thearea = thearea ?? Task13.User;

            dynamic              H                      = null;
            string               hatch_or_no            = null;
            Obj_Item             I                      = null;
            Tile_Simulated_Floor F                      = null;
            dynamic              shadowturf             = null;
            Obj_Structure_Alien_Resin_Wall_Shadowling R = null;
            int     temp_flags = 0;
            dynamic newNameId  = null;
            Obj_Structure_Alien_Resin_Wall_Shadowling W = null;
            Obj_Structure_Alien_Weeds_Node            N = null;


            if (Lang13.Bool(thearea.stat) || !(thearea is Mob_Living_Carbon_Human) || !Lang13.Bool(thearea) || !GlobalFuncs.is_shadow(Lang13.Bool(thearea) || this.isinspace(  )))
            {
                return(false);
            }
            H           = thearea;
            hatch_or_no = Interface13.Alert(H, "Are you sure you want to hatch? You cannot undo this!", null, "Yes", "No");

            switch ((string)(hatch_or_no))
            {
            case "No":
                H.WriteMsg("<span class='warning'>You decide against hatching for now.");
                this.charge_counter = this.charge_max;
                return(false);

                break;

            case "Yes":
                H.stunned = Double.PositiveInfinity;
                ((Ent_Static)H).visible_message("<span class='warning'>" + H + "'s things suddenly slip off. They hunch over and vomit up a copious amount of purple goo which begins to shape around them!</span>", "<span class='shadowling'>You remove any equipment which would hinder your hatching and begin regurgitating the resin which will protect you.</span>");

                foreach (dynamic _a in Lang13.Enumerate(H, typeof(Obj_Item)))
                {
                    I = _a;

                    ((Mob)H).unEquip(I);
                }
                Task13.Sleep(50);
                F          = null;
                shadowturf = GlobalFuncs.get_turf(thearea);

                foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(thearea, 1), typeof(Tile_Simulated_Floor)))
                {
                    F = _b;

                    new Obj_Structure_Alien_Resin_Wall_Shadowling(F);
                }

                foreach (dynamic _c in Lang13.Enumerate(shadowturf, typeof(Obj_Structure_Alien_Resin_Wall_Shadowling)))
                {
                    R = _c;

                    GlobalFuncs.qdel(R);
                    new Obj_Structure_Alien_Weeds_Node(  );
                }
                temp_flags      = H.status_flags;
                H.status_flags |= 4096;
                ((Ent_Static)H).visible_message("<span class='warning'>A chrysalis forms around " + H + ", sealing them inside.</span>", "<span class='shadowling'>You create your chrysalis and begin to contort within.</span>");
                Task13.Sleep(100);
                ((Ent_Static)H).visible_message("<span class='warning'><b>The skin on " + H + "'s back begins to split apart. Black spines slowly emerge from the divide.</b></span>", "<span class='shadowling'>Spines pierce your back. Your claws break apart your fingers. You feel excruciating pain as your true form begins its exit.</span>");
                Task13.Sleep(90);
                ((Ent_Static)H).visible_message("<span class='warning'><b>" + H + ", skin shifting, begins tearing at the walls around them.</b></span>", "<span class='shadowling'>Your false skin slips away. You begin tearing at the fragile membrane protecting you.</span>");
                Task13.Sleep(80);
                GlobalFuncs.playsound(H.loc, "sound/weapons/slash.ogg", 25, 1);
                H.WriteMsg("<i><b>You rip and slice.</b></i>");
                Task13.Sleep(10);
                GlobalFuncs.playsound(H.loc, "sound/weapons/slashmiss.ogg", 25, 1);
                H.WriteMsg("<i><b>The chrysalis falls like water before you.</b></i>");
                Task13.Sleep(10);
                GlobalFuncs.playsound(H.loc, "sound/weapons/slice.ogg", 25, 1);
                H.WriteMsg("<i><b>You are free!</b></i>");
                H.status_flags = temp_flags;
                Task13.Sleep(10);
                GlobalFuncs.playsound(H.loc, "sound/effects/ghost.ogg", 100, 1);
                newNameId = Rand13.PickFromTable(GlobalVars.possibleShadowlingNames);
                GlobalVars.possibleShadowlingNames.Remove(newNameId);
                H.real_name = newNameId;
                H.name      = thearea.real_name;
                H.stunned   = 0;
                H.WriteMsg("<i><b><font size=3>YOU LIVE!!!</i></b></font>");

                foreach (dynamic _d in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(H, 1), typeof(Obj_Structure_Alien_Resin_Wall_Shadowling)))
                {
                    W = _d;

                    GlobalFuncs.playsound(W, "sound/effects/splat.ogg", 50, 1);
                    GlobalFuncs.qdel(W);
                }

                foreach (dynamic _e in Lang13.Enumerate(shadowturf, typeof(Obj_Structure_Alien_Weeds_Node)))
                {
                    N = _e;

                    GlobalFuncs.qdel(N);
                }
                ((Ent_Static)H).visible_message("<span class='warning'>The chrysalis explodes in a shower of purple flesh and fluid!</span>");
                H.underwear  = "Nude";
                H.undershirt = "Nude";
                H.socks      = "Nude";
                H.faction   |= "faithless";
                ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Under_Shadowling(H), 14);
                ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Shadowling(H), 12);
                ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Suit_Space_Shadowling(H), 13);
                ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Head_Shadowling(H), 11);
                ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Gloves_Shadowling(H), 10);
                ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Mask_Gas_Shadowling(H), 2);
                ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Glasses_Night_Shadowling(H), 9);
                ((Mob)H).set_species(typeof(Species_Shadow_Ling));
                ((Mind)H.mind).remove_spell(this);
                Task13.Sleep(10);
                H.WriteMsg("<span class='shadowling'><b><i>Your powers are awoken. You may now live to your fullest extent. Remember your goal. Cooperate with your thralls and allies.</b></i></span>");
                H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_Enthrall(null));
                H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_Glare(null));
                H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_AoeTurf_Veil(null));
                H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Self_ShadowWalk(null));
                H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_AoeTurf_Flashfreeze(null));
                H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Self_CollectiveMind(null));
                H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Self_ShadowlingRegenarmor(null));
                H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_ShadowlingExtendShuttle(null));
                break;
            }
            return(false);
        }