protected override void OnBuryVictim(Room room, Player player, ref object data) { DeathStruct death = (DeathStruct)data; Player killer = death.Damage.From; //杀死敌对阵营获得其手牌 if (killer != null && killer.Alive && killer.Camp != player.Camp && !player.IsKongcheng()) { List <int> ids = player.GetCards("h"); room.ObtainCard(killer, ref ids, new CardMoveReason(MoveReason.S_REASON_EXTRACTION, killer.Name)); } room.BuryPlayer(player); if (room.ContainsTag("SkipNormalDeathProcess") && (bool)room.GetTag("SkipNormalDeathProcess")) { return; } if (killer != null) { killer.SetMark("multi_kill_count", killer.GetMark("multi_kill_count") + 1); int kill_count = killer.GetMark("multi_kill_count"); if (kill_count > 1 && kill_count < 8) { room.SetEmotion(killer, string.Format("kill{0}", kill_count)); } else if (kill_count > 7) { room.SetEmotion(killer, "zylove"); } RewardAndPunish(room, killer, player); } }
protected virtual void OnBuryVictim(Room room, Player player, ref object data) { DeathStruct death = (DeathStruct)data; room.BuryPlayer(player); if (room.ContainsTag("SkipNormalDeathProcess") && (bool)room.GetTag("SkipNormalDeathProcess")) { return; } Player killer = death.Damage.From ?? null; if (killer != null) { killer.SetMark("multi_kill_count", killer.GetMark("multi_kill_count") + 1); int kill_count = killer.GetMark("multi_kill_count"); if (kill_count > 1 && kill_count < 8) { room.SetEmotion(killer, string.Format("kill{0}", kill_count)); } else if (kill_count > 7) { room.SetEmotion(killer, "zylove"); } RewardAndPunish(room, killer, player); } if (Engine.GetGeneral(player.General1, room.Setting.GameMode).IsLord() && player == death.Who) { foreach (Player p in room.GetOtherPlayers(player, true)) { if (p.Kingdom == player.Kingdom) { p.Role = "careerist"; if (p.HasShownOneGeneral()) { room.BroadcastProperty(p, "Role"); } else { room.NotifyProperty(room.GetClient(p), p, "Role"); } } } CheckBigKingdoms(room); } }
protected override void OnBuryVictim(Room room, Player player, ref object data) { DeathStruct death = (DeathStruct)data; room.BuryPlayer(player); if (player.GetRoleEnum() == PlayerRole.Rebel) { foreach (Player p in room.Players) { if (p != player && p.Alive && p.GetRoleEnum() == PlayerRole.Rebel) { room.DrawCards(p, 2, "gamerule"); break; } } } }
protected override void OnBuryVictim(Room room, Player player, ref object data) { DeathStruct death = (DeathStruct)data; room.BuryPlayer(player); if (room.ContainsTag("SkipNormalDeathProcess") && (bool)room.GetTag("SkipNormalDeathProcess")) { return; } Player killer = death.Damage.From; if (killer != null) { killer.SetMark("multi_kill_count", killer.GetMark("multi_kill_count") + 1); int kill_count = killer.GetMark("multi_kill_count"); if (kill_count > 1 && kill_count < 8) { room.SetEmotion(killer, string.Format("kill{0}", kill_count)); } else if (kill_count > 7) { room.SetEmotion(killer, "zylove"); } RewardAndPunish(room, killer, player); } if (room.AliveCount() == 2) { bool check = false; foreach (Player p in room.GetAlivePlayers()) { if (p.GetRoleEnum() == PlayerRole.Renegade) { check = true; break; } } if (check) { room.DoBroadcastNotify(CommandType.S_COMMAND_GAMEMODE_BLOODBATTLE, new List <string>()); Thread.Sleep(3000); } } }