/// <summary> /// /// </summary> public async void Update() { await Task.Run(() => { Balance = Blockchain.Instance.GetBalance(Address); if (HasMirrorAddress) { Shifts = Blockchain.Instance.GetShifts(MirrorAddress); if (Shifts.Count > 0) { Mogwai = new Mogwai(Address, Shifts); } } if (Mogwai != null) { MogwaiKeysState = MogwaiKeysState.BOUND; } else if (Balance > 1.0001m && MogwaiKeysState != MogwaiKeysState.CREATE) { MogwaiKeysState = MogwaiKeysState.READY; } else if (Balance < 1.0001m && MogwaiKeysState != MogwaiKeysState.WAIT) { MogwaiKeysState = MogwaiKeysState.NONE; } }); }
public CustomAdventureStats(Mogwai mogwai, int width, int height) : base("Adventure Extension", "This is a temp. summary expect more here", width, height) { _pictureFont = Global.LoadFont("AutoReiv.font").GetFont(Font.FontSizes.Quarter); _statsFont = Global.LoadFont("AutoReiv.font").GetFont(Font.FontSizes.One); //var pictureFont = Global.FontDefault; _base = new Console(width, height) { Position = new Point(0, 0) }; Children.Add(_base); _statsConsole = new Console(width, height) { Position = new Point(2, 2), Font = _statsFont }; Children.Add(_statsConsole); _rewardConsole = new Console(27, 9) { Position = new Point(5, 26), Font = _statsFont }; Children.Add(_rewardConsole); _mogwai = mogwai; }
public CustomAdventure(MogwaiController mogwaiController, MogwaiKeys mogwaiKeys, int width, int height) : base("Adventure", "", width, height) { _controller = mogwaiController; _mogwaiKeys = mogwaiKeys; _mogwai = _mogwaiKeys.Mogwai; _adventureFont = Global.LoadFont("Phoebus16.font").GetFont(Font.FontSizes.One); //_mapConsole = new Console(75, 75) { Position = new Point(17, 2) }; _mapConsole = new Console(100, 100) { Position = new Point(-24, 0), Font = _adventureFont, IsVisible = false }; Children.Add(_mapConsole); _entityManager = new SadConsole.Entities.EntityManager { Parent = _mapConsole }; _statsConsole = new MogwaiConsole("stats", "", 21, 6) { Position = new Point(70, 16) }; _statsConsole.Fill(DefaultForeground, new Color(10, 10, 10, 230), null); Children.Add(_statsConsole); }
public SpellTest() { var lvlCleric = new LevelingAction(LevelingType.Class, ClassType.Cleric, 0, 1); var pubMogAddressHex = HexHashUtil.ByteArrayToString(Base58Encoding.Decode(MogAddress)); var creation = new Shift(0, 1530914381, pubMogAddressHex, 2000, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", 1.00m, 0.0001m); Assert.True(creation.History != null); var level = new Shift(1, 1530914381, pubMogAddressHex, 2001, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", lvlCleric.GetValue1(), lvlCleric.GetValue2()); Assert.True(level.History != null); var shifts = new Dictionary <long, Shift> { { 2000, creation }, { 2001, level } }; Mogwai = new Mogwai(MogAddress, shifts); }
/// <summary> /// /// </summary> /// <param name="mogwai"></param> private void DeployMogwai(Mogwai mogwai) { // TODO generate monsters from shift here var mogCoord = new Coord(0, 0); for (var x = 0; x < Map.Width; x++) { var found = false; for (var y = 0; y < Map.Height; y++) { if (Map.WalkabilityMap[x, y]) { mogCoord = new Coord(x, y); found = true; break; } } if (found) { break; } } Map.AddEntity(mogwai, mogCoord.X, mogCoord.Y); }
private void PrintWeapons(int x, int y, Mogwai mogwai) { if (mogwai.Equipment.WeaponSlots.Count < 1) { return; } Weapon primary = mogwai.Equipment.WeaponSlots[0].PrimaryWeapon; Print(x, y, "P:", Color.Gainsboro); Print(x + 3, y, primary.Name, Color.Orange); Print(x + 18, y, new ColoredString($"[c:r f:limegreen]{primary.MinDmg} [c:r f:gainsboro]- [c:r f:limegreen]{primary.MaxDmg} [c:r f:gainsboro]DMG".PadLeft(11))); if (mogwai.Equipment.WeaponSlots[0].SecondaryWeapon == null) { Print(x, y + 1, "S:", Color.Gainsboro); Print(x + 3, y + 1, "None", Color.Gray); return; } Weapon secondary = mogwai.Equipment.WeaponSlots[0].SecondaryWeapon; Print(x, y + 1, "S:", Color.Gainsboro); Print(x + 3, y + 1, secondary.Name, Color.Orange); Print(x + 18, y + 1, new ColoredString($"[c:r f:limegreen]{secondary.MinDmg} [c:r f:gainsboro]- [c:r f:limegreen]{secondary.MaxDmg} [c:r f:gainsboro]DMG".PadLeft(11))); }
static DungeonTest() { var json = Encoding.UTF8.GetString(WoMFrameworkTest.Properties.Resources.mogwai); TestShifts = JsonConvert.DeserializeObject <Dictionary <double, Shift> >(json); TestMog = new Mogwai("MJHYMxu2kyR1Bi4pYwktbeCM7yjZyVxt2i", TestShifts); }
public override void CreateEntities(Mogwai mogwai, Shift shift) { mogwai.Reset(); mogwai.AdventureEntityId = NextId; Entities.Add(mogwai.AdventureEntityId, mogwai); var adjCr = GetChallengeRating(); var monsterSet = Monsters.Instance.AllBuilders() .Where(p => (p.EnvironmentTypes.Contains(EnvironmentType.Any) || p.EnvironmentTypes.Contains(EnvironmentType.Undergrounds)) && p.ChallengeRating <= adjCr).ToList(); var totXpAmount = 500 * Math.Pow(adjCr, 2); var allMonsters = new List <MonsterBuilder>(); for (var i = 0; i < 100 && totXpAmount > 0; i++) { var mob = monsterSet[DungeonRandom.Next(monsterSet.Count)]; allMonsters.Add(mob); totXpAmount -= mob.Experience; } // make sure there are at least 7 mobs in the dungeon if (Entities.Count < 7) { var subMonsterSet = monsterSet.Where(p => p.ChallengeRating <= 0.5).ToList(); if (subMonsterSet.Count > 0) { for (var i = 0; i < 10; i++) { var mob = subMonsterSet[DungeonRandom.Next(subMonsterSet.Count)]; allMonsters.Add(mob); } } } var maxCr = allMonsters.Max(p => p.ChallengeRating); var potentialBosses = allMonsters.Where(p => p.ChallengeRating == maxCr).ToList(); var boss = potentialBosses[DungeonRandom.Next(potentialBosses.Count)].Build(); boss.AdventureEntityId = NextId; boss.Initialize(new Dice(shift, 1)); Entities.Add(boss.AdventureEntityId, boss); var monsterMod = 100; foreach (var monsterBuilder in allMonsters) { var mob = monsterBuilder.Build(); mob.AdventureEntityId = NextId; mob.Initialize(new Dice(shift, monsterMod++)); Entities.Add(mob.AdventureEntityId, mob); } // exploration order _explorationOrder = EntitiesList.OrderBy(p => p.Inteligence).ThenBy(p => p.SizeType).ToList(); }
private void PrintArmor(int x, int y, Mogwai mogwai) { if (!(mogwai.Equipment.GetItemInSlot(SlotType.Armor) is Armor armor)) { return; } Print(x, y, "A:", Color.Gainsboro); Print(x + 3, y, armor.Name.Substring(0, 15), Color.Orange); Print(x + 20, y, new ColoredString($"[c:r f:limegreen]{armor.ArmorBonus} [c:r f:gainsboro]AC [c:r f:red]{armor.ArmorCheckPenalty}".PadLeft(11))); }
public EntityTest() { string pubMogAddressHex = HexHashUtil.ByteArrayToString(Base58Encoding.Decode(MogAddress)); var lvlClass1 = new LevelingAction(LevelingType.Class, ClassType.Barbarian, 0, 1); var creation1 = new Shift(0, 1530914381, pubMogAddressHex, 2000, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", 1.00m, 0.0001m); Assert.True(creation1.History != null); var level1 = new Shift(1, 1530914381, pubMogAddressHex, 2001, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", lvlClass1.GetValue1(), lvlClass1.GetValue2()); Assert.True(level1.History != null); var shifts1 = new Dictionary <long, Shift> { { 2000, creation1 }, { 2001, level1 } }; Mogwai1 = new Mogwai(MogAddress, shifts1); var lvlClass2 = new LevelingAction(LevelingType.Class, ClassType.Sorcerer, 0, 1); var creation2 = new Shift(0, 1530914381, pubMogAddressHex, 2000, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", 1.00m, 0.0001m); Assert.True(creation2.History != null); var level2 = new Shift(1, 1530914381, pubMogAddressHex, 2001, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", lvlClass2.GetValue1(), lvlClass2.GetValue2()); Assert.True(level2.History != null); var shifts2 = new Dictionary <long, Shift> { { 2000, creation2 }, { 2001, level2 } }; Mogwai2 = new Mogwai(MogAddress, shifts2); }
public PlayStatsConsole(Mogwai mogwai, int width, int height) : base(width, height) { _mogwai = mogwai; _borderSurface = new Basic(width + 2, height + 2, Font); _borderSurface.DrawBox(new Rectangle(0, 0, _borderSurface.Width, _borderSurface.Height), new Cell(Color.DarkCyan, Color.Black), null, ConnectedLineThick); _borderSurface.Position = new Point(-1, -1); Children.Add(_borderSurface); Init(); }
public override void Enter(Mogwai mogwai, Shift shift) { if (AdventureState == AdventureState.Preparation) { CreateEntities(mogwai, shift); Prepare(mogwai, shift); AdventureState = AdventureState.Running; } EvaluateAdventureState(); }
public MogwaiTest() { var address = "MJHYMxu2kyR1Bi4pYwktbeCM7yjZyVxt2i"; var pubMogAddressHex = HexHashUtil.ByteArrayToString(Base58Encoding.Decode(address)); Mogwai = new Mogwai(address, new Dictionary <long, Shift> { { 1001, new Shift(0, 1530914381, pubMogAddressHex, 1001, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", 1.00m, 0.0001m) } }); }
public CustomAdventureChoose(MogwaiController mogwaiController, int width, int height) : base("Adventure", "select your adventure", width, height) { _controller = mogwaiController; MogwaiKeys mogwaiKeys = _controller.CurrentMogwaiKeys ?? _controller.TestMogwaiKeys(); _mogwai = mogwaiKeys.Mogwai; _consoleList = new List <MogwaiChooseButton>(); _currentAdventureType = AdventureType.Dungeon; _currentDifficultyType = DifficultyType.Easy; _currentCost = 0; Init(); }
/// <summary> /// /// </summary> /// <param name="mogwai"></param> /// <param name="shift"></param> public override void Prepare(Mogwai mogwai, Shift shift) { // deploy monster, monster packs DeployMonsters(shift); // deploy boss monsters // deploy treasures DeployTreasures(shift); // deploy traps // deploy npc // deploy quests // deploy mogwai DeployMogwai(mogwai); }
private MogwaiKeys GetKeysFor(string key, string mirrorKey) { Dictionary <long, Shift> shifts = Blockchain.Instance.GetShifts(mirrorKey); var mogwai = new Mogwai(key, shifts); return(new MogwaiKeys { Mogwai = mogwai, Balance = 2.1234m, IsUnwatched = false, LastUpdated = DateTime.Now, MogwaiKeysState = MogwaiKeysState.Bound, Shifts = shifts }); }
public override void CreateEntities(Mogwai mogwai, Shift shift) { mogwai.AdventureEntityId = NextId; Entities.Add(mogwai.AdventureEntityId, mogwai); var rat1 = Monsters.Instance.ByName("Rat"); rat1.AdventureEntityId = NextId; rat1.Initialize(new Dice(shift, 1)); Entities.Add(rat1.AdventureEntityId, rat1); var rat2 = Monsters.Instance.ByName("Rat"); rat2.AdventureEntityId = NextId; rat2.Initialize(new Dice(shift, 2)); Entities.Add(rat2.AdventureEntityId, rat2); }
/// <summary> /// /// </summary> public async Task Update() { await Task.Run(() => { Balance = Blockchain.Instance.GetBalance(Address); if (HasMirrorAddress) { Shifts = Blockchain.Instance.GetShifts(MirrorAddress); if (Shifts.Count > 0) { if (Mogwai != null) { Mogwai.UpdateShifts(Shifts); } else { Mogwai = new Mogwai(Address, Shifts); } // Updated interaction locks foreach (Shift shift in Shifts.Values) { if (!shift.IsSmallShift && InteractionLock.ContainsKey(shift.TxHex)) { InteractionLock.Remove(shift.TxHex); } } } } if (Mogwai != null) { MogwaiKeysState = MogwaiKeysState.Bound; } else if (Balance > 1.0001m && MogwaiKeysState != MogwaiKeysState.Create) { MogwaiKeysState = MogwaiKeysState.Ready; } else if (Balance < 1.0001m && MogwaiKeysState != MogwaiKeysState.Wait) { MogwaiKeysState = MogwaiKeysState.None; } LastUpdated = DateTime.Now; }); }
public HomeTownTest() { var pubMogAddressHex = HexHashUtil.ByteArrayToString(Base58Encoding.Decode(MogAddress)); var creation = new Shift(0, 1530914381, pubMogAddressHex, 2000, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", 1.00m, 0.0001m); Assert.True(creation.History != null); var shifts = new Dictionary <long, Shift> { { 2000, creation } }; Mogwai = new Mogwai(MogAddress, shifts); }
public override void Enter(Mogwai mogwai, Shift shift) { if (AdventureState == AdventureState.Preparation) { CreateEntities(mogwai, shift); Prepare(mogwai, shift); AdventureState = AdventureState.Running; } // TODO implement dungeons to go over multiple blocks if (AdventureState == AdventureState.Extended) { CurrentBlockRound = 0; //Prepare(mogwai, shift); AdventureState = AdventureState.Running; } EvaluateAdventureState(); }
public CustomShop(Mogwai mogwai, int width, int height) : base("Home Town Shop", "", width, height) { _mogwai = mogwai; Fill(DefaultForeground, new Color(100, 0, 200, 150), null); _controlsConsole = new ControlsConsole(26, 20) { Position = new Point(1, 1) }; _controlsConsole.Fill(Color.Transparent, new Color(100, 0, 200, 150), null); Children.Add(_controlsConsole); _itemConsole = new MogwaiConsole("Item", "", 50, 20) { Position = new Point(30, 1) }; //_itemConsole.Fill(Color.Transparent, Color.DarkKhaki, null); Children.Add(_itemConsole); Init(); }
public DungeonTest() { var address = "MJHYMxu2kyR1Bi4pYwktbeCM7yjZyVxt2i"; var pubMogAddressHex = HexHashUtil.ByteArrayToString(Base58Encoding.Decode(address)); var shifts = new Dictionary <long, Shift> { { 1001, new Shift(0, 1530914381, pubMogAddressHex, 1001, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", 1.00m, 0.0001m) }, { 1002, new Shift(1, 1535295740, pubMogAddressHex, 1002, "0000000033dbfc3cc9f3671ba28b41ecab6f547219bb43174cc97bf23269fa88", 1, "db5639553f9727c42f80c22311bd8025608edcfbcfc262c0c2afe9fc3f0bcb29", 0.01040003m, 0.00001002m) } }; Mogwai = new Mogwai("MJHYMxu2kyR1Bi4pYwktbeCM7yjZyVxt2i", shifts); }
public async Task EvolveMogwai() { await Task.Run(() => { if (CurrentMogwai == null) { return; } CurrentMogwaiKeys.IsLocked = true; Mogwai mogwai = CurrentMogwai; while (mogwai.Evolve()) { while (mogwai.CanEvolveAdventure) { mogwai.EvolveAdventure(); } } CurrentMogwaiKeys.IsLocked = false; }); }
public override void Prepare(Mogwai mogwai, Shift shift) { var coords = new List <Coord>(); Map.AddEntity(mogwai, 4, 4); mogwai.CurrentInitiative = mogwai.InitiativeRoll; mogwai.EngagedEnemies = new List <Entity>(); mogwai.EngagedEnemies.AddRange(MonstersList); coords.AddRange(new RadiusAreaProvider(mogwai.Coordinate, 1, Radius.CIRCLE).CalculatePositions().ToList()); foreach (var monster in MonstersList) { monster.CurrentInitiative = monster.InitiativeRoll; monster.EngagedEnemies = new List <Entity>(); monster.EngagedEnemies.AddRange(HeroesList); monster.Adventure = mogwai.Adventure; var getAPlace = coords[1]; Map.AddEntity(monster, getAPlace.X, getAPlace.Y); coords.Remove(getAPlace); } _initiativeOrder = EntitiesList.OrderBy(s => s.CurrentInitiative).ThenBy(s => s.Dexterity).ToList(); }
public override void CreateEntities(Mogwai mogwai, Shift shift) { mogwai.Reset(); mogwai.AdventureEntityId = NextId; Entities.Add(mogwai.AdventureEntityId, mogwai); var adjCr = GetChallengeRating(); //var monsterSet = Monsters.Instance.AllBuilders() // .Where(p => (p.EnvironmentTypes.Contains(EnvironmentType.Any) // || p.EnvironmentTypes.Contains(EnvironmentType.Undergrounds)) // && p.ChallengeRating <= adjCr).ToList(); // TODO work here again and replace it with a real algorithm or make it dungeon dependend. var monsterSet = new List <MonsterBuilder>() { IceCave.BunnyRat, IceCave.BearWarrior, IceCave.CrystalGuardian, IceCave.GoblinFrost, IceCave.GoblinMage, IceCave.GoblinTorch, IceCave.GoblinVenom, IceCave.ThreeTailedWolf, IceCave.SnowMonster }; var totXpAmount = 500 * Math.Pow(adjCr, 2); var allMonsters = new List <MonsterBuilder>(); for (var i = 0; i < 100 && totXpAmount > 0; i++) { MonsterBuilder mob = monsterSet[DungeonRandom.Next(monsterSet.Count)]; allMonsters.Add(mob); totXpAmount -= mob.Experience; } // make sure there are at least 7 mobs in the dungeon if (allMonsters.Count < 7) { var subMonsterSet = monsterSet.Where(p => p.ChallengeRating <= 0.5).ToList(); if (subMonsterSet.Count > 0) { for (var i = 0; i < 10; i++) { MonsterBuilder mob = subMonsterSet[DungeonRandom.Next(subMonsterSet.Count)]; allMonsters.Add(mob); } } } var maxCr = allMonsters.Max(p => p.ChallengeRating); var potentialBosses = allMonsters.Where(p => p.ChallengeRating == maxCr).ToList(); Monster boss = potentialBosses[DungeonRandom.Next(potentialBosses.Count)].Build(); boss.AdventureEntityId = NextId; boss.Initialize(new Dice(shift, 1)); Entities.Add(boss.AdventureEntityId, boss); BossKeys.Add(boss.AdventureEntityId); var monsterMod = 100; foreach (MonsterBuilder monsterBuilder in allMonsters) { Monster mob = monsterBuilder.Build(); mob.AdventureEntityId = NextId; mob.Initialize(new Dice(shift, monsterMod++)); Entities.Add(mob.AdventureEntityId, mob); } // exploration order _explorationOrder = EntitiesList.OrderBy(p => p.Intelligence).ThenBy(p => p.SizeType).ToList(); }
public void Dispose() { Mogwai = null; }
public MogwaiKeys TestMogwaiKeys() { //return GetKeysFor("M9whXm2mjrhySAH6D81Lk5mthw1mUEZpvi", "MGJ9VoguyKeRTYmpURgztife4N7PnuDH6u"); var lvlBarbarian = new LevelingAction(LevelingType.Class, ClassType.Barbarian, 0, 1); var lvlCleric = new LevelingAction(LevelingType.Class, ClassType.Cleric, 0, 1); var lvlSorcerer = new LevelingAction(LevelingType.Class, ClassType.Sorcerer, 0, 1); var dungAction = new AdventureAction(AdventureType.Dungeon, DifficultyType.Easy, 2); var healAction = new SpecialAction(SpecialType.Heal, SpecialSubType.None, CostType.Medium); var revivingAction = new SpecialAction(SpecialType.Reviving, SpecialSubType.None, CostType.High); var pubMogAddressHex = HexHashUtil.ByteArrayToString(Base58Encoding.Decode("MJHYMxu2kyR1Bi4pYwktbeCM7yjZyVxt2i")); var blockHeight = 84659; var index = 0; var shifts = new Dictionary <long, Shift> { { blockHeight, new Shift(index++, 1530914381, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", 1.00m, 0.0001m) }, { blockHeight, new Shift(index++, 1530914381, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", lvlSorcerer.GetValue1(), lvlSorcerer.GetValue2()) }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, 1539810141, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "cbcd39553f9727c434343222f1bd8025608edcfbcfc262c0c2afe9fc3f0bcb29", lvlBarbarian.GetValue1(), lvlBarbarian.GetValue2()) }, { blockHeight, new Shift(index++, 1539815141, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bff29", healAction.GetValue1(), healAction.GetValue2()) }, { blockHeight, new Shift(index++, 1540417599, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000b552e9c7c51ed793f87c51b2cc945fbb222efd6cec17666a5ecd18a5", 1, "cb03db5029f426ed517fdfffd6a90c99a3111f2254f41f9a8f56320076b1f0e3", dungAction.GetValue1(), dungAction.GetValue2()) }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f547219bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163dc3671ba28b41ecab6f547219bb43174cc97bf2164d2e30") }, { blockHeight, new Shift(index++, 1555309745, "32ab20cfbef0ccddfe5c79e726f5fc48b151106f196f7ccb71", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bdf29", revivingAction.GetValue1(), revivingAction.GetValue2()) }, { blockHeight, new Shift(index++, 1539815141, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bff29", healAction.GetValue1(), healAction.GetValue2()) }, { blockHeight, new Shift(index++, 1539810141, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "cbcd39553f9727c434343222f1bd8025608edcfbcfc262c0c2afe9fc3f0bcb29", lvlSorcerer.GetValue1(), lvlSorcerer.GetValue2()) }, { blockHeight, new Shift(index++, 1540985507, "32ab20cfbef0ccddfe5c79e726f5fc48b151106f196f7ccb71", blockHeight++, "00000000b2204f48bb8d48542a6ada13bc86dde4d2909563fdb8f46389d1a1d2", 1, "01d8c163c4f034f7d1f8d7e94fc9fc9a30bbef1aa41c2e03dab29787588c60c4", dungAction.GetValue1(), dungAction.GetValue2()) }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163db3671ba28b41ecab6f547219bb43174cc97bf2164d2e31") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163db3671ba28b41ecab6f547219bb43174cc97bf2164d2e31") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163db3671ba28b41ecab6f547219bb43174cc97bf2164d2e31") }, { blockHeight, new Shift(index++, 1555309745, "32ab20cfbef0ccddfe5c79e726f5fc48b151106f196f7ccb71", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bdf29", revivingAction.GetValue1(), revivingAction.GetValue2()) }, { blockHeight, new Shift(index++, 1556309745, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bff29", healAction.GetValue1(), healAction.GetValue2()) }, { blockHeight, new Shift(index++, 1557309745, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "cbcd39553f9727c434343222f1bd8025608edcfbcfc262c0c2afe9fc3f0bcb29", lvlSorcerer.GetValue1(), lvlSorcerer.GetValue2()) }, { blockHeight, new Shift(index++, 1541350482, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000341eea3f27e4ddaf72253cd6a35f54ece70fdeee0906a663f8403a60", 1, "302e37f0c69b1b037bc178fce6f8493a76a4c844df5391a0a46e81fcad8657c8", 0.01042002m, 0.00019003m) }, }; for (var i = 0; i < 30; i++) { shifts.Add(blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39")); } for (var i = 0; i < 10; i++) { shifts.Add(blockHeight, new Shift(index++, 1530914381, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", lvlBarbarian.GetValue1(), lvlBarbarian.GetValue2())); } var dungActionNext = new AdventureAction(AdventureType.Dungeon, DifficultyType.Easy, 8); shifts.Add(blockHeight, new Shift(index++, 1540417599, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000b552e9c7c51ed793f87c51b2cc945fbb222efd6cec17666a5ecd18a5", 1, "cb03db5029f426ed517fdfffd6a90c99a3111f2254f41f9a8f56320076b1f0e3", dungActionNext.GetValue1(), dungActionNext.GetValue2())); // var shifts = new Dictionary<long, Shift> // { // { // 1001, new Shift(0, 1530914381, pubMogAddressHex, // 1001, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", // 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", // 1.00m, // 0.0001m) // }, // { // 1002, new Shift(1, 1535295740, pubMogAddressHex, // 1002, "0000000033dbfc3cc9f3671ba28b41ecab6f547219bb43174cc97bf23269fa88", // 1, "db5639553f9727c42f80c22311bd8025608edcfbcfc262c0c2afe9fc3f0bcb29", // 0.01040003m, // 0.00001002m) // }, // { // 1003, new Shift(2, pubMogAddressHex, // 1003, "0000000033dbfc3cc9f3671ba28b41ecab6f547219bb43174cc97bf2163d2e38") // }, // { // 1004, new Shift(3, pubMogAddressHex, // 1004, "0000000033dbfc163df3671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1005, new Shift(4, pubMogAddressHex, // 1005, "0000000033dbfc163de3671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1006, new Shift(5, pubMogAddressHex, // 1006, "0000000033dbfc163dc3671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1007, new Shift(6, pubMogAddressHex, // 1007, "0000000033dbfc163db3671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1008, new Shift(7, pubMogAddressHex, // 1008, "0000000033dbfc163def671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1009, new Shift(8, pubMogAddressHex, // 1009, "0000000033dbfc163dff671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1010, new Shift(9, 1555295740, pubMogAddressHex, // 1010, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", // 1, "cbcd39553f9727c434343222f1bd8025608edcfbcfc262c0c2afe9fc3f0bcb29", // lvlAction.GetValue1(), // lvlAction.GetValue2()) // }, // { // 1011, new Shift(10, pubMogAddressHex, // 1011, "0000000033dbfc163dff671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1012, new Shift(11, 1555299745, pubMogAddressHex, // 1012, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", // 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bcf29", // dungAction.GetValue1(), // dungAction.GetValue2()) // }, // { // 1013, new Shift(12, 1555309745, pubMogAddressHex, // 1013, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", // 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bdf29", // revivingAction.GetValue1(), // revivingAction.GetValue2()) // }, // { // 1014, new Shift(13, 1555329745, pubMogAddressHex, // 1014, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", // 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bff29", // healAction.GetValue1(), // healAction.GetValue2()) // }, // { // 1015, new Shift(14, 1539810141, "328b742623b139b29553d0c2cc2c785ed8feff324a37a6bc41", // 75422, "000000004eb637ffbdb8674dbe5ff5c339a50b0dac1723f1df44b7b790746a6e", // 1, "7876fde772cae5684ad133a007c92f5f209cc91fdc1814fe3dab2c6174557ea7", // 0.01042002m, // 0.00020002m) // } //}; var mogwai = new Mogwai("MJHYMxu2kyR1Bi4pYwktbeCM7yjZyVxt2i", shifts); return(new MogwaiKeys { Mogwai = mogwai, Balance = 2.1234m, IsUnwatched = false, LastUpdated = DateTime.Now, MogwaiKeysState = MogwaiKeysState.Bound, Shifts = shifts }); }
public abstract void NextStep(Mogwai mogwai, Shift shift);
public abstract void Enter(Mogwai mogwai, Shift shift);
private void PrintWealth(int x, int y, Mogwai mogwai) { Print(x, y, mogwai.Wealth.Gold.ToString().PadLeft(7), Color.White); Print(x + 8, y, "Gold", Color.Yellow); }