示例#1
0
        public static ProceduralStaff DropStaff(Mod mod, Vector2 position, Staff staffStaff, StaffGem staffGem, StaffOrnament staffOrnament, float dps,
                                                int enemyDef)
        {
            int             id    = Item.NewItem(position, mod.GetItem("ProceduralStaff").item.type);
            ProceduralStaff staff = (ProceduralStaff)Main.item[id].modItem;

            staff.Staff    = staffStaff;
            staff.Gem      = staffGem;
            staff.Ornament = staffOrnament;
            staff.Dps      = dps;
            staff.EnemyDef = enemyDef;
            staff.Initialize();
            StaffInitPacket.Write(id, staffStaff.Type, staffGem.Type, staffOrnament.Type, dps, enemyDef);
            return(staff);
        }
示例#2
0
        public static Item GenerateStaff(Mod mod, Vector2 position, StaffTheme theme, float dps, int enemyDef)
        {
            ProceduralStaff staff = DropStaff(mod, position, Staff.RandomStaff(theme), StaffGem.RandomGem(theme),
                                              Main.rand.Next(3) < 2 ? StaffOrnament.RandomOrnament(theme) : StaffOrnament.None, dps, enemyDef);

            return(staff.item);
        }
示例#3
0
        public static void Initialize()
        {
            Gems = new Dictionary <int, StaffGem>();

            Ruby = new StaffGem("Ruby", 0, 6, "Ruby Staff", ProjectileID.RubyBolt).SetEleDamage(new Dictionary <Element, float>
            {
                { Element.Fire, 0.3f }, { Element.Cold, 0f }, { Element.Lightning, 0f }, { Element.Shadow, 0f }
            });
            Diamond      = new StaffGem("Diamond", 1, 5, "Diamond Staff", ProjectileID.DiamondBolt, false, 0.9f);
            Emerald      = new StaffGem("Emerald", 1, 4, "Emerald Staff", ProjectileID.EmeraldBolt, true);
            Amber        = new StaffGem("Amber", 1, 5, "Amber Staff", ProjectileID.AmberBolt);
            Sapphire     = new StaffGem("Sapphire", 2, 5, "Sapphire Staff", ProjectileID.SapphireBolt, false, 0.9f, 1.1f, 1.1f, 1f);
            Amethyst     = new StaffGem("BrightAmethyst", 2, 7, "Mana Scepter", ProjectileID.DiamondBolt);
            AmethystDark = new StaffGem("DarkAmethyst", 2, 7, "Dungeon Scepter", ProjectileID.AmethystBolt, false, 1.1f, 1.2f, 1.1f).SetEleDamage(
                new Dictionary <Element, float> {
                { Element.Fire, 0f }, { Element.Cold, 0f }, { Element.Lightning, 0f }, { Element.Shadow, 0.2f }
            });
            AmberLarge  = new StaffGem("LargeAmber", 2, 7, "Runic Scepter", ProjectileID.AmberBolt);
            CrystalDark = new StaffGem("DarkCrystal", 2, 7, "Shadow Scepter", 0, false, 1.1f, 1.1f, 1.2f)
                          .SetEleDamage(new Dictionary <Element, float> {
                { Element.Fire, 0f }, { Element.Cold, 0f }, { Element.Lightning, 0f }, { Element.Shadow, 0.2f }
            })
                          .SetProjectile(delegate(Player player, Item item) { SpellEffect(player, item, 1, new Cross_Violet(), 1f); });
            CrystalGreen = new StaffGem("GreenCrystal", 2, 7, "Crystal Scepter", ProjectileID.EmeraldBolt, false, 1f, 1f, 1.4f, 2f, 5);
            Fire         = new StaffGem("FireCrystal", 2, 7, "Flame Scepter", ProjectileID.BallofFire, false, 1f, 1.2f, 0.9f, 1f, 5).SetEleDamage(
                new Dictionary <Element, float> {
                { Element.Fire, 0.5f }, { Element.Cold, 0f }, { Element.Lightning, 0f }, { Element.Shadow, 0f }
            });
            FireOrb = new StaffGem("FireOrb", 2, 7, "Immolation Scepter", ProjectileID.InfernoFriendlyBolt, false, 1.2f, 0.6f, 1.2f, 2f).SetEleDamage(
                new Dictionary <Element, float> {
                { Element.Fire, 0.5f }, { Element.Cold, 0f }, { Element.Lightning, 0f }, { Element.Shadow, 0f }
            });
            Shattered = new StaffGem("Shatter", 1, 8, "Lava Staff", 0, false, 1f, 0.65f)
                        .SetEleDamage(new Dictionary <Element, float> {
                { Element.Fire, 0.4f }, { Element.Cold, 0f }, { Element.Lightning, 0f }, { Element.Shadow, 0f }
            })
                        .SetProjectile(delegate(Player player, Item item) { SpellEffect(player, item, 3, new Cross_Red(), 0.8f); });

            GemsByTheme = new Dictionary <StaffTheme, List <StaffGem> >
            {
                {
                    StaffTheme.Wooden, new List <StaffGem>
                    {
                        Ruby,
                        Diamond,
                        Emerald,
                        Amber,
                        Sapphire
                    }
                },
                {
                    StaffTheme.Dungeon, new List <StaffGem>
                    {
                        Amethyst,
                        AmethystDark,
                        AmberLarge,
                        CrystalDark,
                        CrystalGreen
                    }
                },
                { StaffTheme.Underworld, new List <StaffGem> {
                      Fire, FireOrb, Shattered, CrystalDark
                  } }
            };
        }