示例#1
0
 // Function from file: construct_spells.dm
 public override void jaunt_disappear(Dynamic_Overlay animation = null, Mob_Living target = null)
 {
     animation.icon_state = "phase_shift";
     animation.dir        = target.dir;
     Icon13.Flick("phase_shift", animation);
     return;
 }
示例#2
0
        // Function from file: flash.dm
        public void cyborg_flash_animation(dynamic user = null)
        {
            Dynamic_Overlay animation = null;

            animation            = new Dynamic_Overlay(user.loc);
            animation.layer      = Convert.ToDouble(user.layer + 1);
            animation.icon_state = "blank";
            animation.icon       = "icons/mob/mob.dmi";
            animation.master     = user;
            Icon13.Flick("blspell", animation);
            Task13.Sleep(5);
            GlobalFuncs.qdel(animation);
            return;
        }
示例#3
0
        // Function from file: soulstone.dm
        public void init_shade(Obj_Item_Device_Soulstone C = null, dynamic T = null, dynamic U = null, bool?vic = null)
        {
            vic = vic ?? false;

            Dynamic_Overlay animation       = null;
            Mob_Living_SimpleAnimal_Shade S = null;

            new Obj_Effect_Decal_Remains_Human(T.loc);
            T.invisibility       = 101;
            animation            = new Dynamic_Overlay(T.loc);
            animation.icon_state = "blank";
            animation.icon       = "icons/mob/mob.dmi";
            animation.master     = T;
            Icon13.Flick("dust-h", animation);
            GlobalFuncs.qdel(animation);
            S               = new Mob_Living_SimpleAnimal_Shade(T.loc);
            S.loc           = C;
            S.status_flags |= 4096;
            S.canmove       = false;
            S.name          = "Shade of " + T.real_name;
            S.real_name     = "Shade of " + T.real_name;
            S.key           = T.key;
            S.faction      |= new Txt().Ref(U).ToString();

            if (GlobalFuncs.iscultist(U))
            {
                ((GameMode)GlobalVars.ticker.mode).add_cultist(S.mind);
            }
            S.__CallVerb("Cancel Camera View");
            C.icon_state = "soulstone2";
            C.name       = "Soul Stone: " + S.real_name;

            if (GlobalFuncs.iswizard(U) || this.usability)
            {
                S.WriteMsg("Your soul has been captured! You are now bound to " + U.real_name + "'s will. Help them succeed in their goals at all costs.");
            }
            else if (GlobalFuncs.iscultist(U))
            {
                S.WriteMsg("Your soul has been captured! You are now bound to the cult's will. Help them succeed in their goals at all costs.");
            }
            C.imprinted = "" + S.name;

            if (vic == true)
            {
                U.WriteMsg("<span class='info'><b>Capture successful!</b>:</span> " + T.real_name + "'s soul has been ripped from their body and stored within the soul stone.");
                U.WriteMsg("The soulstone has been imprinted with " + S.real_name + "'s mind, it will no longer react to other souls.");
            }
            return;
        }
        // Function from file: chronosuit.dm
        public void finish_chronowalk(  )
        {
            Ent_Static user = null;

            user = this.loc;

            if (user is Mob_Living_Carbon_Human)
            {
                ((dynamic)user).SetStunned(0);
                ((dynamic)user).next_move = 1;
                user.alpha = 255;
                user.color = "#ffffff";
                ((dynamic)user).animate_movement = 1;
                ((dynamic)user).notransform      = 0;
                ((dynamic)user).anchored         = 0;
                this.teleporting = false;

                if (Lang13.Bool(((dynamic)user).l_hand) && !((this.hands_nodrop_states & 1) != 0))
                {
                    ((dynamic)user).l_hand.flags &= 65533;
                }

                if (Lang13.Bool(((dynamic)user).r_hand) && !((this.hands_nodrop_states & 2) != 0))
                {
                    ((dynamic)user).r_hand.flags &= 65533;
                }

                if (this.phase_underlay != null && !Lang13.Bool(GlobalFuncs.qdeleted(this.phase_underlay)))
                {
                    GlobalFuncs.qdel(this.phase_underlay);
                    this.phase_underlay = null;
                }

                if (this.camera != null)
                {
                    this.camera.remove_target_ui();
                    this.camera.loc = user;
                }

                if (this.teleport_now.button != null)
                {
                    this.teleport_now.button.UpdateIcon();
                }
            }
            return;
        }
        // Function from file: chronosuit.dm
        public Dynamic_Overlay create_phase_underlay(Ent_Static user = null)
        {
            Icon            user_icon = null;
            Dynamic_Overlay phase     = null;

            user_icon = GlobalFuncs.getFlatIcon(user);
            user_icon.Blend("#ffffff");
            phase          = new Dynamic_Overlay(user.loc);
            phase.icon     = user_icon;
            phase.density  = true;
            phase.anchored = 1;
            phase.master   = user;
            ((dynamic)phase).animate_movement = 0;
            phase.alpha         = 0;
            phase.mouse_opacity = 0;
            phase.name          = user.name;
            phase.transform     = user.transform;
            phase.pixel_x       = user.pixel_x;
            phase.pixel_y       = user.pixel_y;
            return(phase);
        }
示例#6
0
        // Function from file: ethereal_jaunt.dm
        public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null)
        {
            thearea = thearea ?? Task13.User;

            Mob_Living target = null;
            dynamic    mobloc = null;
            Obj_Effect_Dummy_SpellJaunt holder    = null;
            Dynamic_Overlay             animation = null;
            dynamic direction = null;
            Tile    T         = null;

            GlobalFuncs.playsound(GlobalFuncs.get_turf(thearea), "sound/magic/Ethereal_Enter.ogg", 50, 1, -1);

            foreach (dynamic _b in Lang13.Enumerate(targets, typeof(Mob_Living)))
            {
                target = _b;

                target.notransform = 1;
                Task13.Schedule(0, (Task13.Closure)(() => {
                    mobloc             = GlobalFuncs.get_turf(target.loc);
                    holder             = new Obj_Effect_Dummy_SpellJaunt(mobloc);
                    animation          = new Dynamic_Overlay(mobloc);
                    animation.name     = "water";
                    animation.density  = false;
                    animation.anchored = 1;
                    animation.icon     = "icons/mob/mob.dmi";
                    animation.layer    = 5;
                    animation.master   = holder;
                    target.ExtinguishMob();

                    if (target.buckled != null)
                    {
                        target.buckled.unbuckle_mob();
                    }

                    if (target.pulledby != null)
                    {
                        target.pulledby.__CallVerb("Stop Pulling");
                    }
                    target.__CallVerb("Stop Pulling");

                    if (Lang13.Bool(target.buckled_mob))
                    {
                        target.unbuckle_mob(true);
                    }
                    this.jaunt_disappear(animation, target);
                    target.loc = holder;
                    target.reset_perspective(holder);
                    target.notransform = 0;
                    this.jaunt_steam(mobloc);
                    Task13.Sleep(this.jaunt_duration);

                    if (target.loc != holder)
                    {
                        GlobalFuncs.qdel(holder);
                        return;
                    }
                    mobloc        = GlobalFuncs.get_turf(target.loc);
                    animation.loc = mobloc;
                    this.jaunt_steam(mobloc);
                    target.canmove     = false;
                    holder.reappearing = true;
                    GlobalFuncs.playsound(GlobalFuncs.get_turf(thearea), "sound/magic/Ethereal_Exit.ogg", 50, 1, -1);
                    Task13.Sleep(20);

                    if (!Lang13.Bool(GlobalFuncs.qdeleted(target)))
                    {
                        this.jaunt_reappear(animation, target);
                    }
                    Task13.Sleep(5);
                    GlobalFuncs.qdel(animation);
                    GlobalFuncs.qdel(holder);

                    if (!Lang13.Bool(GlobalFuncs.qdeleted(target)))
                    {
                        if (mobloc.density)
                        {
                            foreach (dynamic _a in Lang13.Enumerate(new ByTable(new object [] { 1, 2, 4, 8, 5, 6, 9, 10 })))
                            {
                                direction = _a;

                                T = Map13.GetStep(mobloc, Convert.ToInt32(direction));

                                if (T != null)
                                {
                                    if (target.Move(T))
                                    {
                                        break;
                                    }
                                }
                            }
                        }
                        target.canmove = true;
                    }
                    return;
                }));
            }
            return(false);
        }
示例#7
0
 // Function from file: ethereal_jaunt.dm
 public virtual void jaunt_disappear(Dynamic_Overlay animation = null, Mob_Living target = null)
 {
     animation.icon_state = "liquify";
     Icon13.Flick("liquify", animation);
     return;
 }
示例#8
0
 // Function from file: ethereal_jaunt.dm
 public virtual void jaunt_reappear(Dynamic_Overlay animation = null, Mob_Living target = null)
 {
     Icon13.Flick("reappear", animation);
     return;
 }
示例#9
0
 // Function from file: death.dm
 public override void gib_animation(Dynamic_Overlay animate = null, string flick_name = null)
 {
     base.gib_animation(animate, "gibbed-a");
     return;
 }
示例#10
0
 // Function from file: death.dm
 public override void dust_animation(Dynamic_Overlay animate = null, string flick_name = null)
 {
     base.dust_animation(animate, "dust-a");
     return;
 }
        // Function from file: chronosuit.dm
        public void chronowalk(Obj_Effect_ChronosCam location = null)
        {
            Ent_Static user          = null;
            dynamic    from_turf     = null;
            dynamic    to_turf       = null;
            double     distance      = 0;
            double     phase_in_ds   = 0;
            ByTable    nonsafe_slots = null;
            dynamic    slot          = null;
            dynamic    slot_item     = null;

            user = this.loc;

            if (this.activated && !this.teleporting && user != null && user is Mob_Living_Carbon_Human && location != null && user.loc != null && location.loc != null && ((dynamic)user).wear_suit == this && Lang13.Bool(((dynamic)user).stat) == false)
            {
                this.teleporting = true;
                from_turf        = GlobalFuncs.get_turf(user);
                to_turf          = GlobalFuncs.get_turf(location);
                distance         = GlobalFuncs.cheap_hypotenuse(Convert.ToInt32(from_turf.x), Convert.ToInt32(from_turf.y), Convert.ToInt32(to_turf.x), Convert.ToInt32(to_turf.y));
                phase_in_ds      = distance * 2;

                if (this.camera != null)
                {
                    this.camera.remove_target_ui();
                }

                if (this.teleport_now.button != null)
                {
                    this.teleport_now.button.UpdateIcon();
                }
                nonsafe_slots = new ByTable(new object [] { 6, 1, 4, 5 });

                foreach (dynamic _a in Lang13.Enumerate(nonsafe_slots))
                {
                    slot = _a;

                    slot_item = ((Mob)user).get_item_by_slot(slot);

                    if (Lang13.Bool(slot_item) && !this.chronosafe_items.Contains(slot_item.type) && ((Mob)user).unEquip(slot_item))
                    {
                        ((dynamic)user).WriteMsg("<span class='notice'>Your " + slot_item.name + " got left behind.</span>");
                    }
                }
                ((dynamic)user).ExtinguishMob();

                if (Lang13.Bool(((dynamic)user).buckled))
                {
                    ((Ent_Dynamic)((dynamic)user).buckled).unbuckle_mob();
                }
                this.phase_underlay      = this.create_phase_underlay(user);
                this.hands_nodrop_states = 0;

                if (Lang13.Bool(((dynamic)user).l_hand))
                {
                    this.hands_nodrop_states     |= (Lang13.Bool(((dynamic)user).l_hand.flags & 2) ? true : false) ?1:0;
                    ((dynamic)user).l_hand.flags |= 2;
                }

                if (Lang13.Bool(((dynamic)user).r_hand))
                {
                    this.hands_nodrop_states     |= (Lang13.Bool(((dynamic)user).r_hand.flags & 2) ? 2 : 0);
                    ((dynamic)user).r_hand.flags |= 2;
                }
                ((dynamic)user).animate_movement = 0;
                ((dynamic)user).changeNext_move(phase_in_ds + 8);
                ((dynamic)user).notransform = 1;
                ((dynamic)user).anchored    = 1;
                ((dynamic)user).Stun(Double.PositiveInfinity);
                Icon13.Animate(new ByTable().Set(1, user).Set("color", "#00ccee").Set("time", 3));
                Task13.Schedule(3, (Task13.Closure)(() => {
                    if (this.teleporting && this.activated && user != null && this.phase_underlay != null && !Lang13.Bool(GlobalFuncs.qdeleted(this.phase_underlay)))
                    {
                        Icon13.Animate(new ByTable().Set(1, user).Set("alpha", 0).Set("time", 2));
                        Icon13.Animate(new ByTable().Set(1, this.phase_underlay).Set("alpha", 255).Set("time", 2));
                        Task13.Sleep(2);

                        if (this.teleporting && this.activated && user != null && this.phase_underlay != null && !Lang13.Bool(GlobalFuncs.qdeleted(this.phase_underlay)))
                        {
                            this.phase_underlay.loc = to_turf;
                            user.loc = to_turf;
                            Icon13.Animate(new ByTable().Set(1, user).Set("alpha", 255).Set("time", phase_in_ds));
                            Icon13.Animate(new ByTable().Set(1, this.phase_underlay).Set("alpha", 0).Set("time", phase_in_ds));
                            Task13.Sleep(((int)(phase_in_ds)));

                            if (this.teleporting && this.activated && this.phase_underlay != null && !Lang13.Bool(GlobalFuncs.qdeleted(this.phase_underlay)))
                            {
                                Icon13.Animate(new ByTable().Set(1, user).Set("color", "#ffffff").Set("time", 3));
                                Task13.Sleep(3);
                            }
                        }
                    }

                    if (this.teleporting && user != null && !Lang13.Bool(GlobalFuncs.qdeleted(user)))
                    {
                        user.loc = to_turf;
                        this.finish_chronowalk();
                    }
                    return;
                }));
            }
            return;
        }