Пример #1
0
        public override void ApplyModification(GameObject Object)
        {
            Object.Statistics["Energy"]    = new Statistic("Energy", -100000, 100000, 0, Object);
            Object.Statistics["Speed"]     = new Statistic("Speed", 1, 100000, 100, Object);
            Object.Statistics["MoveSpeed"] = new Statistic("MoveSpeed", -200, 200, 100, Object);
            Object.Statistics["Hitpoints"] = new Statistic("Hitpoints", 0, 64000, 16, Object);
            Object.Statistics["AV"]        = new Statistic("AV", 0, 100, 0, Object);
            Object.Statistics["DV"]        = new Statistic("DV", -100, 100, 0, Object);


            Object.Statistics["Agility"]      = new Statistic("Agility", 1, 9000, 16, Object);
            Object.Statistics["Strength"]     = new Statistic("Strength", 1, 9000, 16, Object);
            Object.Statistics["Toughness"]    = new Statistic("Toughness", 1, 9000, 16, Object);
            Object.Statistics["Wisdom"]       = new Statistic("Wisdom", 1, 9000, 16, Object);
            Object.Statistics["Ego"]          = new Statistic("Ego", 1, 9000, 16, Object);
            Object.Statistics["Intelligence"] = new Statistic("Intelligence", 1, 9000, 16, Object);

            Object.Statistics["SP"] = new Statistic("SP", 0, 2147483647, 0, Object);
            Object.Statistics["MP"] = new Statistic("MP", 0, 2147483647, 0, Object);
            Object.Statistics["AP"] = new Statistic("AP", 0, 2147483647, 0, Object);
            Object.Statistics["MA"] = new Statistic("MA", -100, 2147483647, 0, Object);

            Object.Statistics["Level"] = new Statistic("Level", 1, 10000, 1, Object);

            Object.Statistics["XP"]                   = new Statistic("XP", 0, 2147483647, 0, Object);
            Object.Statistics["XPValue"]              = new Statistic("XPValue", 0, 2147483647, 0, Object);
            Object.Statistics["HeatResistance"]       = new Statistic("HeatResistance", -100, 100, 0, Object);
            Object.Statistics["ColdResistance"]       = new Statistic("ColdResistance", -100, 100, 0, Object);
            Object.Statistics["ElectricalResistance"] = new Statistic("ElectricalResistance", -100, 100, 0, Object);
            Object.Statistics["AcidResistance"]       = new Statistic("AcidResistance", -100, 100, 0, Object);

            acegiak_Zombable zomb    = Object.GetPart <acegiak_Zombable>();
            Body             newBody = new Body();

            newBody._Body = acegiak_Zombable.BodyPartCopy(zomb.Body._Body, Object, newBody);
            Object.AddPart(newBody);

            Brain newBrain = new Brain();

            Object.AddPart(newBrain);
            Object.AddPart(new ConversationScript("acegiak_Zomber"));
            Object.AddPart(new Inventory());
            Object.AddPart(new Leveler());
            Object.AddPart(new Experience());
            Object.AddPart(new Mutations());
            Object.AddPart(new Skills());
            Object.AddPart(new ActivatedAbilities());
            Object.AddPart(new RandomLoot());



            Object.GetPart <Render>().Tile        = zomb.storedTile;
            Object.GetPart <Render>().TileColor   = "y";
            Object.GetPart <Render>().DetailColor = "r";
        }
Пример #2
0
        public void Zombablify()
        {
            //IPart.AddPlayerMessage("Attempt zombify");
            Corpse CorpsePart = ParentObject.GetPart <Corpse>();

            if (CorpsePart == null)
            {
                //IPart.AddPlayerMessage("No Corpse!");
                return;
            }

            Body part = ParentObject.GetPart <Body>();

            if (part == null)
            {
                //IPart.AddPlayerMessage("No Body!");
                return;
            }

            GameObject gameObject = null;

            if (CorpsePart.CorpseObject != null)
            {
                gameObject = CorpsePart.CorpseObject;
            }
            else if (ParentObject.pPhysics.LastDamagedByType == "Fire")
            {
                if (CorpsePart.BurntCorpseChance > 0 && (string.IsNullOrEmpty(CorpsePart.BurntCorpseRequiresBodyPart) || (part != null && part.GetFirstPart(CorpsePart.BurntCorpseRequiresBodyPart) != null)) && (CorpsePart.BurntCorpseChance >= 100 || Stat.Random(1, 100) <= CorpsePart.BurntCorpseChance))
                {
                    gameObject = GameObject.createUnmodded(CorpsePart.BurntCorpseBlueprint);
                }
            }
            else if (ParentObject.pPhysics.LastDamagedByType == "Vaporized")
            {
                if (CorpsePart.VaporizedCorpseChance > 0 && (string.IsNullOrEmpty(CorpsePart.VaporizedCorpseRequiresBodyPart) || (part != null && part.GetFirstPart(CorpsePart.VaporizedCorpseRequiresBodyPart) != null)) && (CorpsePart.VaporizedCorpseChance >= 100 || Stat.Random(1, 100) <= CorpsePart.VaporizedCorpseChance))
                {
                    gameObject = GameObject.createUnmodded(CorpsePart.VaporizedCorpseBlueprint);
                }
            }
            else if (CorpsePart.CorpseChance > 0 && (string.IsNullOrEmpty(CorpsePart.CorpseRequiresBodyPart) || (part != null && part.GetFirstPart(CorpsePart.CorpseRequiresBodyPart) != null)) && (CorpsePart.CorpseChance >= 100 || Stat.Random(1, 100) <= CorpsePart.CorpseChance))
            {
                gameObject = GameObject.createUnmodded(CorpsePart.CorpseBlueprint);
            }
            if (gameObject == null)
            {
                CorpsePart.CorpseChance          = 0;
                CorpsePart.VaporizedCorpseChance = 0;
                CorpsePart.BurntCorpseChance     = 0;
            }
            if (part != null && gameObject != null)
            {
                acegiak_Zombable zombieparts = new acegiak_Zombable();
                zombieparts.Body = new Body();
                ParentObject.DeepCopyInventoryObjectMap = new Dictionary <GameObject, GameObject>();
                zombieparts.Body._Body = BodyPartCopy(part._Body, ParentObject, zombieparts.Body);
                if (zombieparts.Body._Body == null)
                {
                    return;
                }
                zombieparts.storedTile = ParentObject.pRender.Tile;
                gameObject.AddPart(zombieparts);
                CorpsePart.CorpseObject = gameObject;
                //IPart.AddPlayerMessage("Zombified!");
            }
            //IPart.AddPlayerMessage("Done!");
        }