本文整理汇总了C#中Server.Items.LockableContainer.DropItem方法的典型用法代码示例。如果您正苦于以下问题:C# LockableContainer.DropItem方法的具体用法?C# LockableContainer.DropItem怎么用?C# LockableContainer.DropItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.LockableContainer
的用法示例。
在下文中一共展示了LockableContainer.DropItem方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Fill
public static void Fill( LockableContainer cont )
{
// Gold, about 100K
for (int ix=0; ix < 100; ix++)
cont.DropItem( new Gold( Utility.RandomMinMax( 900, 1100 ) ) );
// plus about 20 chances for magic jewelry and/or clothing
for (int ix=0; ix < 20; ix++)
{
PackMagicItem( cont, 3, 3, 0.20 );
PackMagicItem( cont, 3, 3, 0.10 );
PackMagicItem( cont, 3, 3, 0.05 );
}
// drop some scrolls and weapons/armor
for ( int ix = 0; ix < 25; ++ix )
{
int level = 5;
Item item;
item = Loot.RandomArmorOrShieldOrWeapon();
item = Loot.ImbueWeaponOrArmor (item, level, 0.05, false);
// erl: SDrop chance
// ..
if( Server.Engines.SDrop.SDropTest( item, CoreAI.EScrollChance ) )
{
// Drop a scroll instead
EnchantedScroll escroll = Loot.GenEScroll((object) item);
// Delete the original item
item.Delete();
// Re-reference item to escroll and continue
item = (Item) escroll;
}
// ..
cont.DropItem( item );
}
// drop a few nice maps
for (int ix=0; ix < 5; ix++)
{
TreasureMap map = new TreasureMap (5, Map.Felucca);
cont.DropItem( map );
}
// drop a few single-color leather dye tubs with 100 charges
for (int ix=0; ix < 25; ix++)
{
LeatherArmorDyeTub tub = new LeatherArmorDyeTub ();
cont.DropItem( tub );
}
// pack some other goodies
TreasureMapChest.PackRegs(cont, 300);
TreasureMapChest.PackGems(cont, 300);
}
示例2: PackMagicItem
public static void PackMagicItem( LockableContainer cont, int minLevel, int maxLevel, double chance )
{
if (chance <= Utility.RandomDouble())
return;
Item item = Loot.RandomClothingOrJewelry();
if ( item == null )
return;
if ( item is BaseClothing )
((BaseClothing)item).SetRandomMagicEffect( minLevel, maxLevel );
else if ( item is BaseJewel )
((BaseJewel)item).SetRandomMagicEffect( minLevel, maxLevel );
cont.DropItem( item );
}
示例3: Fill
public static void Fill( LockableContainer cont, int level )
{
cont.Movable = false;
cont.TrapEnabled = false;
cont.Locked = false;
int bandies = CoreAI.SpiritDepotBandies;
int ghpots = CoreAI.SpiritDepotGHPots;
int regs = CoreAI.SpiritDepotReagents;
int trpots = CoreAI.SpiritDepotTRPots;
Item item = null;
// add a couple lesser explosion potions
// these are for batteling hiders in the cave and not for damage
for( int ix=0; ix < 2; ix++ )
{
item = new LesserExplosionPotion();
cont.DropItem(item);
}
// add bandages
item = new Bandage(bandies);
cont.DropItem(item);
// add greater heal potions
for( int ix=0; ix < ghpots; ix++ )
{
item = new GreaterHealPotion();
cont.DropItem(item);
}
// add total refresh potions
for( int ix=0; ix < trpots; ix++ )
{
item = new TotalRefreshPotion();
cont.DropItem(item);
}
// drop reagents
cont.DropItem( new BagOfReagents( regs ) );
// drop res scroll
cont.DropItem( new ResurrectionScroll() );
return;
}
示例4: Fill
public static void Fill(LockableContainer cont, int luck, int level, bool isSos)
{
// Apply Felucca luck bonus
if (cont.Map == Map.Felucca)
luck += Mobiles.RandomItemGenerator.FeluccaLuckBonus;
cont.Movable = false;
cont.Locked = true;
int numberItems;
if (level == 0)
{
cont.LockLevel = 0; // Can't be unlocked
cont.DropItem(new Gold(Utility.RandomMinMax(50, 100)));
if (Utility.RandomDouble() < 0.75)
cont.DropItem(new TreasureMap(0, Map.Trammel));
}
else
{
cont.TrapType = TrapType.ExplosionTrap;
cont.TrapPower = level * 25;
cont.TrapLevel = level;
switch (level)
{
case 1:
cont.RequiredSkill = 5;
break;
case 2:
cont.RequiredSkill = 45;
break;
case 3:
cont.RequiredSkill = 65;
break;
case 4:
cont.RequiredSkill = 75;
break;
case 5:
cont.RequiredSkill = 75;
break;
case 6:
cont.RequiredSkill = 80;
break;
case 7:
cont.RequiredSkill = 80;
break;
}
cont.LockLevel = cont.RequiredSkill - 10;
cont.MaxLockLevel = cont.RequiredSkill + 40;
cont.DropItem(new Gold(level * 5000));
for (int i = 0; i < level * 5; ++i)
cont.DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular));
double propsScale = 1.0;
if (Core.SE)
{
switch (level)
{
case 1:
numberItems = 32;
propsScale = 0.5625;
break;
case 2:
numberItems = 40;
propsScale = 0.6875;
break;
case 3:
numberItems = 48;
propsScale = 0.875;
break;
case 4:
numberItems = 56;
break;
case 5:
numberItems = 64;
break;
case 6:
numberItems = 72;
break;
case 7:
numberItems = 80;
break;
default:
numberItems = 0;
break;
}
}
else
numberItems = level * 6;
for (int i = 0; i < numberItems; ++i)
{
Item item;
if (Core.AOS)
//.........这里部分代码省略.........
示例5: Fill
public static void Fill( LockableContainer cont, int level )
{
cont.Movable = false;
cont.Locked = true;
if ( level == 0 )
{
cont.LockLevel = 0; // Can't be unlocked
cont.DropItem( new Gold( Utility.RandomMinMax( 50, 100 ) ) );
}
else
{
cont.TrapType = TrapType.ExplosionTrap;
cont.TrapPower = level * 25;
cont.TrapLevel = level;
switch ( level )
{
case 1: cont.RequiredSkill = 36; break;
case 2: cont.RequiredSkill = 76; break;
case 3: cont.RequiredSkill = 84; break;
case 4: cont.RequiredSkill = 92; break;
case 5: cont.RequiredSkill = 100; break;
case 6: cont.RequiredSkill = 100; break;
}
cont.LockLevel = cont.RequiredSkill - 10;
cont.MaxLockLevel = cont.RequiredSkill + 40;
cont.DropItem( new Gold( level * 3000 ) );
//Adding in a 10% chance for the same level map as your doing to spawn in the chest
if ( 0.1 >= Utility.RandomDouble() && level == 1 )
{
cont.DropItem( new TreasureMap( 1, Map.Felucca ) );
}
else if ( 0.1 >= Utility.RandomDouble() && level == 2 )
{
cont.DropItem( new TreasureMap( 2, Map.Felucca ) );
}
else if ( 0.1 >= Utility.RandomDouble() && level == 3 )
{
cont.DropItem( new TreasureMap( 3, Map.Felucca ) );
}
else if ( 0.1 >= Utility.RandomDouble() && level == 4 )
{
cont.DropItem( new TreasureMap( 4, Map.Felucca ) );
}
else if ( 0.1 >= Utility.RandomDouble() && level == 5 )
{
cont.DropItem( new TreasureMap( 5, Map.Felucca ) );
}
else if ( 0.1 >= Utility.RandomDouble() && level == 6 )
{
cont.DropItem( new TreasureMap( 6, Map.Felucca ) );
}
else
{
}
//end of add
for ( int i = 0; i < level * 5; ++i )
cont.DropItem( Loot.RandomScroll( 0, 63, SpellbookType.Regular ) );
for ( int i = 0; i < level * 6; ++i )
{
Item item;
if ( Core.AOS )
item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();
else
item = Loot.RandomArmorOrShieldOrWeapon();
if ( item is BaseWeapon )
{
BaseWeapon weapon = (BaseWeapon)item;
// if ( Core.AOS )
// {
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( weapon, attributeCount, min, max );
// }
// else
// {
// weapon.DamageLevel = (WeaponDamageLevel)Utility.Random( 6 );
// weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random( 6 );
// weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random( 6 );
// }
cont.DropItem( item );
}
else if ( item is BaseArmor )
{
BaseArmor armor = (BaseArmor)item;
//.........这里部分代码省略.........
示例6: Fill
public static void Fill(LockableContainer cont, int level, Expansion e)
{
cont.Movable = false;
cont.Locked = true;
int numberItems;
if (level == 0)
{
cont.LockLevel = 0; // Can't be unlocked
cont.DropItem(new Gold(Utility.RandomMinMax(25, 50))); // reduced from 50 100
if (Utility.RandomDouble() < 0.75)
{
cont.DropItem(new TreasureMap(0, Map.Felucca));
}
}
else
{
cont.TrapType = TrapType.ExplosionTrap;
cont.TrapPower = level * 25;
cont.TrapLevel = level;
switch (level)
{
case 1:
cont.RequiredSkill = 36;
break;
case 2:
cont.RequiredSkill = 76;
break;
case 3:
cont.RequiredSkill = 84;
break;
case 4:
cont.RequiredSkill = 92;
break;
case 5:
cont.RequiredSkill = 95;
break;
case 6:
cont.RequiredSkill = 95;
break;
}
cont.LockLevel = cont.RequiredSkill - 10;
cont.MaxLockLevel = cont.RequiredSkill + 40;
cont.DropItem(new Gold(level * 1000, level * 2000));
for (int i = 0; i < level * 5; ++i)
{
cont.DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular));
}
if (e >= Expansion.SE)
{
switch (level)
{
case 1:
numberItems = 2;
break;
case 2:
numberItems = 4;
break;
case 3:
numberItems = 7;
break;
case 4:
numberItems = 10;
break;
case 5:
numberItems = 20;
break;
case 6:
numberItems = 30;
break;
default:
numberItems = 0;
break;
}
}
else
{
numberItems = level * 6;
}
for (int i = 0; i < numberItems; ++i)
{
Item item = Loot.RandomArmorOrShieldOrWeapon();
if (item is BaseWeapon)
{
var weapon = (BaseWeapon)item;
int damageLevel = PseudoSeerStone.GetDamageLevel(level);
if (PseudoSeerStone.HighestDamageLevelSpawn < damageLevel)
{
if (damageLevel == 5 && PseudoSeerStone.ReplaceVanqWithSkillScrolls)
//.........这里部分代码省略.........
示例7: Fill
public static void Fill( LockableContainer cont, int level, Map map )
{
cont.Movable = false;
cont.Locked = true;
#region Lock & Trap
cont.TrapType = TrapType.ExplosionTrap;
cont.TrapPower = level * 25;
cont.TrapLevel = level;
cont.TrapEnabled = true;
switch ( level )
{
case 1:
cont.RequiredSkill = 36;
break;
case 2:
cont.RequiredSkill = 76;
break;
case 3:
cont.RequiredSkill = 84;
break;
case 4:
cont.RequiredSkill = 92;
break;
case 5:
cont.RequiredSkill = 100;
break;
case 6:
cont.RequiredSkill = 100;
break;
}
cont.LockLevel = cont.RequiredSkill - 10;
cont.MaxLockLevel = cont.RequiredSkill + 40;
#endregion
#region Gold
cont.DropItem( new Gold( level * 5000 ) );
#endregion
#region Reagents
int reagentStackCount = level + 3;
for ( int i = 0; i < reagentStackCount; i++ )
{
Item item = Loot.RandomPossibleReagent();
item.Amount = Utility.RandomMinMax( 40, 60 );
cont.DropItem( item );
}
#endregion
#region Magic Items
int magicItemCount = 24 + ( 8 * level );
for ( int i = 0; i < magicItemCount; ++i )
{
Item item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();
if ( item is BaseWeapon )
{
BaseWeapon weapon = (BaseWeapon) item;
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( weapon, attributeCount, min, max );
cont.DropItem( item );
}
else if ( item is BaseArmor )
{
BaseArmor armor = (BaseArmor) item;
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( armor, attributeCount, min, max );
cont.DropItem( item );
}
else if ( item is BaseJewel )
{
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( (BaseJewel) item, attributeCount, min, max );
cont.DropItem( item );
}
}
#endregion
#region Gems
//.........这里部分代码省略.........
示例8: Fill
public static void Fill( LockableContainer cont, int level )
{
cont.Movable = false;
cont.TrapType = Utility.RandomBool() ? TrapType.PoisonTrap : TrapType.ExplosionTrap;
cont.TrapPower = level * 25;
cont.Locked = true;
switch ( level )
{
// Adam: add level 0 (trainer chests)
case 0: cont.RequiredSkill = Utility.RandomMinMax (30, 37) ; break;
case 1: cont.RequiredSkill = 36; break;
case 2: cont.RequiredSkill = 76; break;
case 3: cont.RequiredSkill = 84; break;
case 4: cont.RequiredSkill = 92; break;
case 5: cont.RequiredSkill = 100; break;
}
cont.LockLevel = cont.RequiredSkill - 10;
cont.MaxLockLevel = cont.RequiredSkill + 40;
// adam: change treasure map chest loot MIN-MAX so as to decrease daily take home
if (level != 0)
cont.DropItem(
new Gold( Utility.RandomMinMax(
(int)(((double)((level * 1000) / 3)) * .75), // min is 75% of MAX
(level * 1000) / 3 ) ) );
// skin tone creme for level 4 & 5 chests
if (Utility.RandomDouble() < 0.05 && level > 3)
{
cont.DropItem(new SkinHueCreme());
}
// adam: scrolls * 3 and not 5
for ( int i = 0; i < level * 3; ++i )
{
int minCircle = level;
int maxCircle = (level + 3);
PackScroll( cont, minCircle, maxCircle );
}
// plus "level chances" for magic jewelry & clothing
switch (level)
{
case 0: // Adam: trainer chest
case 1: // none
break;
case 2:
PackMagicItem( cont, 1, 1, 0.05 );
break;
case 3:
PackMagicItem( cont, 1, 2, 0.10 );
PackMagicItem( cont, 1, 2, 0.05 );
break;
case 4:
PackMagicItem( cont, 2, 3, 0.10 );
PackMagicItem( cont, 2, 3, 0.05 );
PackMagicItem( cont, 2, 3, 0.02 );
break;
case 5:
PackMagicItem(cont, 3, 3, 0.10);
PackMagicItem(cont, 3, 3, 0.05);
PackMagicItem(cont, 3, 3, 0.02);
break;
}
// TreasureMap( int level, Map map
// 5% chance to get a treasure map
// Changed chance for tmap to 1%
if (level != 0)
if (Utility.RandomDouble() < 0.01)
{
int mlevel = level;
// 20% chance to get a treasure map one level better than the level of this chest
if (Utility.RandomDouble() < 0.20)
mlevel += (level < 5) ? 1 : 0; // bump up the map level by one
TreasureMap map = new TreasureMap (mlevel, Map.Felucca);
cont.DropItem( map ); // drop it baby!
}
// if You're doing a level 3, 4, or 5 chest you have a 1.5%, 2%, or 2.5% chance to get a monster statue
double chance = 0.00 + (((double)level) * 0.005);
if ( (level > 3) && (Utility.RandomDouble() < chance) )
{
int ndx = level - 3;
MonsterStatuette mx =
new MonsterStatuette(m_monsters[ndx][Utility.Random(m_monsters[ndx].Length)]);
mx.LootType = LootType.Regular; // not blessed
cont.DropItem( mx ); // drop it baby!
}
TreasureMapChest.PackRegs(cont, level * 10);
TreasureMapChest.PackGems(cont, level * 5);
}
示例9: AddThemeLoot
private static void AddThemeLoot (LockableContainer cont, int level, ChestThemeType type)
{
MonsterStatuette mx = null;
//switch to add in theme treasures
switch ( type )
{
case ChestThemeType.Solen:
{
//drop are special weapon
QuarterStaff special = new QuarterStaff();
special.Name = "Chitanous Staff";
cont.DropItem(Loot.ImbueWeaponOrArmor(special, 6, 0, true));
//go into dropping normal loot
int onlyonedrop = Utility.RandomMinMax(0,1);
if(onlyonedrop ==0 )cont.DropItem(new Seed(PlantType.Hedge,0,false)); //new solen seed
if(onlyonedrop ==1 )cont.DropItem(new WaterBucket() ); //new waterbucket
if (Utility.RandomDouble() <= 0.30 ) //30% chance to drop a statue
{
int whichone = Utility.RandomMinMax(0,1);
if(whichone == 0)mx = new MonsterStatuette (m_Monster[0]);
if(whichone == 1)mx = new MonsterStatuette (m_Monster[1]);
mx.LootType = LootType.Regular; // not blessed
cont.DropItem( mx ); // drop it baby!
}
break;
}
case ChestThemeType.Brigand:
{
//drop are special weapon
Katana special = new Katana();
special.Name = "Bandit's Blade";
cont.DropItem(Loot.ImbueWeaponOrArmor(special, 6, 0, true));
int onlyonedrop = Utility.RandomMinMax(0,1);
if(onlyonedrop ==0 )cont.DropItem(new Brazier(true)); //new movable brazier
if(onlyonedrop ==1 )cont.DropItem(new DecorativeBow(Utility.RandomMinMax(0,3))); //random decorative bow type
for ( int i = 0; i < level * 5; ++i )
{
cont.DropItem (new PowderOfTranslocation() ); //drop powder of translocation
}
if (Utility.RandomDouble() <= 0.30 ) //30% chance to drop a statue
{
int whichone = Utility.RandomMinMax(0,1);
if(whichone == 0)mx = new MonsterStatuette (m_Monster[2]);
if(whichone == 1)mx = new MonsterStatuette (m_Monster[3]);
mx.LootType = LootType.Regular; // not blessed
cont.DropItem( mx ); // drop it baby!
}
break;
}
case ChestThemeType.Savage:
{
//drop are special weapon
ShortSpear special = new ShortSpear();
special.Name = "Ornate Ritual Spear";
cont.DropItem(Loot.ImbueWeaponOrArmor(special, 6, 0, true));
int rug = Utility.RandomMinMax(0,1);
int onlyonedrop = Utility.RandomMinMax(0,1);
if(onlyonedrop ==0 )cont.DropItem(new SkullPole() ); //new skull pole
if(onlyonedrop ==1 )
{
if(rug == 0) cont.DropItem(new BrownBearRugEastDeed() ); //new rug east
if(rug == 1) cont.DropItem(new BrownBearRugSouthDeed() ); //new rug south
}
if (Utility.RandomDouble() <= .30 ) //30% chance to drop a statue
{
int whichone = Utility.RandomMinMax(0,1);
if(whichone == 0)mx = new MonsterStatuette (m_Monster[4]);
if(whichone == 1)mx = new MonsterStatuette (m_Monster[5]);
mx.LootType = LootType.Regular; // not blessed
cont.DropItem( mx ); // drop it baby!
}
break;
}
case ChestThemeType.Undead:
{
Halberd special = new Halberd();
special.Name = "Soul Reaver";
cont.DropItem(Loot.ImbueWeaponOrArmor(special, 6, 0, true));
int onlyonedrop = Utility.RandomMinMax(0,1);
if(onlyonedrop ==0 )cont.DropItem(new BoneContainer(Utility.RandomMinMax(0,2))); //new bone container 3 differnt types 0-2
int stone = Utility.RandomMinMax(0,3); // get random gravestone type to drop
//.........这里部分代码省略.........
示例10: PackScroll
private static void PackScroll( LockableContainer cont, int circle )
{
int min = (circle - 1) * 8;
cont.DropItem( Loot.RandomScroll( min, min + 7, SpellbookType.Regular ) );
}
示例11: Fill
public static void Fill( LockableContainer cont, int level, bool IsThemed, ChestThemeType type )
{
cont.Movable = false;
// the speial Overland Treasure Hunter NPC 'unlocks' the chest for you!
if (TreasureTheme.IsOverlandTheme(type) == false)
{
cont.TrapType = Utility.RandomBool() ? TrapType.PoisonTrap : TrapType.ExplosionTrap;
cont.TrapPower = level * 25;
cont.Locked = true;
}
switch ( level )
{
case 1: cont.RequiredSkill = 36; break;
case 2: cont.RequiredSkill = 76; break;
case 3: cont.RequiredSkill = 84; break;
case 4: cont.RequiredSkill = 92; break;
case 5: cont.RequiredSkill = 100; break;
}
cont.LockLevel = cont.RequiredSkill - 10;
cont.MaxLockLevel = cont.RequiredSkill + 40;
// add theme loot
AddThemeLoot(cont, level, type);
// now for the gold
cont.DropItem( new Gold( level * 1000 ) );
//if not a undead or pirate chest add scrolls
if(type !=ChestThemeType.Pirate || type != ChestThemeType.Undead)
{
// adam: Changed to drop scrolls appropriatre for the level.
for ( int i = 0; i < level * 5; ++i )
{
int minCircle = level;
int maxCircle = (level + 3);
PackScroll( cont, minCircle, maxCircle );
}
}
// magic armor and weapons
int count = MagicArmsThrottle(level); // calc amount of magic armor and weapons to drop
if (IsThemed == true) count /= 2; // adam: Less loot if a themed chest because they get other goodies.
for ( int i = 0; i < count; ++i )
{
Item item;
item = Loot.RandomArmorOrShieldOrWeapon();
item = Loot.ImbueWeaponOrArmor (item, level, 0.05, false);
// erl: SDrop chance
// ..
if( Server.Engines.SDrop.SDropTest( item, CoreAI.EScrollChance ) )
{
// Drop a scroll instead
EnchantedScroll escroll = Loot.GenEScroll((object) item);
// Delete the original item
item.Delete();
// Re-reference item to escroll and continue
item = (Item) escroll;
}
// ..
cont.DropItem( item );
}
PackRegs(cont, level * 20);
PackGems(cont, level * 10);
}
示例12: Fill
public static void Fill(LockableContainer cont, int level)
{
cont.Movable = false;
cont.Locked = true;
cont.TrapType = TrapType.ExplosionTrap;
cont.TrapPower = level * 25;
switch ( level )
{
case 0: cont.RequiredSkill = 1; break;
case 1: cont.RequiredSkill = 36; break;
case 2: cont.RequiredSkill = 76; break;
case 3: cont.RequiredSkill = 84; break;
case 4: cont.RequiredSkill = 92; break;
case 5: cont.RequiredSkill = 100; break;
}
cont.LockLevel = cont.RequiredSkill - 10;
cont.MaxLockLevel = cont.RequiredSkill + 40;
double maskChance = 0.1 * level;
if ( Utility.RandomDouble() < maskChance )
{
Item mask = null;
switch ( Utility.Random( 4 ) )
{
case 0: mask = new OrcishKinMask(); break;
case 1: mask = new TribalMask(); break;
case 2: mask = new DeerMask(); break;
case 3:
default:mask = new BearMask(); break;
}
cont.DropItem( mask );
}
//int gold = 1000 * level;
//cont.DropItem( new Gold( gold ) );
for ( int i = 0; i < level * 5; ++i )
cont.DropItem( Loot.RandomScroll( 0, 63, SpellbookType.Regular ) );
/*for (int i = 0; i < level * 2; i++)
{
cont.DropItem(new Gold(Utility.RandomMinMax(100, 600)));
// this give magic weapons over 25% of the time with a 15% chance for a vanq even at level 1. That is insane.
Item item = Loot.RandomArmorOrShieldOrWeapon();
if (item is BaseWeapon)
{
BaseWeapon weapon = (BaseWeapon)item;
weapon.DamageLevel = (WeaponDamageLevel)Utility.Random(6);
weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random(6);
weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(6);
cont.DropItem(item);
}
else if (item is BaseArmor)
{
BaseArmor armor = (BaseArmor)item;
armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6);
armor.Durability = (ArmorDurabilityLevel)Utility.Random(6);
cont.DropItem(item);
}
}*/
for ( int i = 0; i < level; ++i )
{
// This is much more sane.
LootPack.OldSuperBoss.Generate( cont );
}
int reagents;
if ( level == 0 )
reagents = 12;
else
reagents = level * 3;
for ( int i = 0; i < reagents; i++ )
{
Item item = Loot.RandomPossibleReagent();
item.Amount = Utility.RandomMinMax( 20, 60 );
cont.DropItem( item );
}
int gems;
if ( level == 0 )
gems = 2;
else
gems = level * 3;
for ( int i = 0; i < gems; i++ )
{
Item item = Loot.RandomGem();
//.........这里部分代码省略.........
示例13: Fill
public static void Fill( LockableContainer cont, int level )
{
cont.Movable = false;
cont.Locked = true;
if( level == 0 )
{
cont.LockLevel = 0; // Can't be unlocked
if( Utility.RandomDouble() < 0.75 )
cont.DropItem( new TreasureMap( 0, Map.Backtrol ) );
}
else
{
cont.TrapType = TrapType.ExplosionTrap;
cont.TrapPower = level * 25;
cont.TrapLevel = level;
switch( level )
{
case 1: cont.RequiredSkill = 36; break;
case 2: cont.RequiredSkill = 76; break;
case 3: cont.RequiredSkill = 84; break;
case 4: cont.RequiredSkill = 92; break;
case 5: cont.RequiredSkill = 100; break;
case 6: cont.RequiredSkill = 100; break;
}
cont.LockLevel = cont.RequiredSkill - 10;
cont.MaxLockLevel = cont.RequiredSkill + 40;
for( int i = 0; i < level * 5; ++i )
cont.DropItem( Loot.RandomScroll( 0, 63, SpellbookType.Regular ) );
for( int i = 0; i < level * 6; ++i )
{
Item item;
if( Core.AOS )
item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();
else
item = Loot.RandomArmorOrShieldOrWeapon();
if( item is BaseWeapon )
{
BaseWeapon weapon = (BaseWeapon)item;
if( Core.SE )
{
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( weapon, attributeCount, min, max );
}
else
{
weapon.DamageLevel = (WeaponDamageLevel)Utility.Random( 6 );
weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random( 6 );
weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random( 6 );
}
cont.DropItem( item );
}
else if( item is BaseArmor )
{
BaseArmor armor = (BaseArmor)item;
if( Core.SE )
{
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( armor, attributeCount, min, max );
}
else
{
armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random( 6 );
armor.Durability = (ArmorDurabilityLevel)Utility.Random( 6 );
}
cont.DropItem( item );
}
else if( item is BaseHat )
{
BaseHat hat = (BaseHat)item;
if( Core.SE )
{
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( hat, attributeCount, min, max );
}
//.........这里部分代码省略.........
示例14: Fill
public static void Fill( LockableContainer cont, int level )
{
cont.Movable = false;
cont.Locked = true;
int numberItems;
if ( level == 0 )
{
cont.LockLevel = 0; // Can't be unlocked
cont.DropItem( new Gold( Utility.RandomMinMax( 50, 100 ) ) );
if ( Utility.RandomDouble() < 0.75 )
cont.DropItem( new TreasureMap( 0, Map.Felucca ) );
}
else
{
cont.TrapType = TrapType.ExplosionTrap;
cont.TrapPower = level * 25;
cont.TrapLevel = level;
switch ( level )
{
case 1: cont.RequiredSkill = 36; break;
case 2: cont.RequiredSkill = 76; break;
case 3: cont.RequiredSkill = 84; break;
case 4: cont.RequiredSkill = 92; break;
case 5: cont.RequiredSkill = 100; break;
case 6: cont.RequiredSkill = 100; break;
}
cont.LockLevel = cont.RequiredSkill - 10;
cont.MaxLockLevel = cont.RequiredSkill + 40;
//Publish 67 gold change
//if ( Core.SA )
// cont.DropItem( new Gold( level * 5000 ) );
//else
cont.DropItem(new Gold(level * 1000));
for ( int i = 0; i < level * 2; ++i )
cont.DropItem( Loot.RandomScroll( 0, 63, SpellbookType.Regular ) );
if ( Core.SE)
{
switch ( level )
{
case 1: numberItems = 5; break;
case 2: numberItems = 10; break;
case 3: numberItems = 15; break;
case 4: numberItems = 38; break;
case 5: numberItems = 50; break;
case 6: numberItems = 60; break;
default: numberItems = 0; break;
};
}
else
numberItems = level * 6;
for ( int i = 0; i < numberItems; ++i )
{
Item item;
if ( Core.AOS )
item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();
else
item = Loot.RandomArmorOrShieldOrWeapon();
if ( item is BaseWeapon )
{
BaseWeapon weapon = (BaseWeapon)item;
if ( Core.AOS )
{
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( weapon, attributeCount, min, max );
}
else
{
weapon.DamageLevel = (WeaponDamageLevel)Utility.Random( 6 );
weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random( 6 );
weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random( 6 );
}
cont.DropItem( item );
}
else if ( item is BaseArmor )
{
BaseArmor armor = (BaseArmor)item;
if ( Core.AOS )
{
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
//.........这里部分代码省略.........
示例15: FillOld
public static void FillOld( LockableContainer cont, int level )
{
cont.Movable = false;
cont.Locked = true;
cont.TrapType = TrapType.ExplosionTrap;
cont.TrapPower = level * 25;
cont.TrapLevel = level;
cont.TrapEnabled = true;
switch ( level )
{
case 1:
cont.RequiredSkill = 36;
break;
case 2:
cont.RequiredSkill = 76;
break;
case 3:
cont.RequiredSkill = 84;
break;
case 4:
cont.RequiredSkill = 92;
break;
case 5:
cont.RequiredSkill = 100;
break;
case 6:
cont.RequiredSkill = 100;
break;
}
cont.LockLevel = cont.RequiredSkill - 10;
cont.MaxLockLevel = cont.RequiredSkill + 40;
cont.DropItem( new Gold( level * 1000 ) );
for ( int i = 0; i < level * 5; ++i )
cont.DropItem( Loot.RandomScroll( 0, 63, SpellbookType.Regular ) );
for ( int i = 0; i < level * 6; ++i )
{
Item item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();
if ( item is BaseWeapon )
{
BaseWeapon weapon = (BaseWeapon) item;
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( weapon, attributeCount, min, max );
cont.DropItem( item );
}
else if ( item is BaseArmor )
{
BaseArmor armor = (BaseArmor) item;
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( armor, attributeCount, min, max );
cont.DropItem( item );
}
else if ( item is BaseJewel )
{
int attributeCount;
int min, max;
GetRandomAOSStats( out attributeCount, out min, out max );
BaseRunicTool.ApplyAttributesTo( (BaseJewel) item, attributeCount, min, max );
cont.DropItem( item );
}
}
int reagents;
if ( level == 0 )
reagents = 12;
else
reagents = level * 3;
for ( int i = 0; i < reagents; i++ )
{
Item item = Loot.RandomPossibleReagent();
item.Amount = Utility.RandomMinMax( 40, 60 );
cont.DropItem( item );
}
int gems;
if ( level == 0 )
gems = 2;
else
//.........这里部分代码省略.........