public override void OnStartGame() { base.OnStartGame(); m_king = Game.CreateBoss(32, 750, 510, -1, 0); m_king.SetRelateDemagemRect(-41, -187, 83, 140); //m_king.Say("你们知道的太多了,我不能让你们继续活着!", 3000); m_king.AddDelay(16); }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_king = Game.CreateBoss(bossID, 888, 590, -1, 0); m_king.FallFrom(888, 690, "fall", 0, 2, 1000); m_king.SetRelateDemagemRect(-41, -187, 83, 140); //m_king.Say("你们知道的太多了,我不能让你们继续活着!", 3000); m_king.AddDelay(16); }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_king = Game.CreateBoss(bossID, 888, 590, -1, 0); m_king.FallFrom(888, 690, "fall", 0, 2, 1000); m_king.SetRelateDemagemRect(-41, -187, 83, 140); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1077.msg2"), 0, 3000); m_king.AddDelay(16); }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_kingMoive = Game.Createlayer(0, 0, "kingmoive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_front = Game.Createlayer(710, 380, "font", "game.asset.living.BombKingAsset", "out", 1, 1, 0); m_king = Game.CreateBoss(bossID, 888, 590, -1, 0); m_king.FallFrom(888, 690, "fall", 0, 2, 1000); m_king.SetRelateDemagemRect(-41, -187, 83, 140); m_kingMoive.PlayMovie("in", 1000, 0); m_front.PlayMovie("in", 2000, 2000); m_king.AddDelay(16); }
//public override void OnPrepareStartGame() //{ // base.OnPrepareStartGame(); //} //public override void OnStartGame() //{ // base.OnStartGame(); //} public override void OnStartGame() { base.OnStartGame(); m_moive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1); m_front = Game.Createlayer(1131, 150, "font", "game.asset.living.AntQueenAsset", "out", 1, 1); boss = Game.CreateBoss(bossID, 1316, 444, -1, 1); boss.SetRelateDemagemRect(-42, -200, 84, 194); boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.DCNM2102.msg1"), 0, 200, 0); m_moive.PlayMovie("in", 6000, 0); m_front.PlayMovie("in", 6100, 0); m_moive.PlayMovie("out", 10000, 1000); m_front.PlayMovie("out", 9900, 0); }
public override void OnStartGame() { base.OnStartGame(); //for (int i = 0; i < 4; i++) //{ // SomeNpc.Add(Game.CreateNpc(3005, (i + 1) * 100, 100, 1)); //} boss = Game.CreateBoss(3005, 2000, 1200, -1, 1); boss.SetRelateDemagemRect(-42, -200, 84, 194); //SomeNpc.Add(Game.CreateNpc(3005, 2000, 100, 1)); //SomeNpc.Add(Game.CreateNpc(3003, 300, 200, 1)); turnCount=1; }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_kingMoive = Game.Createlayer(0, 0, "kingmoive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_kingFront = Game.Createlayer(720, 495, "font", "game.asset.living.boguoKingAsset", "out", 1, 1, 0); m_king = Game.CreateBoss(m_state, 888, 590, -1, 0); m_king.FallFrom(888, 690, "fall", 0, 2, 1000); m_king.SetRelateDemagemRect(-21, -87, 72, 59); m_king.AddDelay(10); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1076.msg2"), 0, 3000); m_kingMoive.PlayMovie("in", 9000, 0); m_kingFront.PlayMovie("in", 9000, 0); m_kingMoive.PlayMovie("out", 13000, 0); m_kingFront.PlayMovie("out", 13400, 0); turn = Game.TurnIndex; }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_moive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_front = Game.Createlayer(680, 330, "font", "game.asset.living.boguoLeaderAsset", "out", 1, 1, 0); m_boss = Game.CreateBoss(bossID, 770, -1500, -1, 1); m_boss.FallFrom(770, 301, "fall", 0, 2, 1000); m_boss.SetRelateDemagemRect(34, -35, 11, 18); m_boss.AddDelay(10); m_boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1073.msg2"), 0, 6000); m_boss.PlayMovie("call", 5900, 0); m_moive.PlayMovie("in", 9000, 0); m_boss.PlayMovie("weakness", 10000, 5000); m_front.PlayMovie("in", 9000, 0); m_moive.PlayMovie("out", 15000, 0); }
public override void OnStartGame() { base.OnStartGame(); m_moive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 0); m_front = Game.Createlayer(680, 330, "font", "game.asset.living.boguoLeaderAsset", "out", 1, 0); m_boss = Game.CreateBoss(bossID, 770, -1500, -1, 1); m_boss.FallFrom(770, 301, "fall", 0, 2, 1000); m_boss.SetRelateDemagemRect(34, -35, 11, 18); m_boss.AddDelay(10); m_boss.Say("你们胆敢闯入我的地盘,准备受死吧!", 0, 6000); m_boss.PlayMovie("call", 5900, 0); m_moive.PlayMovie("in", 9000, 0); m_boss.PlayMovie("weakness", 10000, 5000); m_front.PlayMovie("in", 9000, 0); m_moive.PlayMovie("out", 15000, 0); //设置本关卡为Boss关卡,关卡胜利后,玩家可以翻一张牌 Game.BossCardCount = 1; }
public override void OnAfterKillingLiving(Living target, int damageAmount, int criticalAmount) { base.OnAfterKillingLiving(target, damageAmount, criticalAmount); if (target is Player) { this.m_player.OnKillingLiving(this.m_game, 1, target.Id, target.IsLiving, damageAmount + criticalAmount); return; } int id = 0; if (target is SimpleBoss) { SimpleBoss simpleBoss = target as SimpleBoss; id = simpleBoss.NpcInfo.ID; } if (target is SimpleNpc) { SimpleNpc simpleNpc = target as SimpleNpc; id = simpleNpc.NpcInfo.ID; } this.m_player.OnKillingLiving(this.m_game, 2, id, target.IsLiving, damageAmount + criticalAmount); }
public override void OnAfterKillingLiving(Living target, int damageAmount, int criticalAmount) { base.OnAfterKillingLiving(target, damageAmount, criticalAmount); if (target is Player)//目标为玩家还是NPC { m_player.OnKillingLiving(m_game, 1, target.Id, target.IsLiving, damageAmount + criticalAmount); } else { int targetId = 0; if (target is SimpleBoss) { SimpleBoss tempBoss = target as SimpleBoss; targetId = tempBoss.NpcInfo.ID; } if (target is SimpleNpc) { SimpleNpc tempNpc = target as SimpleNpc; targetId = tempNpc.NpcInfo.ID; } m_player.OnKillingLiving(m_game, 2, targetId, target.IsLiving, damageAmount + criticalAmount); } }
public override void OnStartGame() { base.OnStartGame(); m_king = Game.CreateBoss(bossID, 750, 510, -1, 0); m_king.SetRelateDemagemRect(-41, -187, 83, 140); m_king.AddDelay(16); /* int i = 0; foreach (Player player in Game.GetAllFightPlayers()) { player.Direction = 1; player.SetXY((i + 1) * 100, 520); i++; } m_preKing = Game.CreateBoss(21, 600, 510, -1, 0); m_preKing.Say("啊~~我的头好痛……为什么我会在这里!?炸弹王马迪亚斯呢?………..我记起来了。", 1000); m_preKing.Say("感谢你们高贵的勇士,我是啵咕国王尼尔鲁奥要不是有你们的帮助,我可能永远也无法摆脱马迪亚斯的控制。", 3000); m_preKing.Say("几年前炸弹人向啵咕国发动战争,在一次战斗中我不小心中了炸弹王马迪亚斯的诡计被他用精神枷锁诅咒控制。", 5000); m_preKing.Say("在刚刚和你们的战斗中他的诅咒被破坏,才让我重获自由! 时间不多了他也肯定感知到诅咒的消失,可能正赶往这里!", 7000); m_preKing.Say("马迪亚斯非常强大,现在的我非常虚弱可能抵挡不了多久,在他赶来之前请你们赶快离开这里!", 9000); */ }
public override void OnAfterKillingLiving(Living target, int damageAmount, int criticalAmount, int delay) { base.OnAfterKillingLiving(target, damageAmount, criticalAmount, delay); if (target is Player) { this.m_player.OnKillingLiving(this.m_game, 1, target.Id, target.IsLiving, damageAmount + criticalAmount, this.PlayerDetail.IsArea); this.CalculatePlayerOffer(target as Player); } else { int targetId = 0; if (target is SimpleBoss) { SimpleBoss tempBoss = target as SimpleBoss; targetId = tempBoss.NpcInfo.ID; } if (target is SimpleNpc) { SimpleNpc tempNpc = target as SimpleNpc; targetId = tempNpc.NpcInfo.ID; } this.m_player.OnKillingLiving(this.m_game, 2, targetId, target.IsLiving, damageAmount + criticalAmount, false); } }
public SimpleBoss CreateBoss(int npcId, int x, int y, int direction, int type) { NpcInfo npcInfo = NPCInfoMgr.GetNpcInfoById(npcId); SimpleBoss boss = new SimpleBoss(PhysicalId++, this, npcInfo, direction, type); boss.Reset(); boss.SetXY(x, y); AddLiving(boss); boss.StartMoving(); return boss; }
public override bool CanGameOver() { base.CanGameOver(); if (m_king.IsLiving == false) { if (m_state == firstBossID) { m_state++; } } if (m_state == secondBossID && m_secondKing == null) { //m_kingMoive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_secondKing = Game.CreateBoss(m_state, m_king.X, m_king.Y, m_king.Direction, 1); Game.RemoveLiving(m_king.Id); if (m_secondKing.Direction == 1) { m_secondKing.SetRect(-40, -112, 115, 96); } m_secondKing.SetRelateDemagemRect(-21, -87, 72, 59); m_secondKing.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1176.msg3"), 0, 3000); //m_kingMoive.PlayMovie("in", 5000, 0); //m_kingMoive.PlayMovie("out", 9000, 0); List<Player> players = Game.GetAllFightPlayers(); Player RandomPlayer = Game.FindRandomPlayer(); int minDelay = 0; if (RandomPlayer != null) { minDelay = RandomPlayer.Delay; } foreach (Player player in players) { if (player.Delay < minDelay) { minDelay = player.Delay; } } m_secondKing.AddDelay(minDelay - 2000); turn = Game.TurnIndex; } if (m_secondKing != null && m_secondKing.IsLiving == false) { Game.CreatePhysicalObj(m_secondKing.X, m_secondKing.Y, "king", "game.living.LivingRecover005", "0", 0, 0, 0); m_kill++; return true; } return false; }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_boss = Game.CreateBoss(bossID, 888, 590, -1, 0); m_boss.SetRelateDemagemRect(-41, -187, 83, 140); m_boss.FallFrom(888, 690, "fall", 0, 2, 1000); m_front.PlayMovie("in", 2000, 0); m_kingMoive.PlayMovie("in", 1000, 0); m_kingMoive.PlayMovie("out", 4800, 0); m_boss.AddDelay(16); Game.BossCardCount = 1; //再试一次跳过剧情动画 if (Game.WantTryAgain == 1) { return; } m_boss.SetRect(-191, -226, 44, 58); m_king.ChangeDirection(1, 5000); m_boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg13"), 2, 6000); m_boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg14"), 2, 10000); m_boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg15"), 2, 14000); m_boss.PlayMovie("cast", 18500, 0); m_boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg16"), 2, 18000); Game.AddAction(new FocusAction(m_king.X, m_king.Y - 30, 0, 22000, 0)); m_king.ChangeDirection(-1, 22000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg17"), 2, 23000); m_king.ChangeDirection(1, 25000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg18"), 2, 27000); if (m_king.ShootPoint(m_boss.X, m_boss.Y, 61, 1000, 10000, 1, 1, 28300)) { m_king.PlayMovie("beat2", 27500, 0, new LivingCallBack(Game.SendSyncLifeTime)); } m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg19"), 2, 31000); Game.AddAction(new FocusAction(736, 515, 0, 29500, 0)); m_boss.PlayMovie("beatA", 28300, 0); m_boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg20"), 2, 28500); m_boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg21"), 2, 36000); m_boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg22"), 2, 40000); m_boss.PlayMovie("mantra", 46000, 0); m_boss.Seal(m_king, 2, 48000); m_boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg23"), 2, 44000); m_king.ChangeDirection(-1, 50000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg24"), 2, 51000); m_king.PlayMovie("out", 55000, 0); m_king.OffSeal(m_king, 55000); Game.AddAction(new PlayBackgroundSoundAction(true, 55000)); }
public override void OnNewTurnStarted() { base.OnNewTurnStarted(); if (m_boss.State == 0) { m_boss.SetRelateDemagemRect(-41, -187, 83, 140); } if (m_king != null) { Game.RemoveLiving(m_king.Id); m_king.Die(); m_king = null; Game.AddAction(new LockFocusAction(true, 0, 0)); m_boss.SetRect(m_boss.NpcInfo.X, m_boss.NpcInfo.Y, m_boss.NpcInfo.Width, m_boss.NpcInfo.Height); } }
public override void OnPrepareGameOver() { base.OnPrepareGameOver(); if (m_boss.IsLiving == false && Game.GetAllLivingPlayers().Count != 0) { int i = 0; Point p; foreach (Player player in Game.GetAllFightPlayers()) { player.Direction = 1; p = new Point((i + 1) * 100, 700); player.SetXY(p); i++; } m_king = Game.CreateBoss(kingID, 500, 650, -1, 0); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg25"), 2, 1000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg26"), 2, 5000, 4000); } }
public override bool CanGameOver() { base.CanGameOver(); if (m_king.IsLiving == false) { if (m_state == firstBossID) { m_state++; } } if (m_state == secondBossID && m_secondKing == null) { m_secondKing = Game.CreateBoss(m_state, m_king.X, m_king.Y, m_king.Direction, 2); Game.RemoveLiving(m_king.Id); if (m_secondKing.Direction == 1) { m_secondKing.SetRect(-40, -112, 115, 96); } m_secondKing.SetRelateDemagemRect(-21, -87, 72, 59); m_secondKing.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1276.msg3"), 0, 3000); List<Player> players = Game.GetAllFightPlayers(); Player RandomPlayer = Game.FindRandomPlayer(); int minDelay = 0; if (RandomPlayer != null) { minDelay = RandomPlayer.Delay; } foreach (Player player in players) { if (player.Delay < minDelay) { minDelay = player.Delay; } } m_secondKing.AddDelay(minDelay - 2000); turn = Game.TurnIndex; } if (m_secondKing != null && m_secondKing.IsLiving == false) { m_kill++; direction = m_secondKing.Direction; return true; } return false; }
public override void OnStartGame() { base.OnStartGame(); m_kingMoive = Game.Createlayer(0, 0, "kingmoive", "game.asset.living.BossBgAsset", "out", 1, 0); m_kingFront = Game.Createlayer(610, 380, "font", "game.asset.living.boguoKingAsset", "out", 1, 0); m_king = Game.CreateBoss(m_state, 750, 668, -1, 0); m_king.FallFrom(750, 640, "fall", 0, 2, 1000); m_king.SetRelateDemagemRect(-21, -79, 72, 51); m_king.AddDelay(10); m_king.Say("你们这些低等的庶民,竟敢来到我的王国放肆!", 0, 3000); m_kingMoive.PlayMovie("in", 9000, 0); m_kingFront.PlayMovie("in", 9000, 0); m_kingMoive.PlayMovie("out", 13000, 0); m_kingFront.PlayMovie("out", 13400, 0); turn = Game.TurnIndex; }
public override bool CanGameOver() { base.CanGameOver(); //回合数到100的时候结束游戏 if (Game.TurnIndex > Game.MissionInfo.TotalTurn - 1) { return true; } if (m_king.IsLiving == false) { if (m_state == firstBossID) { m_state++; } } if (m_state == secondBossID && m_secondKing == null) { m_kingMoive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 0); m_secondKing = Game.CreateBoss(m_state, m_king.X, m_king.Y, m_king.Direction, 1); Game.RemoveLiving(m_king.Id); if (m_secondKing.Direction == -1) { m_secondKing.SetRectBomb(24, -159, 66, 38); m_secondKing.SetRelateDemagemRect(58, -142, 5, 3); } else { m_secondKing.SetRectBomb(-90, -159, 66, 38); m_secondKing.SetRelateDemagemRect(-63, -142, 5, 3); } m_secondKing.Say("<span class='red'>你们把我激怒了,我饶不了你们!</span>", 0, 3000); m_kingMoive.PlayMovie("in", 5000, 0); m_secondKing.PlayMovie("weakness", 6100, 0); m_kingMoive.PlayMovie("out", 12000, 0); List<Player> players = Game.GetAllFightPlayers(); int minDelay = Game.FindRandomPlayer().Delay; foreach (Player player in players) { if (player.Delay < minDelay) { minDelay = player.Delay; } } m_secondKing.AddDelay(minDelay - 2000); turn = Game.TurnIndex; } if (m_secondKing != null && m_secondKing.IsLiving == false) { m_leftWall = Game.FindPhysicalObjByName("wallLeft", false); m_rightWall = Game.FindPhysicalObjByName("wallRight", false); if (m_leftWall != null) { Game.RemovePhysicalObj(m_leftWall[0], true); } if (m_rightWall != null) { Game.RemovePhysicalObj(m_rightWall[0], true); } Game.CreatePhysicalObj(m_secondKing.X, m_secondKing.Y, "king", "game.living.LivingRecover005", "0", 0, 0); m_kill++; return true; } return false; }
public override void OnStartGame() { base.OnStartGame(); m_kingMoive = Game.Createlayer(0, 0, "kingmoive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_front = Game.Createlayer(725, 395, "font", "game.asset.living.BombKingAsset", "out", 1, 1, 0); //再试一次跳过剧情动画 if (Game.WantTryAgain == 1) { return; } Game.SendPlayBackgroundSound(false); Game.AddAction(new LockFocusAction(false, 0, 0)); m_king = Game.CreateBoss(kingID, 888, 715, 1, 0); Game.AddAction(new FocusAction(m_king.X, m_king.Y - 90, 0, 0, 0)); m_king.PlayMovie("cry", 4000, 2000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg1"), 2, 4000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg2"), 2, 9000); m_king.MoveTo(500, m_king.Y, "walk", 13000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg3"), 2, 21000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg4"), 2, 25000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg5"), 2, 29000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg6"), 2, 33000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg7"), 2, 37000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg8"), 2, 41000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg9"), 2, 45000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg10"), 2, 49000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1277.msg11"), 2, 53000, 4000); foreach (Player player in Game.GetAllFightPlayers()) { Game.SendLivingToTop(player); } }