// Function from file: guardian.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            Mob_Living_SimpleAnimal_Hostile_Guardian G = null;
            ByTable candidates = null;
            dynamic theghost   = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.living_mob_list, typeof(Mob_Living_SimpleAnimal_Hostile_Guardian)))
            {
                G = _a;


                if (G.summoner == user)
                {
                    user.WriteMsg("You already have a " + this.mob_name + "!");
                    return(null);
                }
            }

            if (Lang13.Bool(user.mind) && user.mind.changeling != null)
            {
                user.WriteMsg("" + this.ling_failure);
                return(null);
            }

            if (this.used == GlobalVars.TRUE)
            {
                user.WriteMsg("" + this.used_message);
                return(null);
            }
            this.used = GlobalVars.TRUE;
            user.WriteMsg("" + this.use_message);
            candidates = GlobalFuncs.pollCandidates("Do you want to play as the " + this.mob_name + " of " + user.real_name + "?", "pAI", null, GlobalVars.FALSE, 100);
            theghost   = null;

            if (candidates.len != 0)
            {
                theghost = Rand13.PickFromTable(candidates);
                this.spawn_guardian(user, theghost.key);
            }
            else
            {
                user.WriteMsg("" + this.failure_message);
                this.used = GlobalVars.FALSE;
            }
            return(null);
        }
Exemplo n.º 2
0
        // Function from file: guardian.dm
        public Hud_Guardian(Mob_Living_SimpleAnimal_Hostile_Guardian owner = null) : base(owner)
        {
            Obj_Screen_Guardian _using = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            this.healths = new Obj_Screen_Healths_Guardian();
            this.infodisplay.Add(this.healths);
            _using            = new Obj_Screen_Guardian_Manifest();
            _using.screen_loc = "CENTER:-16,SOUTH:5";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Guardian_Recall();
            _using.screen_loc = "CENTER: 16,SOUTH:5";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Guardian_ToggleMode();
            _using.screen_loc = "CENTER+1:18,SOUTH:5";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Guardian_ToggleLight();
            _using.screen_loc = "WEST:6,SOUTH:5";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Guardian_Communicate();
            _using.screen_loc = "CENTER-2:14,SOUTH:5";
            this.static_inventory.Add(_using);
            return;
        }