Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (gameObject1 != this.ParentObject)
- {
- GameObject gameObject2 = gameObject1.DeepCopy(false);
- gameObject2.RemovePart("GivesRep");
- (gameObject2.GetPart("Inventory") as Inventory).Objects.Clear();
- if (gameObject2.ApplyEffect((Effect)new Metamorphed(this.ParentObject, 1)))
- {
- GameObject body = XRLCore.Core.Game.Player.Body;
- Mutations playerMutations = XRLCore.Core.Game.Player.Body.GetPart<Mutations>();
- Skills playerSkills = XRLCore.Core.Game.Player.Body.GetPart<Skills>();
- Talents playerTalents = XRLCore.Core.Game.Player.Body.GetPart<Talents>();
- XRLCore.Core.Game.Player.Body = gameObject2;
- gameObject2.RemovePart<Mutations>();
- gameObject2.RemovePart<Skills>();
- gameObject2.RemovePart<Talents>();
- gameObject2.RemovePart<Skills>();
- gameObject2.AddPart(playerMutations);
- gameObject2.AddPart(playerSkills);
- gameObject2.AddPart(playerTalents);
- gameObject2.AddPart(playerSkills);
- // Metamorphosis.ClearInventory(gameObject2);
- // Metamorphosis.TransferMental(body, gameObject2);
- // Metamorphosis.TransferInventory(body, gameObject2, true);
- MessageQueue.AddPlayerMessage("&GYou transfasdfasdsafform into " + gameObject1.DisplayName + "!");
- XRLCore.Core.Game.ActionManager.RemoveActiveObject(body);
- XRLCore.Core.Game.ActionManager.AddActiveObject(gameObject2);
- Cell currentCell = body.pPhysics.CurrentCell;
- currentCell.RemoveObject(body);
- currentCell.AddObject(gameObject2);
- }
- this.ActivatedAbility.Cooldown = 1 - 250 * this.Level;
- this.UseEnergy(1000, "Physical Mutation");
- return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement