public static void Main() { Ninja ninja = new Ninja("Gogo"); string name = RandomeEvilName.RandomName(RandomeEvilName.JediNames); string second = RandomeEvilName.RandomName(RandomeEvilName.RobotNames); string trd = RandomeEvilName.RandomName(RandomeEvilName.AssasinNames); Console.WriteLine(name); Console.WriteLine(second); Console.WriteLine(trd); Console.WriteLine(ninja.Cash); Bag<IItem> check = new Bag<IItem>() { new SpecialPower(AttackTypeEnum.ForceAttack, "Name", 12, 12, 12), new Recreation("recreation"), new Energizer(EnergizerEnum.Bgurger, "energy") }; check.Insert(0, new Recreation("ssss")); foreach (IItem item in check) { Console.WriteLine(item); } }
private BagManager( ) { //各种背包的初始化,在使用之前 equipmentBag = new Bag<Equipment>(ConstantDefine.BagItemType.Equipment); potionBag = new Bag<Potion>(ConstantDefine.BagItemType.Potion); sundryBag = new Bag<Sundry>(ConstantDefine.BagItemType.Sundry); }
public static ISItem ToSettings(object o) { if (o is SValue) { return (ISItem)o; } if (o is Bag) { return (ISItem)o; } if (o is SArray) { return (ISItem)o; } if (o is Array) { return new SArray((Array)o); } if (IsAnonymousType(o.GetType())) { dynamic grappe = new Bag(); foreach (var p in o.GetType().GetProperties()) { grappe[p.Name] = p.GetValue(o, null); } return grappe; } return new SValue(o); }
public void CompletedVisitor1() { var bag = new Bag<string> { "5", "4", "3", "2" }; var visitor = new CompletedTrackingVisitor<KeyValuePair<string, int>>(); bag.AcceptVisitor<KeyValuePair<string, int>>(visitor); }
public void CompletedVisitor2() { var bag = new Bag<string> { "5", "4", "3", "2" }; var visitor = new CompletedTrackingVisitor<string>(); bag.AcceptVisitor<string>(visitor); }
public Dikabryozik(Point position) { IsPassable = false; Size = new Size(1, 1); Id = 0x00018000; Speed = 10; ViewRadius = 3; ViewSight = new Size((uint)ViewRadius, (uint)ViewRadius); Position = position; _bundle = new Bag(2, 2); ObjectWithState = new ObjectWithState( new List<IObjectState> { new Staying() {TickCount = STAYING_BASE_TICKCOUNT, Distribution = STAYING_BASE_TICKCOUNT/10, Eternal = false}, new Hungry() {TickCount = 300, Distribution = 30, Eternal = true} }, false, null, OnChangeState); this.StateEvent.FireEvent(); }
public static void Main(string[] args) { System.Console.WriteLine("Starting Tester."); System.Console.WriteLine("Writing Hello on wall."); Wall wall = new Wall(); wall.writeBSTROnWall("Hello"); System.Console.WriteLine("Writing Brrrrr! on wall."); wall.writeBSTROnWall("Brrrrr!"); System.Console.WriteLine("Reading wall:"); string wallContents = "overwrite me"; wallContents = wall.readWallBSTR(); System.Console.WriteLine("Wall says: " + wallContents); System.Console.WriteLine("Again, Wall says: '" + wall.readWallBSTR() + "'."); System.Console.WriteLine("\n\nDoing Bag-Ball test"); //TODO What if I create it something like: IBag bag = (IBall) Factory.BagClass(); Eberhard might have said I was supposed to be doing this sort of thing that way. Bag bag = new Bag(); Ball ball = (Ball) bag.ProvideBall(); // TODO what if I cast it as an IBall rather than Ball long distance_rolled; distance_rolled = ball.roll(2); System.Console.WriteLine("Rolling ball by 2. Accumulated distance: {0} (should say 2)", distance_rolled); if (distance_rolled != 2) { System.Console.WriteLine("Tester.exe: Error, distance wasn't correct. Exiting."); Environment.Exit(-1); } bag.InspectBall(ball); distance_rolled = ball.roll(9); System.Console.WriteLine("Rolling ball by 9. Accumulated distance: {0} (should say 14)", distance_rolled); if (distance_rolled != 14) { System.Console.WriteLine("Tester.exe: Error, distance wasn't correct. Exiting."); Environment.Exit(-1); } }
public void ShouldAddAnonymousObject() { dynamic e = new Bag(); e.Foos = new { Foo1 = "Bar1", Foo2 = "Bar2" }; Assert.That(e.Foos.Foo1, Is.EqualTo("Bar1")); Assert.That(e.Foos.Foo2, Is.EqualTo("Bar2")); }
public MainWindow() { try { System.Diagnostics.Debug.Listeners.Add(new System.Diagnostics.TextWriterTraceListener("Debug.log")); System.Diagnostics.Debug.AutoFlush = true; System.Diagnostics.Debug.WriteLine(String.Format("Started at {0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Westwood\\Nox"); if (key == null) { MessageBox.Show("Can not find the Nox directory in the registry. You can try reinstalling Nox to fix this.", "Error"); Environment.Exit(1); } string installPath = (string) key.GetValue("InstallPath"); string bagPath = installPath.Substring(0, installPath.LastIndexOf("\\") + 1) + "Audio.bag"; bag = new AudioBag(bagPath); } catch (Exception ex) { MessageBox.Show("Something went very wrong. See the message in the following message box for details.", "Fatal Error"); MessageBox.Show(ex.Message + "\n" + ex.StackTrace); throw ex; } //Bag bag = new VideoBag("c:\\Westwood\\Nox\\Video.bag"); //bag = new AudioBag("c:\\Westwood\\Nox\\Audio.bag"); InitializeComponent(); }
public override void OnDoubleClick( Mobile from ) { if (Mobiles.BaseVendor.ConsumeBackpackAndBankGold(from, m_Price)) { Bag regBag = new Bag(); regBag.Hue = 1159; regBag.DropItem(new Bottle(12)); regBag.DropItem(new EyesOfNewt(30)); regBag.DropItem(new BlackPearl(50)); regBag.DropItem(new Bloodmoss(50)); regBag.DropItem(new Nightshade(50)); regBag.DropItem(new Bandage(50)); regBag.DropItem(new SulfurousAsh(60)); regBag.DropItem(new Garlic(70)); regBag.DropItem(new Ginseng(70)); regBag.DropItem(new SpidersSilk(75)); regBag.DropItem(new MandrakeRoot(85)); from.Backpack.DropItem(regBag); from.SendAsciiMessage("You've bought a bag of reagents."); from.PlaySound(247); } else from.SendAsciiMessage("You do not have enough money!"); }
public void Simple() { var bag = new Bag<string> { "aa" }; Assert.AreEqual(bag.Count, 1); Assert.IsTrue(bag.Contains("aa")); Assert.AreEqual(bag["aa"], 1); bag.Add("bb"); Assert.AreEqual(bag.Count, 2); Assert.IsTrue(bag.Contains("bb")); Assert.AreEqual(bag["bb"], 1); bag.Add("aa"); Assert.AreEqual(bag.Count, 3); Assert.IsTrue(bag.Contains("aa")); Assert.AreEqual(bag["aa"], 2); bag.Add("cc", 3); Assert.AreEqual(bag.Count, 6); Assert.IsTrue(bag.Contains("cc")); Assert.AreEqual(bag["cc"], 3); bag.Add("cc", 2); Assert.AreEqual(bag.Count, 8); Assert.IsTrue(bag.Contains("cc")); Assert.AreEqual(bag["cc"], 5); }
private static IEnumerable<Achievement> CreateAchievements() { CreateAchievementTrackerDelegate persistentKillZombieTrackerCreator = (am, ew, achievement) => new PersistentKillZombiesTracker(am, ew, achievement.Name); PassiveSkill zombieKillReward = new PassiveSkill("Player shoots faster", passiveStats => passiveStats.FireRateMultiplier += 0.1f); Bag<Achievement> achievements = new Bag<Achievement>(); // "important" AchievementHelper.CreatePersistentKillingAchievements(achievements); AchievementHelper.CreatePersistentRunningAchievements(achievements); AchievementHelper.CreateScoreAchievements(achievements); // "kill XXX" AchievementHelper.CreateKillInTimeAchievements(achievements); AchievementHelper.CreateKillRushersWhileRushingAchievements(achievements); AchievementHelper.CreateKillWithInvulnerabilityAchievements(achievements); AchievementHelper.CreateKillWithSingleRocketAchievments(achievements); AchievementHelper.CreateKillGoldenGoblinsAchievements(achievements); // "survive" AchievementHelper.CreateSurviveWithoutKillingAchievements(achievements); AchievementHelper.CreateSurviveWithoutMovingAchievements(achievements); // misc AchievementHelper.CreateLivesAtAnyPointOfGameAchievements(achievements); AchievementHelper.CreateSpendLaserWithoutKillingAchievements(achievements); // golden goblin // not in atm AchievementHelper.CreateIAPAchievements(achievements); return achievements; }
public void Simple() { var bag = new Bag<string>(); Assert.AreEqual(bag.Count, 0); Assert.IsTrue(bag.IsEmpty); bag = new Bag<string>(EqualityComparer<string>.Default); Assert.AreEqual(bag.Count, 0); Assert.IsTrue(bag.IsEmpty); bag = new Bag<string>(50); Assert.AreEqual(bag.Count, 0); Assert.IsTrue(bag.IsEmpty); bag = new Bag<string>(50); Assert.AreEqual(bag.Count, 0); Assert.IsTrue(bag.IsEmpty); bag = new Bag<string>(50, EqualityComparer<string>.Default); Assert.AreEqual(bag.Count, 0); Assert.IsTrue(bag.IsEmpty); }
public void Simple() { var bag = new Bag<string> { "aa", "bb", "aa", { "cc", 3 } }; Assert.AreEqual(bag.Count, 6); Assert.IsTrue(bag.Remove("aa")); Assert.IsTrue(bag.Contains("aa")); Assert.AreEqual(bag["aa"], 1); Assert.AreEqual(bag.Count, 5); Assert.IsTrue(bag.Remove("aa")); Assert.IsFalse(bag.Contains("aa")); Assert.AreEqual(bag["aa"], 0); Assert.AreEqual(bag.Count, 4); Assert.IsFalse(bag.Remove("dd")); Assert.AreEqual(bag.Count, 4); Assert.IsTrue(bag.Remove("bb")); Assert.IsFalse(bag.Contains("bb")); Assert.AreEqual(bag["bb"], 0); Assert.AreEqual(bag.Count, 3); Assert.IsTrue(bag.Remove("cc")); Assert.IsTrue(bag.Contains("cc")); Assert.AreEqual(bag["cc"], 2); Assert.AreEqual(bag.Count, 2); }
public static ArrayList GetBagsByType(string bagType) { ArrayList list = new ArrayList(); string query = string.Format("SELECT * FROM Bags WHERE type LIKE '{0}'", bagType); try { conn.Open(); command.CommandText = query; SqlDataReader reader = command.ExecuteReader(); while (reader.Read()) { int id = reader.GetInt32(0); string name = reader.GetString(1); string type = reader.GetString(2); double price = reader.GetDouble(3); string image = reader.GetString(4); string review = reader.GetString(5); Bag bags = new Bag(id, name, type, price, image, review); list.Add(bags); } } finally { conn.Close(); } return list; }
public void Associate(ComponentTypeFactory tf, Bag<Type> types, BitSet componentBits) { foreach (var t in types) { componentBits.Set(tf.GetIndexFor(t)); } }
public void Simple() { var bag1 = new Bag<int> { 3, 4, 5, 6 }; var bag2 = new Bag<int> { 3, 4, 5 }; var shouldBe = new Bag<int> { 6 }; var resultBag = bag1 - bag2; Assert.IsTrue(resultBag.Equals(shouldBe)); bag1.Clear(); bag2.Clear(); bag1.Add(3, 3); bag2.Add(3, 2); bag1.Add(5, 5); bag2.Add(5, 7); shouldBe.Clear(); shouldBe.Add(3, 1); resultBag = bag1 - bag2; Assert.IsTrue(resultBag.Equals(shouldBe)); }
public void Simple() { var bag1 = new Bag<string>(); var bag2 = GetTestBag(); var resultBag = bag1 * bag2; Assert.IsTrue(resultBag.Equals(bag1)); bag1.Add("50", 2); var shouldBe = new Bag<string>(); resultBag = bag1 * bag2; Assert.IsTrue(shouldBe.Equals(resultBag)); bag1.Add("2", 2); shouldBe.Add("2", 2); resultBag = bag1 * bag2; Assert.IsTrue(shouldBe.Equals(resultBag)); }
public void Interface() { var bag1 = new Bag<string>(); var bag2 = GetTestBag(); var resultBag = (Bag<string>)((IBag<string>)bag1).Intersection(bag2); Assert.IsTrue(resultBag.Equals(bag1)); bag1.Add("50", 2); var shouldBe = new Bag<string>(); resultBag = (Bag<string>)((IBag<string>)bag1).Intersection(bag2); Assert.IsTrue(shouldBe.Equals(resultBag)); bag1.Add("2", 2); shouldBe.Add("2", 2); resultBag = (Bag<string>)((IBag<string>)bag1).Intersection(bag2); Assert.IsTrue(shouldBe.Equals(resultBag)); }
public Ticket Store(Bag aBag, Ticket ticket) { if (!HasEmptyBox()) return null; _dicTicketBag.Add(ticket, aBag); return ticket; }
void OnRegistered( object sender, ComponentRegisteredEventArgs e ) { var services = e.ComponentRegistration.Services .OfType<TypedService>() .Select( t => t.ServiceType ) .ToArray(); var implementation = e.ComponentRegistration.Activator.LimitType; var bag = new Bag() { Services = services, Implementation = implementation }; if ( this.IsInterestingHandler( bag, typeof( IMessageHandler ) ) || this.IsInterestingHandler( bag, typeof( IHandleMessage ) ) ) { logger.Debug ( "Registered component is IMessageHandler/IHandleMessage: {0}/{1}, but no broker yet registered. buffering...", services.FirstOrDefault() == null ? "<null>" : services.FirstOrDefault().ToString( "SN" ), implementation.ToString( "SN" ) ); this.buffer.Add( new Tuple<Guid, Bag>( e.ComponentRegistration.Id, bag ) ); } }
public void Interface() { var bag1 = new Bag<int> { 3, 4, 5, 6 }; var bag2 = new Bag<int> { 3, 4, 5 }; var shouldBe = new Bag<int> { 6 }; var resultBag = (Bag<int>)((IBag<int>)bag1).Subtract(bag2); Assert.IsTrue(resultBag.Equals(shouldBe)); bag1.Clear(); bag2.Clear(); bag1.Add(3, 3); bag2.Add(3, 2); bag1.Add(5, 5); bag2.Add(5, 7); shouldBe.Clear(); shouldBe.Add(3, 1); resultBag = bag1.Subtract(bag2); Assert.IsTrue(resultBag.Equals(shouldBe)); }
public void Insert() { const int length = 30; // simple insert of 0 to 29 { Bag<int> b = new Bag<int>(); for (int i = 0; i < length; ++i) { ((IList<int>)b).Insert(i, i); } for (int i = 0; i < length; ++i) { Assert.Equal(i, b[i]); } } // more complex insert of 0 to 59 { Bag<int> b = new Bag<int>(); // insert even numbers for (int i = 0; i < length + 1; ++i) { b.Add(i * 2); } // insert odd numbers for (int i = 0; i < length; ++i) { ((IList<int>)b).Insert((i * 2) + 1, (i * 2) + 1); } // ensure it is equal for (int i = 0; i < length * 2; ++i) { Assert.Equal(i, b[i]); } } }
public void Store_One_Bag_When_Not_All_Cabinets_Full_Return_Ticket() { var smartRobot = new SmartRobot(new List<Cabinet> { new Cabinet(0), new Cabinet(1), new Cabinet(0) }); var bag = new Bag(); var ticket = smartRobot.Store(bag); Assert.IsNotNull(ticket); }
public void ShouldAddArrays() { dynamic e = new Bag(); e.Owners = new[] { "Steve", "Bill" }; Assert.That(e.Owners[0], Is.EqualTo("Steve")); Assert.That(e.Owners[1], Is.EqualTo("Bill")); }
private void ReadElement(XmlReader reader, Bag parent) { var name = XmlConvert.DecodeName(reader.LocalName); var type = reader["type"]; // is it a value node ? i.e. type="" if (type != null) { if (type == "Array") { // go to first item parent.SetMember(name, ReadArray(reader)); reader.Read(); } else { var typeCode = (TypeCode)Enum.Parse(typeof(TypeCode), type); var value = SConvert.XmlDecode(typeCode, reader.ReadElementString()); parent.SetMember(name, value); } } else { var grappe = new Bag(); reader.Read(); parent.SetMember(name, grappe); while (reader.MoveToContent() == XmlNodeType.Element) { ReadElement(reader, grappe); } reader.Read(); } }
public void Price_returns_one_item_price_when_bag_contains_one_item() { var burger = new Fries(SamplePrice); var bag = new Bag { burger }; Assert.AreEqual(burger.Price, bag.Price); }
public void should_return_ticket_when_store_bag() { var bag = new Bag(); var superRobot = new SuperRobot(new List<Locker> { new Locker(1) }); Ticket ticket = superRobot.Store(bag); Assert.NotNull(ticket); }
public void should_not_return_ticket_given_full_cabinet_when_pick() { Bag bag = new Bag(); var cabinet = new Cabinet(0); Assert.IsNull(new Direct(cabinet).Store(bag)); }
public void TestAddRange() { Bag<string> target = new Bag<string>(Capacity); Bag<string> rangeOfElements = new Bag<string>(Capacity) { TestElement1, TestElement2, TestElement3 }; target.AddRange(rangeOfElements); Assert.IsTrue(target.Contains(TestElement1) && target.Contains(TestElement2) && target.Contains(TestElement3)); }
private static void EventSink_CharacterCreated(CharacterCreatedEventArgs args) { if (!VerifyProfession(args.Profession)) { args.Profession = 0; } NetState state = args.State; if (state == null) { return; } Mobile newChar = CreateMobile(args.Account as Account); args.Mobile = newChar; m_Mobile = newChar; if (newChar == null) { Console.WriteLine("Login: {0}: Character creation failed, account full", state); return; } if (newChar is Player) { Player pm = (Player)newChar; pm.Profession = args.Profession; } newChar.Player = true; newChar.AccessLevel = args.Account.AccessLevel; newChar.Female = args.Female; newChar.Body = newChar.Female ? 0x191 : 0x190; newChar.Hue = Utility.ClipSkinHue(args.Hue & 0x3FFF) | 0x8000; newChar.Hunger = 20; newChar.Thirst = 20; newChar.SkillsCap = 8000; newChar.StatCap = 250; newChar.Name = args.Name; ((Player)newChar).EoC += 20000; ((Player)newChar).Race = Race.Human; newChar.CantWalk = false; newChar.Frozen = false; newChar.Hits = newChar.HitsMax; newChar.Mana = newChar.ManaMax; newChar.Stam = newChar.StamMax; AddBackpack(newChar); newChar.AddToBackpack(new Verite(150)); Bag bag = new Bag(); bag.Name = "A torn bag"; bag.Hue = Utility.RandomNeutralHue(); newChar.AddToBackpack(bag); //bag.TryDropItem(newChar, new ShepherdsCrook(), false); //bag.TryDropItem(newChar, new Bandage(Utility.Random(20,30)), false); //bag.TryDropItem(newChar, new Kindling(15), false); //bag.TryDropItem(newChar, new Torch(), false); //bag.TryDropItem(newChar, new Dagger(), false); //bag.TryDropItem(newChar, new TotalRefreshPotion(), false); //bag.TryDropItem(newChar, new GreaterHealPotion(), false); //bag.TryDropItem(newChar, new GreaterCurePotion(), false); //bag.TryDropItem(newChar, new IDWand(Utility.Random(10,15)), false); //bag.TryDropItem(newChar, new Pitcher(BeverageType.Water), false); bag.AddItem(new Bandage(30)); bag.AddItem(new Kindling(10)); bag.AddItem(new Torch()); bag.AddItem(new Dagger()); bag.AddItem(new Scissors()); bag.AddItem(new TotalRefreshPotion()); bag.AddItem(new GreaterCurePotion()); bag.AddItem(new GreaterHealPotion()); bag.AddItem(new IDWand()); bag.AddItem(new Pitcher()); newChar.AddToBackpack(new SkillScroll()); for (int i = 0; i < SkillInfo.Table.Length; i++) { newChar.Skills[i].Base = 0; if (SkillInfo.Table[i].SkillID > (int)SkillName.Ninjitsu) { newChar.Skills[i].Cap = 0; } else { newChar.Skills[i].Cap = 100; } } newChar.HairItemID = args.HairID; newChar.FacialHairItemID = args.BeardID; newChar.HairHue = Utility.ClipHairHue(args.HairHue & 0x3FFF); newChar.FacialHairHue = Utility.ClipHairHue(args.BeardHue & 0x3FFF); AddShirt(newChar, args.ShirtHue); AddPants(newChar, args.PantsHue); AddShoes(newChar); SetStats(newChar, state, args.Str, args.Dex, args.Int); SetSkills(newChar, args.Skills, args.Profession); newChar.MoveToWorld(new Point3D(2756, 3808, 50), Map.Felucca); /// Isle of Kesna'buir ((Player)newChar).RespawnLocation = (new Point3D(2756, 3808, 50)); ((Player)newChar).RespawnMap = Map.Felucca; Console.WriteLine("Login: {0}: New character being created (account={1})", args.State, args.Account.Username); Console.WriteLine(" - Character: {0} (serial={1})", newChar.Name, newChar.Serial); }
public override Task SafeRun(Bag args) { throw new NotImplementedException(); }
protected Character(string name, double health, double armor, double abilityPoints, Bag bag) { Name = name; BaseHealth = health; BaseArmor = armor; AbilityPoints = abilityPoints; Bag = bag; Armor = armor; Health = health; }
// adam: not called for production servers private static void FillBankbox(Mobile m) { BankBox bank = m.BankBox; if (bank == null) { return; } Container cont; // Begin box of money cont = new WoodenBox(); cont.ItemID = 0xE7D; cont.Hue = 0x489; PlaceItemIn(cont, 16, 51, new BankCheck(1000000)); //edited by sam PlaceItemIn(cont, 28, 51, new BankCheck(250000)); //edited by sam PlaceItemIn(cont, 40, 51, new BankCheck(125000)); //edited by sam PlaceItemIn(cont, 52, 51, new BankCheck(75000)); //edited by sam PlaceItemIn(cont, 64, 51, new BankCheck(32500)); //edited by sam PlaceItemIn(cont, 34, 115, MakeNewbie(new Gold(60000))); PlaceItemIn(bank, 18, 169, cont); // End box of money // Begin bag of potion kegs cont = new Backpack(); cont.Name = "Various Potion Kegs"; PlaceItemIn(cont, 45, 149, MakePotionKeg(PotionEffect.CureGreater, 0x2D)); PlaceItemIn(cont, 69, 149, MakePotionKeg(PotionEffect.HealGreater, 0x499)); PlaceItemIn(cont, 93, 149, MakePotionKeg(PotionEffect.PoisonDeadly, 0x46)); PlaceItemIn(cont, 117, 149, MakePotionKeg(PotionEffect.RefreshTotal, 0x21)); PlaceItemIn(cont, 141, 149, MakePotionKeg(PotionEffect.ExplosionGreater, 0x74)); PlaceItemIn(cont, 93, 82, MakeNewbie(new Bottle(1000))); PlaceItemIn(bank, 53, 169, cont); // End bag of potion kegs // Begin bag of tools cont = new Bag(); cont.Name = "Tool Bag"; PlaceItemIn(cont, 30, 35, MakeNewbie(new TinkerTools(60000))); PlaceItemIn(cont, 90, 35, MakeNewbie(new DovetailSaw(60000))); PlaceItemIn(cont, 30, 68, MakeNewbie(new Scissors())); PlaceItemIn(cont, 45, 68, MakeNewbie(new MortarPestle(60000))); PlaceItemIn(cont, 75, 68, MakeNewbie(new ScribesPen(60000))); PlaceItemIn(cont, 90, 68, MakeNewbie(new SmithHammer(60000))); PlaceItemIn(cont, 30, 118, MakeNewbie(new TwoHandedAxe())); PlaceItemIn(cont, 90, 118, MakeNewbie(new SewingKit(60000))); PlaceItemIn(bank, 118, 169, cont); // End bag of tools // Begin bag of archery ammo cont = new Bag(); cont.Name = "Bag Of Archery Ammo"; PlaceItemIn(cont, 48, 76, MakeNewbie(new Arrow(60000))); PlaceItemIn(cont, 72, 76, MakeNewbie(new Bolt(60000))); PlaceItemIn(bank, 118, 124, cont); // End bag of archery ammo // Begin bag of treasure maps cont = new Bag(); cont.Name = "Bag Of Treasure Maps"; PlaceItemIn(cont, 30, 35, MakeNewbie(new TreasureMap(1, Map.Felucca))); PlaceItemIn(cont, 45, 35, MakeNewbie(new TreasureMap(2, Map.Felucca))); PlaceItemIn(cont, 60, 35, MakeNewbie(new TreasureMap(3, Map.Felucca))); PlaceItemIn(cont, 75, 35, MakeNewbie(new TreasureMap(4, Map.Felucca))); PlaceItemIn(cont, 90, 35, MakeNewbie(new TreasureMap(5, Map.Felucca))); PlaceItemIn(cont, 30, 50, MakeNewbie(new TreasureMap(1, Map.Felucca))); PlaceItemIn(cont, 45, 50, MakeNewbie(new TreasureMap(2, Map.Felucca))); PlaceItemIn(cont, 60, 50, MakeNewbie(new TreasureMap(3, Map.Felucca))); PlaceItemIn(cont, 75, 50, MakeNewbie(new TreasureMap(4, Map.Felucca))); PlaceItemIn(cont, 90, 50, MakeNewbie(new TreasureMap(5, Map.Felucca))); PlaceItemIn(cont, 55, 100, MakeNewbie(new Lockpick(60000))); PlaceItemIn(cont, 60, 100, MakeNewbie(new Pickaxe())); PlaceItemIn(bank, 98, 124, cont); // End bag of treasure maps // Begin bag of raw materials cont = new Bag(); cont.Hue = 0x835; cont.Name = "Raw Materials Bag"; PlaceItemIn(cont, 30, 35, MakeNewbie(new DullCopperIngot(60000))); PlaceItemIn(cont, 37, 35, MakeNewbie(new ShadowIronIngot(60000))); PlaceItemIn(cont, 44, 35, MakeNewbie(new CopperIngot(60000))); PlaceItemIn(cont, 51, 35, MakeNewbie(new BronzeIngot(60000))); PlaceItemIn(cont, 58, 35, MakeNewbie(new GoldIngot(60000))); PlaceItemIn(cont, 65, 35, MakeNewbie(new AgapiteIngot(60000))); PlaceItemIn(cont, 72, 35, MakeNewbie(new VeriteIngot(60000))); PlaceItemIn(cont, 79, 35, MakeNewbie(new ValoriteIngot(60000))); PlaceItemIn(cont, 86, 35, MakeNewbie(new IronIngot(60000))); PlaceItemIn(cont, 29, 55, MakeNewbie(new Leather(60000))); PlaceItemIn(cont, 44, 55, MakeNewbie(new SpinedLeather(60000))); PlaceItemIn(cont, 59, 55, MakeNewbie(new HornedLeather(60000))); PlaceItemIn(cont, 74, 55, MakeNewbie(new BarbedLeather(60000))); PlaceItemIn(cont, 35, 100, MakeNewbie(new Cloth(60000))); PlaceItemIn(cont, 67, 89, MakeNewbie(new Board(60000))); PlaceItemIn(cont, 88, 91, MakeNewbie(new BlankScroll(60000))); PlaceItemIn(bank, 98, 169, cont); // End bag of raw materials // Begin bag of spell casting stuff cont = new Backpack(); cont.Hue = 0x480; cont.Name = "Spell Casting Stuff"; PlaceItemIn(cont, 45, 105, new Spellbook(UInt64.MaxValue)); Runebook runebook = new Runebook(10); runebook.CurCharges = runebook.MaxCharges; PlaceItemIn(cont, 105, 105, runebook); Item toHue = new BagOfReagents(65000); toHue.Hue = 0x2D; PlaceItemIn(cont, 45, 150, toHue); for (int i = 0; i < 9; ++i) { PlaceItemIn(cont, 45 + (i * 10), 75, MakeNewbie(new RecallRune())); } PlaceItemIn(bank, 78, 169, cont); // End bag of spell casting stuff }
public void Setup() { p = new Present("P", 100.00); bag = new Bag(); }
public MeerCaptain() : base(AIType.AI_Paladin, FightMode.Evil, 10, 1, 0.2, 0.4) { this.Name = "a meer captain"; this.Body = 773; this.SetStr(96, 110); this.SetDex(186, 200); this.SetInt(96, 110); this.SetHits(58, 66); this.SetDamage(5, 15); this.SetDamageType(ResistanceType.Physical, 100); this.SetResistance(ResistanceType.Physical, 45, 55); this.SetResistance(ResistanceType.Fire, 10, 20); this.SetResistance(ResistanceType.Cold, 40, 50); this.SetResistance(ResistanceType.Poison, 35, 45); this.SetResistance(ResistanceType.Energy, 35, 45); this.SetSkill(SkillName.Archery, 90.1, 100.0); this.SetSkill(SkillName.MagicResist, 91.0, 100.0); this.SetSkill(SkillName.Swords, 90.1, 100.0); this.SetSkill(SkillName.Tactics, 91.0, 100.0); this.SetSkill(SkillName.Wrestling, 80.9, 89.9); this.Fame = 2000; this.Karma = 5000; this.VirtualArmor = 28; Container pack = new Backpack(); pack.DropItem(new Bolt(Utility.RandomMinMax(10, 20))); pack.DropItem(new Bolt(Utility.RandomMinMax(10, 20))); switch (Utility.Random(6)) { case 0: pack.DropItem(new Broadsword()); break; case 1: pack.DropItem(new Cutlass()); break; case 2: pack.DropItem(new Katana()); break; case 3: pack.DropItem(new Longsword()); break; case 4: pack.DropItem(new Scimitar()); break; case 5: pack.DropItem(new VikingSword()); break; } Container bag = new Bag(); int count = Utility.RandomMinMax(10, 20); for (int i = 0; i < count; ++i) { Item item = Loot.RandomReagent(); if (item == null) { continue; } if (!bag.TryDropItem(this, item, false)) { item.Delete(); } } pack.DropItem(bag); this.AddItem(new Crossbow()); this.PackItem(pack); this.m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(2, 5)); }
protected Character(string name, double health, double armor, double abilityPoints, Bag bag, Faction faction) { this.Name = name; this.BaseHealth = health; this.Health = health; this.BaseArmor = armor; this.Armor = armor; this.AbilityPoints = abilityPoints; this.Bag = bag; this.Faction = faction; }
public static void FillBankbox(Mobile m) { if (Core.AOS) { FillBankAOS(m); return; } BankBox bank = m.BankBox; bank.DropItem(new BankCheck(1000000)); // Full spellbook Spellbook book = new Spellbook(); book.Content = UInt64.MaxValue; bank.DropItem(book); Bag bag = new Bag(); for (int i = 0; i < 5; ++i) { bag.DropItem(new Moonstone(MoonstoneType.Felucca)); } // Felucca moonstones bank.DropItem(bag); bag = new Bag(); for (int i = 0; i < 5; ++i) { bag.DropItem(new Moonstone(MoonstoneType.Trammel)); } // Trammel moonstones bank.DropItem(bag); // Treasure maps bank.DropItem(new TreasureMap(1, Map.Trammel)); bank.DropItem(new TreasureMap(2, Map.Trammel)); bank.DropItem(new TreasureMap(3, Map.Trammel)); bank.DropItem(new TreasureMap(4, Map.Trammel)); bank.DropItem(new TreasureMap(5, Map.Trammel)); // Bag containing 50 of each reagent bank.DropItem(new BagOfReagents(50)); // Craft tools bank.DropItem(MakeNewbie(new Scissors())); bank.DropItem(MakeNewbie(new SewingKit(1000))); bank.DropItem(MakeNewbie(new SmithHammer(1000))); bank.DropItem(MakeNewbie(new FletcherTools(1000))); bank.DropItem(MakeNewbie(new DovetailSaw(1000))); bank.DropItem(MakeNewbie(new MortarPestle(1000))); bank.DropItem(MakeNewbie(new ScribesPen(1000))); bank.DropItem(MakeNewbie(new TinkerTools(1000))); // A few dye tubs bank.DropItem(new Dyes()); bank.DropItem(new DyeTub()); bank.DropItem(new DyeTub()); bank.DropItem(new BlackDyeTub()); DyeTub darkRedTub = new DyeTub(); darkRedTub.DyedHue = 0x485; darkRedTub.Redyable = false; bank.DropItem(darkRedTub); // Some food bank.DropItem(MakeNewbie(new Apple(1000))); // Resources bank.DropItem(MakeNewbie(new Feather(1000))); bank.DropItem(MakeNewbie(new BoltOfCloth(1000))); bank.DropItem(MakeNewbie(new BlankScroll(1000))); bank.DropItem(MakeNewbie(new Hides(1000))); bank.DropItem(MakeNewbie(new Bandage(1000))); bank.DropItem(MakeNewbie(new Bottle(1000))); bank.DropItem(MakeNewbie(new Log(1000))); bank.DropItem(MakeNewbie(new IronIngot(5000))); bank.DropItem(MakeNewbie(new DullCopperIngot(5000))); bank.DropItem(MakeNewbie(new ShadowIronIngot(5000))); bank.DropItem(MakeNewbie(new CopperIngot(5000))); bank.DropItem(MakeNewbie(new BronzeIngot(5000))); bank.DropItem(MakeNewbie(new GoldIngot(5000))); bank.DropItem(MakeNewbie(new AgapiteIngot(5000))); bank.DropItem(MakeNewbie(new VeriteIngot(5000))); bank.DropItem(MakeNewbie(new ValoriteIngot(5000))); // Reagents bank.DropItem(MakeNewbie(new BlackPearl(1000))); bank.DropItem(MakeNewbie(new Bloodmoss(1000))); bank.DropItem(MakeNewbie(new Garlic(1000))); bank.DropItem(MakeNewbie(new Ginseng(1000))); bank.DropItem(MakeNewbie(new MandrakeRoot(1000))); bank.DropItem(MakeNewbie(new Nightshade(1000))); bank.DropItem(MakeNewbie(new SulfurousAsh(1000))); bank.DropItem(MakeNewbie(new SpidersSilk(1000))); // Some extra starting gold bank.DropItem(MakeNewbie(new Gold(9000))); // 5 blank recall runes for (int i = 0; i < 5; ++i) { bank.DropItem(MakeNewbie(new RecallRune())); } AddPowerScrolls(bank); }
public static void FillBankAOS(Mobile m) { BankBox bank = m.BankBox; // The new AOS bankboxes don't have powerscrolls, they are automatically 'applied': for (int i = 0; i < PowerScroll.Skills.Count; ++i) { m.Skills[PowerScroll.Skills[i]].Cap = 120.0; } m.StatCap = 250; Container cont; // Begin box of money cont = new WoodenBox(); cont.ItemID = 0xE7D; cont.Hue = 0x489; PlaceItemIn(cont, 16, 51, new BankCheck(500000)); PlaceItemIn(cont, 28, 51, new BankCheck(250000)); PlaceItemIn(cont, 40, 51, new BankCheck(100000)); PlaceItemIn(cont, 52, 51, new BankCheck(100000)); PlaceItemIn(cont, 64, 51, new BankCheck(50000)); PlaceItemIn(cont, 16, 115, new Silver(9000)); PlaceItemIn(cont, 34, 115, new Gold(60000)); PlaceItemIn(bank, 18, 169, cont); // End box of money // Begin bag of potion kegs cont = new Backpack(); cont.Name = "Various Potion Kegs"; PlaceItemIn(cont, 45, 149, MakePotionKeg(PotionEffect.CureGreater, 0x2D)); PlaceItemIn(cont, 69, 149, MakePotionKeg(PotionEffect.HealGreater, 0x499)); PlaceItemIn(cont, 93, 149, MakePotionKeg(PotionEffect.PoisonDeadly, 0x46)); PlaceItemIn(cont, 117, 149, MakePotionKeg(PotionEffect.RefreshTotal, 0x21)); PlaceItemIn(cont, 141, 149, MakePotionKeg(PotionEffect.ExplosionGreater, 0x74)); PlaceItemIn(cont, 93, 82, new Bottle(1000)); PlaceItemIn(bank, 53, 169, cont); // End bag of potion kegs // Begin bag of tools cont = new Bag(); cont.Name = "Tool Bag"; PlaceItemIn(cont, 30, 35, new TinkerTools(1000)); PlaceItemIn(cont, 60, 35, new HousePlacementTool()); PlaceItemIn(cont, 90, 35, new DovetailSaw(1000)); PlaceItemIn(cont, 30, 68, new Scissors()); PlaceItemIn(cont, 45, 68, new MortarPestle(1000)); PlaceItemIn(cont, 75, 68, new ScribesPen(1000)); PlaceItemIn(cont, 90, 68, new SmithHammer(1000)); PlaceItemIn(cont, 30, 118, new TwoHandedAxe()); PlaceItemIn(cont, 60, 118, new FletcherTools(1000)); PlaceItemIn(cont, 90, 118, new SewingKit(1000)); PlaceItemIn(bank, 118, 169, cont); // End bag of tools // Begin bag of archery ammo cont = new Bag(); cont.Name = "Bag Of Archery Ammo"; PlaceItemIn(cont, 48, 76, new Arrow(5000)); PlaceItemIn(cont, 72, 76, new Bolt(5000)); PlaceItemIn(bank, 118, 124, cont); // End bag of archery ammo // Begin bag of treasure maps cont = new Bag(); cont.Name = "Bag Of Treasure Maps"; PlaceItemIn(cont, 30, 35, new TreasureMap(1, Map.Trammel)); PlaceItemIn(cont, 45, 35, new TreasureMap(2, Map.Trammel)); PlaceItemIn(cont, 60, 35, new TreasureMap(3, Map.Trammel)); PlaceItemIn(cont, 75, 35, new TreasureMap(4, Map.Trammel)); PlaceItemIn(cont, 90, 35, new TreasureMap(5, Map.Trammel)); PlaceItemIn(cont, 90, 35, new TreasureMap(6, Map.Trammel)); PlaceItemIn(cont, 30, 50, new TreasureMap(1, Map.Trammel)); PlaceItemIn(cont, 45, 50, new TreasureMap(2, Map.Trammel)); PlaceItemIn(cont, 60, 50, new TreasureMap(3, Map.Trammel)); PlaceItemIn(cont, 75, 50, new TreasureMap(4, Map.Trammel)); PlaceItemIn(cont, 90, 50, new TreasureMap(5, Map.Trammel)); PlaceItemIn(cont, 90, 50, new TreasureMap(6, Map.Trammel)); PlaceItemIn(cont, 55, 100, new Lockpick(30)); PlaceItemIn(cont, 60, 100, new Pickaxe()); PlaceItemIn(bank, 98, 124, cont); // End bag of treasure maps // Begin bag of raw materials cont = new Bag(); cont.Hue = 0x835; cont.Name = "Raw Materials Bag"; PlaceItemIn(cont, 92, 60, new BarbedLeather(5000)); PlaceItemIn(cont, 92, 68, new HornedLeather(5000)); PlaceItemIn(cont, 92, 76, new SpinedLeather(5000)); PlaceItemIn(cont, 92, 84, new Leather(5000)); PlaceItemIn(cont, 30, 118, new Cloth(5000)); PlaceItemIn(cont, 30, 84, new Board(5000)); PlaceItemIn(cont, 57, 80, new BlankScroll(500)); PlaceItemIn(cont, 30, 35, new DullCopperIngot(5000)); PlaceItemIn(cont, 37, 35, new ShadowIronIngot(5000)); PlaceItemIn(cont, 44, 35, new CopperIngot(5000)); PlaceItemIn(cont, 51, 35, new BronzeIngot(5000)); PlaceItemIn(cont, 58, 35, new GoldIngot(5000)); PlaceItemIn(cont, 65, 35, new AgapiteIngot(5000)); PlaceItemIn(cont, 72, 35, new VeriteIngot(5000)); PlaceItemIn(cont, 79, 35, new ValoriteIngot(5000)); PlaceItemIn(cont, 86, 35, new IronIngot(5000)); PlaceItemIn(cont, 30, 59, new RedScales(5000)); PlaceItemIn(cont, 36, 59, new YellowScales(5000)); PlaceItemIn(cont, 42, 59, new BlackScales(5000)); PlaceItemIn(cont, 48, 59, new GreenScales(5000)); PlaceItemIn(cont, 54, 59, new WhiteScales(5000)); PlaceItemIn(cont, 60, 59, new BlueScales(5000)); PlaceItemIn(bank, 98, 169, cont); // End bag of raw materials // Begin bag of spell casting stuff cont = new Backpack(); cont.Hue = 0x480; cont.Name = "Spell Casting Stuff"; PlaceItemIn(cont, 45, 105, new Spellbook(UInt64.MaxValue)); PlaceItemIn(cont, 140, 150, new BagOfReagents(500)); for (int i = 0; i < 9; ++i) { PlaceItemIn(cont, 45 + (i * 10), 75, new RecallRune()); } PlaceItemIn(cont, 141, 74, new FireHorn()); PlaceItemIn(bank, 78, 169, cont); // End bag of spell casting stuff // Begin bag of ethereals cont = new Backpack(); cont.Hue = 0x490; cont.Name = "Bag Of Ethy's!"; PlaceItemIn(cont, 45, 66, new EtherealHorse()); PlaceItemIn(cont, 69, 82, new EtherealOstard()); PlaceItemIn(cont, 93, 99, new EtherealLlama()); PlaceItemIn(cont, 117, 115, new EtherealKirin()); PlaceItemIn(cont, 45, 132, new EtherealUnicorn()); PlaceItemIn(cont, 69, 66, new EtherealRidgeback()); PlaceItemIn(cont, 93, 82, new EtherealSwampDragon()); PlaceItemIn(cont, 117, 99, new EtherealBeetle()); PlaceItemIn(bank, 38, 124, cont); // End bag of ethereals }
public void Empty_ValueType_Zero() { Bag <int> bag = Bag <int> .Empty; Assert.Equal(0, bag.Value); }
public Bag AddBag(Bag newBag) { Bag intBag = SLTDbContext.Bags.Add(newBag); return(intBag); }
// Use this for initialization void Start() { itemModel = ItemModel.GetInstance(); bag = GameObject.Find("Bag").GetComponent <Bag>(); }
/// <summary>Construtor, cria nova instância de jogador</summary> /// <param name="baseWeight">Peso base do jogador</param> public Player(float baseWeight) { this.baseWeight = baseWeight; BagOfStuff = new Bag(5); }
public static void GiveArtifacts(Mobile from) { var box = new WoodenBox(); box.Hue = 1170; box.Name = "Artifacts"; Container bag = new Bag(); bag.Hue = 2075; bag.Name = "SA Major Artifacts Human"; bag.DropItem(new AnimatedLegsoftheInsaneTinker()); bag.DropItem(new ResonantStaffofEnlightenment()); bag.DropItem(new JadeWarAxe()); bag.DropItem(new DemonHuntersStandard()); bag.DropItem(new WallOfHungryMouths()); bag.DropItem(new HumanSignOfChaos()); bag.DropItem(new GargishSignOfChaos()); bag.DropItem(new IronwoodCompositeBow()); bag.DropItem(new ClawsOfTheBerserker()); bag.DropItem(new StandardOfChaos()); bag.DropItem(new DefenderOfTheMagus()); bag.DropItem(new TheImpalersPick()); bag.DropItem(new CavalrysFolly()); bag.DropItem(new AxeOfAbandon()); bag.DropItem(new ProtectoroftheBattleMage()); bag.DropItem(new FallenMysticsSpellbook()); bag.DropItem(new CrownOfArcaneTemperament()); bag.DropItem(new VampiricEssence()); PlaceItemIn(box, 17, 57, bag); bag = new Bag(); bag.Hue = 1159; bag.Name = "Eodon Artifacts"; bag.DropItem(new AnonsBoots()); bag.DropItem(new AnonsBootsGargoyle()); bag.DropItem(new AnonsSpellbook()); bag.DropItem(new BalakaisShamanStaff()); bag.DropItem(new BalakaisShamanStaffGargoyle()); bag.DropItem(new EnchantressCameo()); bag.DropItem(new GrugorsShield()); bag.DropItem(new GrugorsShieldGargoyle()); bag.DropItem(new HalawasHuntingBow()); bag.DropItem(new HalawasHuntingBowGargoyle()); bag.DropItem(new HawkwindsRobe()); bag.DropItem(new JumusSacredHide()); bag.DropItem(new JumusSacredHideGargoyle()); bag.DropItem(new JuonarsGrimoire()); bag.DropItem(new LereisHuntingSpear()); bag.DropItem(new LereisHuntingSpearGargoyle()); bag.DropItem(new MinaxsSandles()); bag.DropItem(new MinaxsSandlesGargoyle()); bag.DropItem(new OzymandiasObi()); bag.DropItem(new OzymandiasObiGargoyle()); bag.DropItem(new ShantysWaders()); bag.DropItem(new ShantysWadersGargoyle()); bag.DropItem(new TotemOfTheTribe()); bag.DropItem(new WamapsBoneEarrings()); bag.DropItem(new WamapsBoneEarringsGargoyle()); bag.DropItem(new UnstableTimeRift()); bag.DropItem(new MocapotlsObsidianSword()); PlaceItemIn(box, 40, 57, bag); bag = new Bag(); bag.Hue = 1266; bag.Name = "Major Artifacts"; bag.DropItem(new TitansHammer()); bag.DropItem(new InquisitorsResolution()); bag.DropItem(new BladeOfTheRighteous()); bag.DropItem(new ZyronicClaw()); for (int i = 0; i < DoomGauntlet.DoomArtifacts.Length; i++) { bag.DropItem(Loot.Construct(DoomGauntlet.DoomArtifacts[i])); } PlaceItemIn(box, 65, 57, bag); bag = new Bag(); bag.Hue = 1281; bag.Name = "Tokuno Major Artifacts"; bag.DropItem(new SwordsOfProsperity()); bag.DropItem(new SwordOfTheStampede()); bag.DropItem(new WindsEdge()); bag.DropItem(new DarkenedSky()); bag.DropItem(new RuneBeetleCarapace()); bag.DropItem(new KasaOfTheRajin()); bag.DropItem(new Stormgrip()); bag.DropItem(new TomeOfLostKnowledge()); bag.DropItem(new PigmentsOfTokuno(PigmentType.ParagonGold)); bag.DropItem(new PigmentsOfTokuno(PigmentType.VioletCouragePurple)); bag.DropItem(new PigmentsOfTokuno(PigmentType.InvulnerabilityBlue)); bag.DropItem(new PigmentsOfTokuno(PigmentType.LunaWhite)); bag.DropItem(new PigmentsOfTokuno(PigmentType.DryadGreen)); bag.DropItem(new PigmentsOfTokuno(PigmentType.ShadowDancerBlack)); bag.DropItem(new PigmentsOfTokuno(PigmentType.BerserkerRed)); bag.DropItem(new PigmentsOfTokuno(PigmentType.NoxGreen)); bag.DropItem(new PigmentsOfTokuno(PigmentType.RumRed)); bag.DropItem(new PigmentsOfTokuno(PigmentType.FireOrange)); bag.DropItem(new PigmentsOfTokuno(PigmentType.FadedCoal)); bag.DropItem(new PigmentsOfTokuno(PigmentType.Coal)); bag.DropItem(new PigmentsOfTokuno(PigmentType.FadedGold)); bag.DropItem(new PigmentsOfTokuno(PigmentType.StormBronze)); bag.DropItem(new PigmentsOfTokuno(PigmentType.Rose)); bag.DropItem(new PigmentsOfTokuno(PigmentType.MidnightCoal)); bag.DropItem(new PigmentsOfTokuno(PigmentType.FadedBronze)); bag.DropItem(new PigmentsOfTokuno(PigmentType.FadedRose)); bag.DropItem(new PigmentsOfTokuno(PigmentType.DeepRose)); PlaceItemIn(box, 115, 57, bag); bag = new Bag(); bag.Hue = 1167; bag.Name = "Minor Artifacts"; for (int i = 0; i < MondainsLegacy.Artifacts.Length; i++) { bag.DropItem(Loot.Construct(MondainsLegacy.Artifacts[i])); } PlaceItemIn(box, 90, 57, bag); bag = new Bag(); bag.Hue = 55; bag.Name = "Replicas"; bag.DropItem(new RoyalGuardInvestigatorsCloak()); bag.DropItem(new TongueOfTheBeast()); bag.DropItem(new TheMostKnowledgePerson()); bag.DropItem(new ShroudOfDeceit()); bag.DropItem(new ANecromancerShroud()); bag.DropItem(new LightsRampart()); bag.DropItem(new AcidProofRobe()); bag.DropItem(new ObiDiEnse()); bag.DropItem(new TheRobeOfBritanniaAri()); bag.DropItem(new GauntletsOfAnger()); bag.DropItem(new JadeArmband()); bag.DropItem(new Subdue()); bag.DropItem(new CrownOfTalKeesh()); bag.DropItem(new DjinnisRing()); bag.DropItem(new EmbroideredOakLeafCloak()); bag.DropItem(new GladiatorsCollar()); bag.DropItem(new LieutenantOfTheBritannianRoyalGuard()); bag.DropItem(new CaptainJohnsHat()); bag.DropItem(new BraveKnightOfTheBritannia()); bag.DropItem(new Pacify()); bag.DropItem(new OblivionsNeedle()); bag.DropItem(new RoyalGuardSurvivalKnife()); bag.DropItem(new Quell()); bag.DropItem(new Calm()); bag.DropItem(new OrcChieftainHelm()); bag.DropItem(new FangOfRactus()); bag.DropItem(new DetectiveBoots()); PlaceItemIn(box, 90, 139, bag); bag = new Bag(); bag.Hue = 2731; bag.Name = "Doom Upgrade Arties"; bag.DropItem(new BritchesOfWarding()); bag.DropItem(new BowOfTheInfiniteSwarm()); bag.DropItem(new GlovesOfFeudalGrip()); bag.DropItem(new Glenda()); bag.DropItem(new CuffsOfTheArchmage()); bag.DropItem(new TheScholarsHalo()); bag.DropItem(new TheDeceiver()); bag.DropItem(new BraceletOfPrimalConsumption()); PlaceItemIn(box, 17, 83, bag); PlaceItemIn(from.BankBox, 63, 106, box); }
//CONSTRUCTORS\\ protected Character(string name, double health, double armor, double abilityPoints, Bag bag, Faction faction) { this.Name = name; this.BaseHealth = health; this.Health = health; this.BaseArmor = armor; this.Armor = armor; this.AbilityPoints = abilityPoints; this.Bag = bag; this.Faction = faction; this.IsAlive = true; this.RestHealMultiplier = 0.2; }
public Character GetFakeCharacter1() { var bank = new Bag { _CharacterId = fc1Id, _Id = "F5091DD3-A11F-4864-A6DF-2A78594A90A9", isBank = true, BagSlots = new List <BagSlot>(), BagContainerId = -1 }; var bb1 = new Bag() { _CharacterId = fc1Id, _Id = "D69A53A8-BA4D-4FEA-94CE-61CE613D00F6", isBank = true, BagSlots = new List <BagSlot>(), BagContainerId = 5, BagItem = _dbContext.Items.FirstOrDefault(i => i.Id == 17966) }; var backpack = new Bag { _CharacterId = fc1Id, _Id = "484D54A0-77DF-4446-AC56-430CC049042F", BagContainerId = 0, BagSlots = new List <BagSlot>() }; for (int i = 0; i < 28; i++) { bank.BagSlots.Add(new BagSlot { BagId = bank.Id, SlotId = i }); } for (int i = 0; i < 18; i++) { bb1.BagSlots.Add(new BagSlot { BagId = bb1.Id, SlotId = i }); } for (int i = 0; i < 16; i++) { backpack.BagSlots.Add(new BagSlot { BagId = backpack.Id, SlotId = i }); } bank.BagSlots[0].ItemId = 14047; bank.BagSlots[0].Item = _dbContext.Items.FirstOrDefault(i => i.Id == 14047); bank.BagSlots[1].ItemId = 13445; bank.BagSlots[1].Item = _dbContext.Items.FirstOrDefault(i => i.Id == 13445); bank.BagSlots[4].ItemId = 7078; bank.BagSlots[4].Item = _dbContext.Items.FirstOrDefault(i => i.Id == 7078); backpack.BagSlots[0].ItemId = 19019; backpack.BagSlots[0].Item = _dbContext.Items.FirstOrDefault(i => i.Id == 19019); backpack.BagSlots[1].ItemId = 17182; backpack.BagSlots[1].Item = _dbContext.Items.FirstOrDefault(i => i.Id == 17182); bb1.BagSlots[0].Item = _dbContext.Items.FirstOrDefault(i => i.Id == 13457); bb1.BagSlots[0].ItemId = 13457; return(new Character { _Id = fc1Id, Name = "Skorppio", _GuildId = fg1Id, Bags = new List <Bag> { backpack, bank, bb1 } }); }
public static void GiveResources(Mobile from) { var box = new WoodenBox(); box.Hue = 1193; box.Name = "General Resources"; PlaceItemIn(box, 115, 63, new PowderOfTemperament(30000)); Container bag = new Bag(); bag.Hue = 75; bag.Name = "Bag of Imbuing Materials"; for (int i = 0; i < Imbuing.IngredTypes.Length; i++) { var item = Loot.Construct(Imbuing.IngredTypes[i]); if (item != null) { if (item.Stackable) { item.Amount = 1000; bag.DropItem(item); } else { bag.DropItem(item); for (int j = 0; j < 10; j++) { bag.DropItem(Loot.Construct(Imbuing.IngredTypes[j])); } } } } PlaceItemIn(box, 17, 67, bag); bag = new Bag(); bag.Hue = 1195; bag.Name = "Bag of Elven Materials"; for (int i = 0; i < Loot.RareGemTypes.Length; i++) { var item = Loot.Construct(Loot.RareGemTypes[i]); item.Amount = 200; bag.DropItem(item); } bag.DropItem(new LardOfParoxysmus(200)); bag.DropItem(new CapturedEssence(200)); bag.DropItem(new LuminescentFungi(200)); bag.DropItem(new Putrefaction(200)); bag.DropItem(new Blight(200)); bag.DropItem(new LardOfParoxysmus(200)); bag.DropItem(new Taint(200)); bag.DropItem(new Corruption(200)); bag.DropItem(new BarkFragment(200)); bag.DropItem(new Corruption(200)); bag.DropItem(new ParasiticPlant(200)); bag.DropItem(new Muculent(200)); bag.DropItem(new PristineDreadHorn(200)); bag.DropItem(new EyeOfTheTravesty(200)); bag.DropItem(new GrizzledBones(200)); bag.DropItem(new Scourge(200)); PlaceItemIn(box, 40, 67, bag); bag = new Backpack(); bag.Name = "Runic Tool Bag"; PlaceItemIn(bag, 54, 74, new RunicHammer(CraftResource.DullCopper, 30000)); PlaceItemIn(bag, 64, 74, new RunicHammer(CraftResource.ShadowIron, 30000)); PlaceItemIn(bag, 74, 74, new RunicHammer(CraftResource.Copper, 30000)); PlaceItemIn(bag, 84, 74, new RunicHammer(CraftResource.Bronze, 30000)); PlaceItemIn(bag, 94, 74, new RunicHammer(CraftResource.Gold, 30000)); PlaceItemIn(bag, 104, 74, new RunicHammer(CraftResource.Agapite, 30000)); PlaceItemIn(bag, 114, 74, new RunicHammer(CraftResource.Verite, 30000)); PlaceItemIn(bag, 124, 74, new RunicHammer(CraftResource.Valorite, 30000)); PlaceItemIn(bag, 54, 90, new RunicSewingKit(CraftResource.SpinedLeather, 30000)); PlaceItemIn(bag, 64, 90, new RunicSewingKit(CraftResource.HornedLeather, 30000)); PlaceItemIn(bag, 64, 90, new RunicSewingKit(CraftResource.BarbedLeather, 30000)); PlaceItemIn(bag, 74, 90, new RunicDovetailSaw(CraftResource.OakWood, 30000)); PlaceItemIn(bag, 84, 90, new RunicDovetailSaw(CraftResource.AshWood, 30000)); PlaceItemIn(bag, 94, 90, new RunicDovetailSaw(CraftResource.YewWood, 30000)); PlaceItemIn(bag, 104, 90, new RunicDovetailSaw(CraftResource.Heartwood, 30000)); PlaceItemIn(bag, 54, 107, new RunicFletcherTool(CraftResource.OakWood, 30000)); PlaceItemIn(bag, 64, 107, new RunicFletcherTool(CraftResource.AshWood, 30000)); PlaceItemIn(bag, 74, 107, new RunicFletcherTool(CraftResource.YewWood, 30000)); PlaceItemIn(bag, 84, 107, new RunicFletcherTool(CraftResource.Heartwood, 30000)); PlaceItemIn(box, 65, 67, bag); bag = new Bag(); bag.Name = "Raw Materials Bag"; PlaceItemIn(bag, 92, 59, new BarbedLeather(5000)); PlaceItemIn(bag, 92, 68, new HornedLeather(5000)); PlaceItemIn(bag, 92, 76, new SpinedLeather(5000)); PlaceItemIn(bag, 92, 84, new Leather(5000)); PlaceItemIn(bag, 30, 118, new Cloth(5000)); PlaceItemIn(bag, 30, 84, new Board(5000)); PlaceItemIn(bag, 57, 80, new BlankScroll(500)); PlaceItemIn(bag, 30, 35, new DullCopperIngot(5000)); PlaceItemIn(bag, 37, 35, new ShadowIronIngot(5000)); PlaceItemIn(bag, 44, 35, new CopperIngot(5000)); PlaceItemIn(bag, 51, 35, new BronzeIngot(5000)); PlaceItemIn(bag, 58, 35, new GoldIngot(5000)); PlaceItemIn(bag, 65, 35, new AgapiteIngot(5000)); PlaceItemIn(bag, 72, 35, new VeriteIngot(5000)); PlaceItemIn(bag, 79, 35, new ValoriteIngot(5000)); PlaceItemIn(bag, 86, 35, new IronIngot(5000)); PlaceItemIn(bag, 30, 59, new RedScales(5000)); PlaceItemIn(bag, 36, 59, new YellowScales(5000)); PlaceItemIn(bag, 42, 59, new BlackScales(5000)); PlaceItemIn(bag, 48, 59, new GreenScales(5000)); PlaceItemIn(bag, 54, 59, new WhiteScales(5000)); PlaceItemIn(bag, 60, 59, new BlueScales(5000)); PlaceItemIn(box, 40, 93, bag); bag = new Bag(); bag.Name = "Bag of Archery Ammo"; PlaceItemIn(bag, 48, 76, new Arrow(5000)); PlaceItemIn(bag, 72, 76, new Bolt(5000)); PlaceItemIn(box, 65, 93, bag); bag = new Bag(); bag.Name = "Tool Bag"; PlaceItemIn(bag, 30, 35, new TinkerTools(30000)); PlaceItemIn(bag, 60, 35, new HousePlacementTool()); PlaceItemIn(bag, 90, 35, new DovetailSaw(30000)); PlaceItemIn(bag, 30, 68, new Scissors()); PlaceItemIn(bag, 45, 68, new MortarPestle(30000)); PlaceItemIn(bag, 75, 68, new ScribesPen(30000)); PlaceItemIn(bag, 90, 68, new SmithHammer(30000)); PlaceItemIn(bag, 30, 118, new TwoHandedAxe()); PlaceItemIn(bag, 60, 118, new FletcherTools(30000)); PlaceItemIn(bag, 90, 118, new SewingKit(30000)); PlaceItemIn(bag, 70, 85, new Clippers(30000)); PlaceItemIn(bag, 61, 76, new MalletAndChisel(30000)); PlaceItemIn(box, 90, 93, bag); bag = new Bag(); bag.Name = "Bag of Recipes"; bag.Hue = 2301; foreach (var recipe in Recipe.Recipes.Values) { bag.DropItem(new RecipeScroll(recipe)); } PlaceItemIn(box, 115, 93, bag); bag = new Bag(); bag.Name = "Bag of Wood"; bag.Hue = 1321; bag.DropItem(new Board(5000)); bag.DropItem(new OakBoard(5000)); bag.DropItem(new AshBoard(5000)); bag.DropItem(new YewBoard(5000)); bag.DropItem(new OakBoard(5000)); bag.DropItem(new BloodwoodBoard(5000)); bag.DropItem(new HeartwoodBoard(5000)); bag.DropItem(new FrostwoodBoard(5000)); PlaceItemIn(box, 139, 93, bag); PlaceItemIn(from.BankBox, 88, 142, box); }
public static void FillBank(Mobile m) { BankBox bank = m.BankBox; for (int i = 0; i < PowerScroll.Skills.Count; ++i) { m.Skills[PowerScroll.Skills[i]].Cap = 120.0; } m.StatCap = 250; var book = new Runebook(9999); book.CurCharges = book.MaxCharges; book.Entries.Add(new RunebookEntry(new Point3D(1438, 1695, 0), Map.Trammel, "Britain Bank", null)); book.Entries.Add(new RunebookEntry(new Point3D(1821, 2821, 0), Map.Trammel, "Trinsic Bank", null)); book.Entries.Add(new RunebookEntry(new Point3D(1492, 1628, 13), Map.Trammel, "Britain Sweet Dreams", null)); book.Entries.Add(new RunebookEntry(new Point3D(1388, 1507, 10), Map.Trammel, "Britain Graveyard", null)); book.Entries.Add(new RunebookEntry(new Point3D(1300, 1080, 0), Map.Trammel, "Dungeon Despise", null)); book.Entries.Add(new RunebookEntry(new Point3D(1171, 2639, 0), Map.Trammel, "Dungeon Destard", null)); book.Entries.Add(new RunebookEntry(new Point3D(1260, 2296, 0), Map.Trammel, "Hedge Maze", null)); m.AddToBackpack(book); #region Gold var account = m.Account as Account; if (account != null && account.GetTag("TCGold") == null) { account.AddTag("TCGold", "Gold Given"); Banker.Deposit(m, 30000000, false); } #endregion #region Bank Level Items bank.DropItem(new Robe(443)); bank.DropItem(new Dagger()); bank.DropItem(new Candle()); bank.DropItem(new FireworksWand() { Name = "Mininova Fireworks Wand" }); #endregion Container cont; #region TMaps cont = new Bag(); cont.Name = "Bag of Treasure Maps"; for (int i = 0; i < 10; i++) { PlaceItemIn(cont, 30 + (i * 6), 35, new TreasureMap(Utility.Random(3), Map.Trammel)); } for (int i = 0; i < 10; i++) { PlaceItemIn(cont, 30 + (i * 6), 51, new TreasureMap(Utility.Random(3), Map.Trammel)); } for (int i = 0; i < 20; i++) { PlaceItemIn(cont, 76, 91, new MessageInABottle()); } PlaceItemIn(cont, 22, 77, new Shovel(30000)); PlaceItemIn(cont, 57, 97, new Lockpick(3)); PlaceItemIn(bank, 98, 124, cont); #endregion #region Trans Powder cont = new Bag(); PlaceItemIn(cont, 117, 147, new PowderOfTranslocation(100)); PlaceItemIn(bank, 117, 147, cont); #endregion #region Magery Items cont = new WoodenBox(); cont.Hue = 1195; cont.Name = "Magery Items"; PlaceItemIn(cont, 78, 88, new CrimsonCincture() { Hue = 232 }); PlaceItemIn(cont, 102, 90, new CrystallineRing()); var brac = new GoldBracelet(); brac.Name = "Farmer's Bank of Mastery"; brac.Attributes.CastRecovery = 3; brac.Attributes.CastSpeed = 1; PlaceItemIn(cont, 139, 30, brac); Container bag = new Backpack(); bag.Hue = 1152; bag.Name = "Spell Casting Stuff"; PlaceItemIn(bag, 45, 107, new Spellbook(UInt64.MaxValue)); PlaceItemIn(bag, 65, 107, new NecromancerSpellbook((UInt64)0xFFFF)); PlaceItemIn(bag, 85, 107, new BookOfChivalry((UInt64)0x3FF)); PlaceItemIn(bag, 105, 107, new BookOfBushido()); //Default ctor = full PlaceItemIn(bag, 125, 107, new BookOfNinjitsu()); //Default ctor = full PlaceItemIn(bag, 102, 122, new SpellweavingBook((1ul << 16) - 1)); PlaceItemIn(bag, 122, 122, new MysticBook((1ul << 16) - 1)); Runebook runebook = new Runebook(20); runebook.CurCharges = runebook.MaxCharges; PlaceItemIn(bag, 145, 105, runebook); Item toHue = new BagOfReagents(5000); toHue.Hue = 0x2D; PlaceItemIn(bag, 45, 128, toHue); toHue = new BagOfNecroReagents(3000); toHue.Hue = 0x488; PlaceItemIn(bag, 64, 125, toHue); toHue = new BagOfMysticReagents(3000); toHue.Hue = 1167; PlaceItemIn(bag, 141, 128, toHue); for (int i = 0; i < 9; ++i) { PlaceItemIn(bag, 45 + (i * 10), 74, new RecallRune()); } PlaceItemIn(cont, 47, 91, bag); bag = new Backpack(); bag.Name = "Various Potion Kegs"; PlaceItemIn(bag, 45, 149, MakePotionKeg(PotionEffect.CureGreater, 0x2D)); PlaceItemIn(bag, 69, 149, MakePotionKeg(PotionEffect.HealGreater, 0x499)); PlaceItemIn(bag, 93, 149, MakePotionKeg(PotionEffect.PoisonDeadly, 0x46)); PlaceItemIn(bag, 117, 149, MakePotionKeg(PotionEffect.RefreshTotal, 0x21)); PlaceItemIn(bag, 141, 149, MakePotionKeg(PotionEffect.ExplosionGreater, 0x74)); PlaceItemIn(bag, 93, 82, new Bottle(1000)); PlaceItemIn(cont, 53, 169, bag); PlaceItemIn(bank, 63, 142, cont); #endregion #region Silver - No Mas Silver /*cont = new WoodenBox(); * cont.Hue = 1161; * * PlaceItemIn(cont, 47, 91, new Silver(9000)); * PlaceItemIn(bank, 38, 142, cont);*/ #endregion #region Ethys cont = new Backpack(); cont.Hue = 0x490; cont.Name = "Bag Of Ethy's!"; PlaceItemIn(cont, 45, 66, new EtherealHorse()); PlaceItemIn(cont, 93, 99, new EtherealLlama()); PlaceItemIn(cont, 45, 132, new EtherealUnicorn()); PlaceItemIn(cont, 117, 99, new EtherealBeetle()); PlaceItemIn(bank, 38, 124, cont); #endregion }
/* * Al iniciar el juego: * * Se consiguen los componentes y se inicializan * * Inicializar la GUI superior con los valores * * Inicializar la mascara para el movimiento * * Inicializr los arrays de botones del menu central * * Llamar al metodo Start de MovingObject */ protected override void Start() { audioSource = GetComponent <AudioSource>(); animator = GetComponent <Animator>(); this.stats = GetComponent <CharacterStats>(); this.bag = GetComponent <Bag>(); this.bag.Init(); this.magics = GetComponent <MagicLearned>(); // Si no es el principio del juego sino que se carga un nuevo nivel, // se copian losa datos guardados en el GameManager if (!GameManager.Instance.beggining) { this.stats.Copy(GameManager.Instance.playerStats); this.bag.Copy(GameManager.Instance.playerBag, this.gameObject); this.magics.Copy(GameManager.Instance.playerMagics, this.gameObject); } //print(this.magics.GetCurrentNumMagics()); this.stats.actualHp = this.stats.hp; this.stats.actualMana = this.stats.mana; /* BLOQUE de inicializacion de GUI */ food = GameManager.Instance.playerFoodPoints; foodText.text = "Food: " + food; levelText.text = "Lvl: " + stats.nivel; healthText.text = this.stats.actualHp + "/" + this.stats.hp; manaText.text = this.stats.actualMana + "/" + this.stats.mana; this.hpBar.maxValue = this.stats.hp; this.hpBar.minValue = 0; this.hpBar.value = this.stats.actualHp; this.hpBar.interactable = false; this.manaBar.maxValue = this.stats.mana; this.manaBar.minValue = 0; this.manaBar.value = this.stats.actualMana; this.manaBar.interactable = false; this.expBar.maxValue = this.stats.getExpToNextLevel(); this.expBar.minValue = 0; this.expBar.value = this.stats.getExp(); this.expBar.interactable = false; /* FIN BLOQUE */ // EL jugador no puede atravesar paredes ni enemigos int mask1 = 1 << LayerMask.NameToLayer("Wall"); int mask2 = 1 << LayerMask.NameToLayer("Enemy"); this.blockingLayer = mask1 | mask2; // El menu principal no se muestra this.showingMenu = false; // No hay ninguna animacion de lanzamiento inicial this.waitUse = false; // Inicializacion de los arrays de botones Menu.M.initInventoryMenu(this); Menu.M.initMagicMenu(this); base.Start(); }
//----------------------------------------------------------------------- /** * Constructor that wraps (not copies). * * @param bag the bag to decorate, must not be null * @throws IllegalArgumentException if bag is null */ protected SynchronizedBag(Bag bag) : base(bag) { }
/** * Constructor that wraps (not copies). * * @param bag the bag to decorate, must not be null * @param lock the lock to use, must not be null * @throws IllegalArgumentException if bag is null */ protected SynchronizedBag(Bag bag, Object lockJ) : base(bag, lockJ) { }
private static void FillBankAOS(Mobile m) { BankBox bank = m.BankBox; m.StatCap = 250; Container cont; // Begin box of money cont = new WoodenBox(); cont.ItemID = 0xE7D; cont.Hue = 0x489; PlaceItemIn(cont, 16, 51, new BankCheck(500000)); PlaceItemIn(cont, 28, 51, new BankCheck(250000)); PlaceItemIn(cont, 40, 51, new BankCheck(100000)); PlaceItemIn(cont, 52, 51, new BankCheck(100000)); PlaceItemIn(cont, 64, 51, new BankCheck(50000)); PlaceItemIn(cont, 34, 115, new Gold(60000)); PlaceItemIn(bank, 18, 169, cont); // End box of money // Begin bag of potion kegs cont = new Backpack(); cont.Name = "Various Potion Kegs"; PlaceItemIn(cont, 45, 149, MakePotionKeg(PotionEffect.CureGreater, 0x2D)); PlaceItemIn(cont, 69, 149, MakePotionKeg(PotionEffect.HealGreater, 0x499)); PlaceItemIn(cont, 93, 149, MakePotionKeg(PotionEffect.PoisonDeadly, 0x46)); PlaceItemIn(cont, 117, 149, MakePotionKeg(PotionEffect.RefreshTotal, 0x21)); PlaceItemIn(cont, 141, 149, MakePotionKeg(PotionEffect.ExplosionGreater, 0x74)); PlaceItemIn(cont, 93, 82, new Bottle(1000)); PlaceItemIn(bank, 53, 169, cont); // End bag of potion kegs // Begin bag of tools cont = new Bag(); cont.Name = "Tool Bag"; PlaceItemIn(cont, 30, 35, new TinkerTools(1000)); PlaceItemIn(cont, 60, 35, new HousePlacementTool()); PlaceItemIn(cont, 90, 35, new DovetailSaw(1000)); PlaceItemIn(cont, 30, 68, new Scissors()); PlaceItemIn(cont, 45, 68, new MortarPestle(1000)); PlaceItemIn(cont, 75, 68, new ScribesPen(1000)); PlaceItemIn(cont, 90, 68, new SmithHammer(1000)); PlaceItemIn(cont, 30, 118, new TwoHandedAxe()); PlaceItemIn(cont, 60, 118, new FletcherTools(1000)); PlaceItemIn(cont, 90, 118, new SewingKit(1000)); PlaceItemIn(bank, 118, 169, cont); // End bag of tools // Begin bag of archery ammo cont = new Bag(); cont.Name = "Bag Of Archery Ammo"; PlaceItemIn(cont, 48, 76, new Arrow(5000)); PlaceItemIn(cont, 72, 76, new Bolt(5000)); PlaceItemIn(bank, 118, 124, cont); // End bag of archery ammo // Begin bag of treasure maps cont = new Bag(); cont.Name = "Bag Of Treasure Maps"; PlaceItemIn(cont, 30, 35, new TreasureMap(1, Map.Felucca)); PlaceItemIn(cont, 45, 35, new TreasureMap(2, Map.Felucca)); PlaceItemIn(cont, 60, 35, new TreasureMap(3, Map.Felucca)); PlaceItemIn(cont, 75, 35, new TreasureMap(4, Map.Felucca)); PlaceItemIn(cont, 90, 35, new TreasureMap(5, Map.Felucca)); PlaceItemIn(cont, 90, 35, new TreasureMap(6, Map.Felucca)); PlaceItemIn(cont, 30, 50, new TreasureMap(1, Map.Felucca)); PlaceItemIn(cont, 45, 50, new TreasureMap(2, Map.Felucca)); PlaceItemIn(cont, 60, 50, new TreasureMap(3, Map.Felucca)); PlaceItemIn(cont, 75, 50, new TreasureMap(4, Map.Felucca)); PlaceItemIn(cont, 90, 50, new TreasureMap(5, Map.Felucca)); PlaceItemIn(cont, 90, 50, new TreasureMap(6, Map.Felucca)); PlaceItemIn(cont, 55, 100, new Lockpick(30)); PlaceItemIn(cont, 60, 100, new Pickaxe()); PlaceItemIn(bank, 98, 124, cont); // End bag of treasure maps // Begin bag of raw materials cont = new Bag(); cont.Hue = 0x835; cont.Name = "Raw Materials Bag"; PlaceItemIn(cont, 92, 84, new Leather(5000)); PlaceItemIn(cont, 30, 118, new Cloth(5000)); PlaceItemIn(cont, 30, 84, new Board(5000)); PlaceItemIn(cont, 57, 80, new BlankScroll(500)); PlaceItemIn(cont, 30, 35, new DullCopperIngot(5000)); PlaceItemIn(cont, 37, 35, new ShadowIronIngot(5000)); PlaceItemIn(cont, 44, 35, new CopperIngot(5000)); PlaceItemIn(cont, 51, 35, new BronzeIngot(5000)); PlaceItemIn(cont, 58, 35, new GoldIngot(5000)); PlaceItemIn(cont, 65, 35, new AgapiteIngot(5000)); PlaceItemIn(cont, 72, 35, new VeriteIngot(5000)); PlaceItemIn(cont, 79, 35, new ValoriteIngot(5000)); PlaceItemIn(cont, 86, 35, new IronIngot(5000)); PlaceItemIn(bank, 98, 169, cont); // End bag of raw materials // Begin bag of spell casting stuff cont = new Backpack(); cont.Hue = 0x480; cont.Name = "Spell Casting Stuff"; PlaceItemIn(cont, 45, 105, new Spellbook(UInt64.MaxValue)); Runebook runebook = new Runebook(10); runebook.CurCharges = runebook.MaxCharges; PlaceItemIn(cont, 145, 105, runebook); Item toHue = new BagOfReagents(150); toHue.Hue = 0x2D; PlaceItemIn(cont, 45, 150, toHue); for (int i = 0; i < 9; ++i) { PlaceItemIn(cont, 45 + (i * 10), 75, new RecallRune()); } PlaceItemIn(bank, 78, 169, cont); // End bag of spell casting stuff // Begin bag of ethereals cont = new Backpack(); cont.Hue = 0x490; cont.Name = "Bag Of Ethy's!"; PlaceItemIn(cont, 45, 66, new EtherealHorse()); PlaceItemIn(cont, 69, 82, new EtherealOstard()); PlaceItemIn(cont, 93, 99, new EtherealLlama()); PlaceItemIn(cont, 117, 115, new EtherealKirin()); PlaceItemIn(cont, 45, 132, new EtherealUnicorn()); PlaceItemIn(cont, 69, 66, new EtherealRidgeback()); PlaceItemIn(cont, 93, 82, new EtherealSwampDragon()); PlaceItemIn(cont, 117, 99, new EtherealBeetle()); PlaceItemIn(bank, 38, 124, cont); // End bag of ethereals for (int i = 0; i < 10; i++) { PlaceItemIn(cont, 117, 128, new MessageInABottle(Map.Felucca, 4)); } PlaceItemIn(bank, 18, 124, cont); }
internal void TrackChanges() { _defaultProperties = Bag.ToArray(); Bag.Clear(); }
this Bag <I> input, Func <I, string> getKey, Func <I, T> getElement, Func <T, T, T> reduce) => input.GroupBy(getKey, getElement, reduce, CreateEnumerable);
this Bag <T> input, Func <T, string> getKey, Func <T, T, T> reduce) => input.GroupBy(getKey, v => v, reduce);
/** * Factory method to create a synchronized bag. * * @param bag the bag to decorate, must not be null * @return a new synchronized Bag * @throws IllegalArgumentException if bag is null */ public static Bag decorate(Bag bag) { return(new SynchronizedBag(bag)); }
public KnapsackFitnessFunction(Bag bag, List <Item> items) { _bag = bag; _items = items; }
public JukaMage() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4) { this.Name = "a juka mage"; this.Body = 765; this.SetStr(201, 300); this.SetDex(71, 90); this.SetInt(451, 500); this.SetHits(121, 180); this.SetDamage(4, 10); this.SetDamageType(ResistanceType.Physical, 100); this.SetResistance(ResistanceType.Physical, 20, 30); this.SetResistance(ResistanceType.Fire, 35, 45); this.SetResistance(ResistanceType.Cold, 30, 40); this.SetResistance(ResistanceType.Poison, 10, 20); this.SetResistance(ResistanceType.Energy, 35, 45); this.SetSkill(SkillName.Anatomy, 80.1, 90.0); this.SetSkill(SkillName.EvalInt, 80.2, 100.0); this.SetSkill(SkillName.Magery, 99.1, 100.0); this.SetSkill(SkillName.Meditation, 80.2, 100.0); this.SetSkill(SkillName.MagicResist, 140.1, 150.0); this.SetSkill(SkillName.Tactics, 80.1, 90.0); this.SetSkill(SkillName.Wrestling, 80.1, 90.0); this.Fame = 15000; this.Karma = -15000; this.VirtualArmor = 16; Container bag = new Bag(); int count = Utility.RandomMinMax(10, 20); for (int i = 0; i < count; ++i) { Item item = Loot.RandomReagent(); if (item == null) { continue; } if (!bag.TryDropItem(this, item, false)) { item.Delete(); } } this.PackItem(bag); this.PackItem(new ArcaneGem()); if (Core.ML && Utility.RandomDouble() < .33) { this.PackItem(Engines.Plants.Seed.RandomPeculiarSeed(4)); } this.m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(2, 5)); }
public void Empty_ReferenceType_Null() { Bag <string> bag = Bag <string> .Empty; Assert.Equal(null, bag.Value); }
public static Bag <T> GroupBy <T, I, V>( this Bag <I> input, Func <I, string> getKey, Func <I, V> getElement, Func <V, V, V> reduce, Func <(string Key, V Value), IEnumerable <T> > getResult)