static void InitLevel3() { Rogue.level_target = "目标:消灭Boss!"; Rogue.AddMonster(3, 3, Rogue.random.Next(1, 3), 10); Rogue.AddMonster(15, 20, Rogue.random.Next(1, 3), 10); Rogue.AddMonster(20, 1, Rogue.random.Next(2, 4), 10); Monster boss1 = Rogue.AddMonster(Rogue.map_width / 2, Rogue.map_height - 1, 90); boss1.attack = 8; Merchant merchant = new Merchant("尖嘴猴腮的胖子", 200); merchant.SetPos(Rogue.map_width - 1, Rogue.map_height - 1); Rogue.npcs[MapPos(merchant.x, merchant.y)] = merchant; Rogue.onMonsterDead = (Monster monster) => { if (monster.id == 202) { Rogue.OnStageClear(); return(true); } if (monster == boss1) { merchant.SetState(2); return(true); } MonsterDropMoney(monster); int pos = Rogue.RandPos(); int x, y; MapXY(pos, out x, out y); if (Rogue.player.level < 9 && Rogue.player.money < 100) { Rogue.AddMonster(x, y, Rogue.player.level + 2, (Rogue.player.level + 1) * 10); } return(true); }; }
static void InitLevel4() { Rogue.level_target = "找到正真的公主"; Rogue.AddMonster(13, 0, 1); Rogue.AddMonster(8, 5, 3); Rogue.AddMonster(21, 5, 12, 100); Rogue.AddMonster(8, 10, 80, 100); //Rogue.AddMonster(21, 10, 13); Rogue.AddMonster(21, 8, 1000); Rogue.AddMonster(8, 8, 90); for (int i = 0; i < 9; i++) { Walls wall = new Walls(); wall.SetPos(i, 6); Rogue.walls[MapPos(wall.x, wall.y)] = wall; } for (int i = 0; i < 5; i++) { Walls wall = new Walls(); wall.SetPos(8, i); Rogue.walls[MapPos(wall.x, wall.y)] = wall; } for (int i = 0; i < 9; i++) { Walls wall = new Walls(); wall.SetPos(i, 9); Rogue.walls[MapPos(wall.x, wall.y)] = wall; } for (int i = 11; i < 15; i++) { Walls wall = new Walls(); wall.SetPos(8, i); Rogue.walls[MapPos(wall.x, wall.y)] = wall; } for (int i = 21; i < 27; i++) { Walls wall = new Walls(); wall.SetPos(i, 6); Rogue.walls[MapPos(wall.x, wall.y)] = wall; } for (int i = 28; i < 30; i++) { Walls wall = new Walls(); wall.SetPos(i, 6); Rogue.walls[MapPos(wall.x, wall.y)] = wall; } for (int i = 21; i < 30; i++) { Walls wall = new Walls(); wall.SetPos(i, 9); Rogue.walls[MapPos(wall.x, wall.y)] = wall; } for (int i = 0; i < 5; i++) { Walls wall = new Walls(); wall.SetPos(21, i); Rogue.walls[MapPos(wall.x, wall.y)] = wall; } for (int i = 11; i < 15; i++) { Walls wall = new Walls(); wall.SetPos(21, i); Rogue.walls[MapPos(wall.x, wall.y)] = wall; } Walls walls = new Walls(); walls.SetPos(21, 7); Rogue.walls[MapPos(walls.x, walls.y)] = walls; Walls walls2 = new Walls(); walls2.SetPos(8, 7); Rogue.walls[MapPos(walls2.x, walls.y)] = walls2; OldMan oldman = new OldMan("传说中的人物", 101); oldman.SetPos(0, 0); Rogue.npcs[MapPos(oldman.x, oldman.y)] = oldman; Merchant merchant = new Merchant("奇怪的东西", 201); merchant.SetPos(21, 10);//21 Rogue.npcs[MapPos(merchant.x, merchant.y)] = merchant; Merchant merchant2 = new Merchant("商人", 200); merchant2.SetPos(Rogue.map_width - 1, 0); Rogue.npcs[MapPos(merchant2.x, merchant2.y)] = merchant2; Princess gongzhu = new Princess("美丽善良的公主", 300); gongzhu.SetPos(Rogue.map_width - 1, 7); Rogue.princess[MapPos(gongzhu.x, gongzhu.y)] = gongzhu; Princess2 gongzhu2 = new Princess2("邪恶的公主", 300); gongzhu2.SetPos(0, 7); Rogue.princess[MapPos(gongzhu2.x, gongzhu2.y)] = gongzhu2; Dabaojian equipment = new Dabaojian("宝剑", 300); equipment.SetPos(Rogue.map_width - 1, Rogue.map_height - 1); Rogue.equipments[MapPos(equipment.x, equipment.y)] = equipment; Monster boss1 = Rogue.AddMonster(0, Rogue.map_height - 1, 140); boss1.attack = 50; Rogue.onMonsterDead = (Monster monster) => { if (Rogue.monsters.Count() <= 1) { Rogue.OnStageClear(); } if (monster == boss1) { merchant.SetState(2); return(true); } MonsterDropMoney(monster); int pos = Rogue.RandPos2(); int x, y; MapXY(pos, out x, out y); if (Rogue.player.level < 2) { Rogue.AddMonster(x, y, Rogue.player.level + 1); } return(true); }; }