// 圆满楼
int Rule = 5;
int RoundTime = 30;
int PlayerSpawn = 108;
int PlayerSpawnDir = 90;
int PlayerWeapon = 15;
int PlayerWeapon2 = 17;
int PlayerHP = 8000;
OnStart()
{
	AddNPC("npc18_01");
	AddNPC("npc18_02");
	AddNPC("npc18_03");
	AddNPC("npc18_04");
	AddNPC("npc18_05");
	AddNPC("npc18_06");
}
int player;
int trg0;
int trg1;
int trg2;
int timer0;
int timer1;
int timer2;
int timer3;
int s1;
int s2;
int s3;
int s4;
int k1;
int k2;
int k3;
int con;
int gameover; 
OnUpdate()
{	
	int now = GetGameTime();
	if (trg0==0)
	{
		int player = GetAnyChar("player");
		int c = GetChar("蒙面人首領");
		int c1 = GetChar("蒙面人·甲");
		int c2 = GetChar("蒙面人·乙");
		int c3 = GetChar("蒙面人·丙");
		int c4 = GetChar("蒙面人·丁");
		int p1 = GetChar("冷燕");
		if (GetHP(c) >0 && GetHP(p1)>0)
		{
			ChangeBehavior(c,"follow",p1);
			Perform(c, "say", "那么...分成两组..我带一人去杀女的..其余三人去宰了男的！！");
			Perform(c, "guard", 5);
			Perform(c, "say", "上面交待下来了！！我们要杀掉屠大鹏所雇的杀手！！");
			Perform(c, "guard", 5);
			Perform(c, "say", "废话！现在明白了么？");
			Perform(c, "guard", 5);
			Perform(c, "say", "哼哼！他们收买了屠大鹏来杀我们的首领，没必要去帮他们！！");
			Perform(c, "guard", 5);
			Perform(c, "say", "方才看到剑仙带人直飞快活林，看来要杀尽快活林的杀手！");
			Perform(c, "pause", 5);
			Perform(c, "say", "不懂就只要听我讲即可！！");
			Perform(c, "pause", 5);
			Perform(c, "say", "安静！屠大鹏他又不是我们真的首领！你们忘了真的首领是谁了么！！");
			Perform(c, "pause", 5);
			Perform(c, "say", "上面要我们把想杀他的人全处理掉！！");
			Perform(c, "pause", 3);
			Perform(c, "say", "大家都到了吗！？");
			Perform(c, "faceto", c1);
			
			ChangeBehavior(c1,"follow",player);
			Perform(c1, "say", "我明白了！！");
			Perform(c1, "pause", 5);
			Perform(c1, "say", "了解！！");
			Perform(c1, "pause", 5);
			Perform(c1, "say", "属下明白了！！");
			Perform(c1, "pause", 5);
			Perform(c1, "say", "...？上面那个人还活着么？");
			Perform(c1, "pause", 5);
			Perform(c1, "say", "...不用去帮他们吗？");
			Perform(c1, "pause", 5);
			Perform(c1, "say", "是！！");
			Perform(c1, "pause", 5);
			Perform(c1, "say", "对不起！属下不懂！！");
			Perform(c1, "pause", 5);
			Perform(c1, "say", "上面？屠首领不是死了？");
			Perform(c1, "pause", 7);
			Perform(c1, "crouch", 30);
			Perform(c1, "faceto", c);

			ChangeBehavior(c4,"follow",player);
			Perform(c4, "pause", 21);
			Perform(c4, "say", "对啊！我们四个才从练铁狱回来呀！？");
			Perform(c4, "pause", 8);
			Perform(c4, "crouch", 30);
			Perform(c4, "faceto", c);

			ChangeBehavior(c3,"follow",player);
			Perform(c3, "pause", 30);
			Perform(c3, "crouch", 30);
			Perform(c3, "faceto", c);

			ChangeBehavior(c2,"follow",p1);
			Perform(c2, "pause", 30);
			Perform(c2, "say", "！！");
			Perform(c2, "pause", 3);
			Perform(c2, "crouch", 30);
			Perform(c2, "faceto", c);

			Perform(p1, "block", 30);

			PlayerPerform("block", 0);
			PlayerPerform("say", "(居然想暗杀杀手？这些人不要命了？)");
			PlayerPerform("pause", 23);
			PlayerPerform("say", "(...剑仙带人杀到快活林去了？)");
			PlayerPerform("pause", 15);
			PlayerPerform("say", "(...看来他们的目标似乎是我们？谁指使的？)");
			PlayerPerform("pause", 5);
			PlayerPerform("say", "(...什么声音？)");
			PlayerPerform("pause", 1);
			PlayerPerform("block", 1);
			trg0 = 1;
		}

	}
	if (trg0==1)
	{
		SetTarget(0, "char", c);
		SetTarget(1, "char", p1);
		SetTarget(2, "char", player);
		if (GetHP(p1)>=0 && Distance(0, 1) > 500 && Distance(1, 2)<200 && s1 < 1)
		{
			ChangeBehavior(p1,"follow",player);
			Perform(p1, "say", "是么？我明白了！！我们走吧！！");
			Perform(p1, "pause", 5);
			Perform(p1, "say", "那么急！？为什么？");
			Perform(p1, "pause", 2);
			Perform(p1, "faceto", player);

			Perform(c, "pause", 8);
			Perform(c1, "pause", 8);
			Perform(c2, "pause", 8);
			Perform(c3, "pause", 8);
			Perform(c4, "pause", 8);

			PlayerPerform("block", 0);
			PlayerPerform("pause", 2);
			PlayerPerform("say", "有人杀来了！似乎是屠城的余党！！");
			PlayerPerform("pause", 5);
			PlayerPerform("say", "燕，快点！跟我走！！");
			PlayerPerform("block", 1);
			s1 = 2;
		}
		if (Distance(0, 2) < 200 && Distance(1, 2) > 500 && trg1 == 0)
		{
			ChangeBehavior(c,"follow",player);
			ChangeBehavior(c1,"follow",player);
			ChangeBehavior(c2,"follow",player);
			ChangeBehavior(c3,"follow",player);
			ChangeBehavior(c4,"follow",player);
			Perform(c, "say", "唉呀！！窄路相逢！！大家先把这家伙杀了！！");
			Perform(c, "faceto", player);
			trg1 = 1;
		}
		if (Distance(0, 2) < 200 && Distance(1, 2) > 500 && s1 == 0)
		{
			Perform(p1, "say", "不知死是怎么写吗！我来教你们！");
			Perform(p1, "pause", 5);
			Perform(p1, "say", "你们是谁？");
			Perform(p1, "faceto", c);

			Perform(c, "say", "就请你去死吧！！");
			Perform(c, "pause", 5);
			Perform(c, "say", "呵呵！来杀你的人！！");
			Perform(c, "pause", 2);
			Perform(c, "faceto", p1);

			Perform(c4, "pause", 8);

			s1 = 1;
		}
		if (GetHP(p1) <= 0)
		{
			if(s1 == 1)
			{
				Say(c,"哈哈！一个收拾了！！剩下一个了！！");
				ChangeBehavior(c,"follow",player);
				ChangeBehavior(c4,"follow",player);
				s1 = 3;
			}
			if(s1 == 2)
			{
				ChangeBehavior(p1,"follow",player);
				Perform(c, "pause", 2);
				Perform(c, "say", "怕什么？我们一起上！");
				Perform(c, "pause", 6);
				Perform(c, "say", "哈哈！一个被收拾了！！剩下你一个了！！");
				Perform(c, "faceto", player);

				Perform(c1, "pause", 6);
				Perform(c1, "say", "哇哇！这是他们在练铁狱中打败屠城时的招式！！");
				Perform(c1, "pause", 4);

				Perform(c2, "pause", 8);
				Perform(c3, "pause", 8);
				Perform(c4, "pause", 8);

				PlayerPerform("block", 0);
				PlayerPerform("pause", 2);
				PlayerPerform("say", "你们已有面对杀手的觉悟了吗？！！");
				PlayerPerform("pause", 5);
				PlayerPerform("use", 19);
				PlayerPerform("say", "可恶！！我绝对饶不了你们！");
				PlayerPerform("pause", 2);
				PlayerPerform("block", 1);

				s1=4;
			}
		}
	}
	if (gameover != -1 && GetHP(player) <= 0 && now >10)
	{
		gameover = -1;
		timer1 = now + 2; 
	}
	if ((gameover == 1 || gameover == -1) && now>timer1)
	{
		GameOver(gameover);
		gameover = 2;
	}
}