// Function from file: mint.dm
        public void create_coins(Type P = null)
        {
            Tile    T = null;
            dynamic O = null;
            dynamic M = null;

            T = Map13.GetStep(this, this.output_dir);

            if (T != null)
            {
                O = Lang13.Call(P, this);
                M = Lang13.FindIn(typeof(Obj_Item_Weapon_Moneybag), T);

                if (!Lang13.Bool(M))
                {
                    M = new Obj_Item_Weapon_Moneybag(this);
                    this.unload_mineral(M);
                }
                O.loc = M;
            }
            return;
        }
示例#2
0
        // Function from file: Academy.dm
        public void effect(dynamic user = null, int roll = 0)
        {
            dynamic      direction    = null;
            dynamic      T            = null;
            Obj_Item     I            = null;
            Species      S            = null;
            dynamic      throw_dir    = null;
            dynamic      throw_target = null;
            Disease_Cold D            = null;
            Obj_Item_Weapon_ReagentContainers_Food_Snacks_Cookie C = null;
            dynamic Start              = null;
            dynamic direction2         = null;
            Tile    T2                 = null;
            Obj_Item_Weapon_Moneybag M = null;
            double i = 0;
            Mob_Living_Carbon_Human H = null;
            Mind      servant_mind    = null;
            Objective O          = null;
            ByTable   candidates = null;
            dynamic   chosen     = null;
            Obj_Effect_ProcHolder_Spell_Targeted_Summonmob S2 = null;
            Species S3 = null;

            this.used = true;
            this.visible_message("<span class='userdanger'>The die flare briefly.</span>");

            switch ((int)(roll))
            {
            case 1:
                ((Mob)user).dust();
                break;

            case 2:
                ((Mob)user).death();
                break;

            case 3:

                foreach (dynamic _a in Lang13.Enumerate(GlobalVars.alldirs))
                {
                    direction = _a;

                    T = GlobalFuncs.get_turf(this);
                    new Mob_Living_SimpleAnimal_Hostile_Creature(Map13.GetStep(T, Convert.ToInt32(direction)));
                }
                break;

            case 4:

                foreach (dynamic _b in Lang13.Enumerate(user, typeof(Obj_Item)))
                {
                    I = _b;


                    if (I is Obj_Item_Weapon_Implant)
                    {
                        continue;
                    }
                    GlobalFuncs.qdel(I);
                }
                break;

            case 5:
                ((Mob_Living_Carbon)user).monkeyize();
                break;

            case 6:
                S           = user.dna.species;
                S.speedmod += 1;
                break;

            case 7:
                ((Mob)user).Stun(3);
                ((Mob_Living)user).adjustBruteLoss(50);
                throw_dir    = Rand13.PickFromTable(GlobalVars.cardinal);
                throw_target = GlobalFuncs.get_edge_target_turf(user, throw_dir);
                ((Ent_Dynamic)user).throw_at(throw_target, 200, 4);
                break;

            case 8:
                GlobalFuncs.explosion(this.loc, -1, 0, 2, null, null, null, 2);
                break;

            case 9:
                D = new Disease_Cold();
                ((Mob)user).ForceContractDisease(D);
                break;

            case 10:
                this.visible_message("<span class='notice'>" + this + " roll perfectly.</span>");
                break;

            case 11:
                C      = new Obj_Item_Weapon_ReagentContainers_Food_Snacks_Cookie(GlobalFuncs.get_turf(this));
                C.name = "Cookie of Fate";
                break;

            case 12:
                user.revive();
                break;

            case 13:
                Start = GlobalFuncs.get_turf(this);

                foreach (dynamic _d in Lang13.Enumerate(GlobalVars.alldirs))
                {
                    direction2 = _d;

                    T2 = Map13.GetStep(Start, Convert.ToInt32(direction2));

                    if (Rand13.Int(0, 1) != 0)
                    {
                        new Obj_Item_Stack_Spacecash_C1000(T2);
                    }
                    else
                    {
                        M = new Obj_Item_Weapon_Moneybag(T2);

                        foreach (dynamic _c in Lang13.IterateRange(1, Rand13.Int(5, 50)))
                        {
                            i = _c;

                            new Obj_Item_Weapon_Coin_Gold(M);
                        }
                    }
                }
                break;

            case 14:
                new Obj_Item_Weapon_Gun_Projectile_Revolver_Mateba(GlobalFuncs.get_turf(this));
                break;

            case 15:
                new Obj_Item_Weapon_Spellbook_Oneuse_Random(GlobalFuncs.get_turf(this));
                break;

            case 16:
                H = new Mob_Living_Carbon_Human(GlobalFuncs.get_turf(this));
                H.equipOutfit(typeof(Outfit_Butler));
                servant_mind = new Mind();
                O            = new Objective("Serve " + user.real_name + ".");
                servant_mind.objectives.Add(O);
                servant_mind.transfer_to(H);
                candidates = GlobalFuncs.pollCandidates("Do you want to play as " + user.real_name + " Servant?", "wizard");
                chosen     = null;

                if (candidates.len != 0)
                {
                    chosen = Rand13.PickFromTable(candidates);
                    GlobalFuncs.message_admins("" + GlobalFuncs.key_name_admin(chosen) + " was spawned as Dice Servant");
                    H.key = chosen.key;
                }
                S2            = new Obj_Effect_ProcHolder_Spell_Targeted_Summonmob();
                S2.target_mob = H;
                user.mind.AddSpell(S2);
                break;

            case 17:
                new Obj_Item_Weapon_Storage_Box_Syndicate(GlobalFuncs.get_turf(this));
                break;

            case 18:
                new Obj_Item_Weapon_Card_Id_CaptainsSpare(GlobalFuncs.get_turf(this));
                break;

            case 19:
                user.WriteMsg("<span class='notice'>You feel robust.</span>");
                S3           = user.dna.species;
                S3.brutemod *= 0.5;
                S3.burnmod  *= 0.5;
                S3.coldmod  *= 0.5;
                break;

            case 20:
                ((Mind)user.mind).make_Wizard();
                break;
            }
            return;
        }