public override int use(PlayerBase user, WorldBase world, Vector2 location, GameTime time, BinaryInputManager inputManager)
        {
            PlayerCondor condor = new PlayerCondor(user.location, world, (Player)user);

            world.transformPlayer(condor);
            return(base.use(user, world, location, time, inputManager));
        }
        public override int use(PlayerBase user, WorldBase world, Vector2 location, GameTime time, BinaryInputManager inputManager)
        {
            PlayerCrocodile crocodile = new PlayerCrocodile(user.location, world, (Player)user);

            world.transformPlayer(crocodile);
            //Item_Bite
            return(base.use(user, world, location, time, inputManager));
        }
Esempio n. 3
0
        public override void onUse(WorldBase world, Item harvestTool, Vector2 location, TileType tileType, Entity user)
        {
            base.onUse(world, harvestTool, location, tileType, user);

            if (user is Player)
            {
                PlayerCrocodile crocodile = new PlayerCrocodile(user.location, world, (Player)user);
                world.transformPlayer(crocodile);
            }
        }
Esempio n. 4
0
        public override int use(PlayerBase user, WorldBase world, Vector2 location, GameTime time, BinaryInputManager inputManager)
        {
            if (user is Player)
            {
                if (world.getBlock(user.location) != null)
                {
                    if (world.getBlock(user.location).tags.Contains(TagReferencer.TotemRabbit) && user.inventory.getItemOfType(new Item_Totem_Rabbit(1)) == null)
                    {
                        user.inventory.add(new Item_Totem_Rabbit(1));
                        replaceKeyedItem(user, new Item_Totem_Rabbit(1));
                        return(1);
                    }
                    else if (world.getBlock(user.location).tags.Contains(TagReferencer.TotemTaipir) && user.inventory.getItemOfType(new Item_Totem_Tapir(1)) == null)
                    {
                        user.inventory.add(new Item_Totem_Tapir(1));
                        replaceKeyedItem(user, new Item_Totem_Tapir(1));
                        return(1);
                    }
                    else if (world.getBlock(user.location).tags.Contains(TagReferencer.TotemCrocodile) && user.inventory.getItemOfType(new Item_Totem_Crocodile(1)) == null)
                    {
                        user.inventory.add(new Item_Totem_Crocodile(1));
                        replaceKeyedItem(user, new Item_Totem_Crocodile(1));
                        return(1);
                    }
                    else if (world.getBlock(user.location).tags.Contains(TagReferencer.TotemCondor) && user.inventory.getItemOfType(new Item_Totem_Condor(1)) == null)
                    {
                        user.inventory.add(new Item_Totem_Condor(1));
                        replaceKeyedItem(user, new Item_Totem_Condor(1));
                        return(1);
                    }
                    else if (world.getBlock(user.location).tags.Contains(TagReferencer.TotemFalcon) && user.inventory.getItemOfType(new Item_Totem_Falcon(1)) == null)
                    {
                        user.inventory.add(new Item_Totem_Falcon(1));
                        replaceKeyedItem(user, new Item_Totem_Falcon(1));
                        return(1);
                    }
                    else
                    {
                        return(0);
                    }
                }
            }
            else if (user is TransformedPlayer)
            {
                world.transformPlayer(((TransformedPlayer)user).transformedFrom);
                return(0);
            }

            return(0);
        }
Esempio n. 5
0
        public override void onUse(WorldBase world, Item harvestTool, Vector2 location, TileType tileType, Entity user)
        {
            base.onUse(world, harvestTool, location, tileType, user);

            if (user is Player)
            {
                PlayerTaipir taipir = new PlayerTaipir(user.location, world, (Player)user);
                world.transformPlayer(taipir);
                usedTapir = true;

                if (usedTapir && TotemRabbit.usedRabbit)
                {
                    if (MetaData.unlockCharacter(2))
                    {
                        MetaData.playUnlockCharacterAlert(2, world, world.player.location);
                    }
                }
            }
        }