public override void OnNewTurnStarted() { PVEGame pveGame = Game as PVEGame; int turnNpcRank = pveGame.FindTurnNpcRank(); if (Game.GetLivedLivings().Count == 0) { pveGame.NpcTurnQueue[turnNpcRank] = 0; } if (Game.TurnIndex > 1 && Game.CurrentPlayer.Delay > pveGame.NpcTurnQueue[turnNpcRank]) { if (GetLivingBlueNpc() + GetLivingRedNpc() == 15) { return; } if (redNpc.Count + blueNpc.Count < 15) { CreateFullNpc(); } else { for (int i = 0; i < 4; i++) { if (GetLivingRedNpc() < 12 && redNpc.Count < 4 * Game.MissionInfo.TotalCount / 5) { if (i < 1) { redNpc.Add(Game.CreateNpc(redNpcID, 900 + (i + 1) * 100, 505, 1)); } else if (i < 3) { redNpc.Add(Game.CreateNpc(redNpcID, 920 + (i + 1) * 100, 505, 1)); } else { redNpc.Add(Game.CreateNpc(redNpcID, 1000 + (i + 1) * 100, 515, 1)); } } else { break; } } if (GetLivingBlueNpc() < 3 && blueNpc.Count < Game.MissionInfo.TotalCount / 5) { blueNpc.Add(Game.CreateNpc(blueNpcID, 1465, 494, 1)); } } } }
public override void OnNewTurnStarted() { base.OnNewTurnStarted(); PVEGame pveGame = Game as PVEGame; int turnNpcRank = pveGame.FindTurnNpcRank(); if (Game.GetLivedLivings().Count == 0) { pveGame.NpcTurnQueue[turnNpcRank] = 0; } if (Game.TurnIndex > 1 && Game.CurrentPlayer.Delay > pveGame.NpcTurnQueue[turnNpcRank]) { if (Game.GetLivedLivings().Count < 10) { for (int i = 0; i < 10 - Game.GetLivedLivings().Count; i++) { if (someNpc.Count == Game.MissionInfo.TotalCount) { break; } else { int index = Game.Random.Next(0, birthX.Length); int NpcX = birthX[index]; int direction = -1; if (NpcX <= 320) { direction = 1; } index = Game.Random.Next(0, npcIDs.Length); if (index == 1 && GetNpcCountByID(npcIDs[1]) < 10) { someNpc.Add(Game.CreateNpc(npcIDs[1], NpcX, 506, 1, direction)); } else { someNpc.Add(Game.CreateNpc(npcIDs[0], NpcX, 506, 1, direction)); } } } } } }
public override void OnNewTurnStarted() { base.OnNewTurnStarted(); PVEGame pveGame = Game as PVEGame; int turnNpcRank = pveGame.FindTurnNpcRank(); if (Game.GetLivedLivings().Count == 0) { pveGame.NpcTurnQueue[turnNpcRank] = 0; } //if (Game.TurnIndex > 1 && Game.CurrentPlayer.Delay > pveGame.NpcTurnQueue[turnNpcRank]) //{ // for (int i = 0; i < 4; i++) // { // if (redTotalCount < Game.MissionInfo.TotalCount) // { // redTotalCount++; // if (i < 1) // { // someNpc.Add(Game.CreateNpc(redNpcID, 900 + (i + 1) * 100, 505, 1)); // } // else if (i < 3) // { // someNpc.Add(Game.CreateNpc(redNpcID, 920 + (i + 1) * 100, 505, 1)); // } // else // { // someNpc.Add(Game.CreateNpc(redNpcID, 1000 + (i + 1) * 100, 515, 1)); // } // } // } // if (redTotalCount < Game.MissionInfo.TotalCount) // { // redTotalCount++; // someNpc.Add(Game.CreateNpc(redNpcID, 1465, 494, 1)); // } //} }
public override void OnNewTurnStarted() { base.OnNewTurnStarted(); PVEGame game = base.Game; int key = game.FindTurnNpcRank(); if (base.Game.GetLivedLivings().Count == 0) { game.NpcTurnQueue[key] = 0; } if (base.Game.TurnIndex > 1 && base.Game.CurrentPlayer.Delay > game.NpcTurnQueue[key] && base.Game.GetLivedLivings().Count < 10) { for (int i = 0; i < 10 - base.Game.GetLivedLivings().Count; i++) { if (this.someNpc.Count == base.Game.MissionInfo.TotalCount) { return; } int num = base.Game.Random.Next(0, this.birthX.Length); int num2 = this.birthX[num]; int direction = -1; if (num2 <= 320) { direction = 1; } num = base.Game.Random.Next(0, this.npcIDs.Length); if (num == 1 && this.GetNpcCountByID(this.npcIDs[1]) < 10) { this.someNpc.Add(base.Game.CreateNpc(this.npcIDs[1], num2, 506, 1, direction)); } else { this.someNpc.Add(base.Game.CreateNpc(this.npcIDs[0], num2, 506, 1, direction)); } } } }
public override void OnNewTurnStarted() { base.OnNewTurnStarted(); PVEGame pveGame = Game as PVEGame; int turnNpcRank = pveGame.FindTurnNpcRank(); if (Game.GetLivedLivings().Count == 0) { pveGame.NpcTurnQueue[turnNpcRank] = 0; } if (Game.TurnIndex > 1 && Game.CurrentPlayer.Delay > pveGame.NpcTurnQueue[turnNpcRank]) { if (Game.GetLivedLivings().Count == 15) { return; } if (someNpc.Count < 15) { for (int i = 0; i < 4; i++) { if (i < 1) { someNpc.Add(Game.CreateNpc(redNpcID, 900 + (i + 1) * 100, 505, 1)); } else if (i < 3) { someNpc.Add(Game.CreateNpc(redNpcID, 920 + (i + 1) * 100, 505, 1)); } else { someNpc.Add(Game.CreateNpc(redNpcID, 1000 + (i + 1) * 100, 515, 1)); } } someNpc.Add(Game.CreateNpc(redNpcID, 1465, 494, 1)); } else { for (int i = 0; i < 4; i++) { if (Game.GetLivedLivings().Count < 15 && someNpc.Count < Game.MissionInfo.TotalCount) { if (i < 1) { someNpc.Add(Game.CreateNpc(redNpcID, 900 + (i + 1) * 100, 505, 1)); } else if (i < 3) { someNpc.Add(Game.CreateNpc(redNpcID, 920 + (i + 1) * 100, 505, 1)); } else { someNpc.Add(Game.CreateNpc(redNpcID, 1000 + (i + 1) * 100, 515, 1)); } } else { break; } } if (Game.GetLivedLivings().Count < 15 && someNpc.Count < Game.MissionInfo.TotalCount) { someNpc.Add(Game.CreateNpc(redNpcID, 1465, 494, 1)); } } } }
public override void OnNewTurnStarted() { List <ItemInfo> items = new List <ItemInfo>(); List <ItemTemplateInfo> goods = new List <ItemTemplateInfo>(); PVEGame pveGame = Game as PVEGame; int turnNpcRank = pveGame.FindTurnNpcRank(); if ((isUsePw || isUseProp) && !isShooted) { Game.CurrentLiving.Delay = 0; } if (Game.CurrentPlayer.Delay < pveGame.NpcTurnQueue[turnNpcRank]) { if (Game.TotalKillCount >= 1) { if (indexOf == 0) { isPlayPropMovie = true; indexOf++; } Game.CurrentPlayer.BeforePlayerShoot += new PlayerShootEventHandle(Shooted); } if (isPlayPropMovie) { Game.CurrentPlayer.PlayerUseProp += new PlayerUserPropEventHandle(UseProp); } if (isPlayPwMovie) { Game.CurrentPlayer.PlayerUseSpecialSkill += new PlayerUseSpecialSkillEventHandle(UseSpecialSkill); Game.CurrentPlayer.AddDander(200); } if (tip.CurrentAction == "Empty") { tip.PlayMovie("tip1", 0, 3000); } else if (isPlayPropMovie) { //播放使用道具 if (tag == 0) { tip.PlayMovie("tip2", 0, 2000); tag++; } else { if (!isUseProp && !isShooted && isAgain == false) { tip.PlayMovie("tip2", 0, 2000); } else//再试一次 { isAgain = true; isUseProp = false; tip.PlayMovie("tip3", 0, 2000); } } } else if (isPlayPwMovie) { isUseProp = false; //播放使用必杀 if (tag == 0) { isAgain = false; tip.PlayMovie("tip4", 0, 2000); tag++; } else { if (!isUsePw && !isShooted && isAgain == false) { tip.PlayMovie("tip4", 0, 2000); } else//再试一次 { isAgain = true; isUsePw = false; tip.PlayMovie("tip5", 0, 2000); } } } else if (isPlayKillAll) { //播放杀死所有的怪 tip.PlayMovie("tip6", 0, 2000); } } }