// 炼铁狱
int Rule = 5;
int RoundTime = 120;
int PlayerSpawn = 16;
int PlayerSpawnDir = 50;
int PlayerWeapon = 15;
int PlayerWeapon2 = 14;
int PlayerHP = 15000;

OnStart()
{
	AddNPC("A1");
}
int player;
int trg0;
int trg1;
int trg2;
int Spa1;
int Spa2;
int k1;
int k2;
int k3;
int k4;
int timer0;
int timer1;
int gameover; 
OnUpdate()
{	
	if (gameover == 2)
	{
		return 0;
	}
	int now = GetGameTime();
	if (trg0 == 0)
	{
		int player = GetAnyChar("player");
		int c = GetChar("剑魔の杨帆东");
		if (c > 0)
		{
			Perform(c, "pause", 3);
			Perform(c, "say", "怎么！你是活人，怎么能进冥界？？");
			Perform(c, "pause", 3);
			Perform(c, "faceto", player);
		
			PlayerPerform("block", 0);
			PlayerPerform("say", "为什么不能。你生前不能杀你，死了又不会复活，只好下来找你咯！");
			PlayerPerform("pause", 5);
			PlayerPerform("say", "剑魔の杨帆东！原来你在冥界啊！这里的地方很像炼铁狱？");
			PlayerPerform("block", 1);
		
			trg0 = 1;
			timer0 = now + 5;
		}
	}
	if (trg0 == 1 && now > timer0)
	{
		if (Spa1 == 0){AddNPC("A3");
AddNPC("A5");
AddNPC("A7");
AddNPC("A9");
AddNPC("A11");
AddNPC("A13");
AddNPC("A15");
Spa1=1;}
		int c1 = GetChar("暗部の滅");
		if (c1>0)
		{
			Perform(c, "say", "哇哈哈哈哈...今天我让你有来无回。");
			Perform(c, "pause", 8);
			Perform(c, "say", "就你一人也敢来这里，不知死活的东西。");
			Perform(c, "guard", 4);
			Perform(c, "faceto", player);
		
			Perform(c1, "pause", 4);
			Perform(c1, "say", "你太嚣张了！");
			Perform(c1, "pause", 4);
			Perform(c1, "say", "哈哈，我们暗部可是冥界精英。剑魔大人的亲卫队！");
			Perform(c1, "pause", 4);
			Perform(c1, "say", "哈哈哈！敢像剑魔大人挑战，就先过我这关！");
			Perform(c1, "pause", 2);
			Perform(c1, "faceto", player);

			PlayerPerform("say", "你以为我一人能来这里，白痴。");
			PlayerPerform("pause", 6);
			PlayerPerform("say", "不就是多了几个小垃圾。废物就是废物。");
			PlayerPerform("pause", 8);
			PlayerPerform("say", "想不到，到了冥界你还有手下！");
			PlayerPerform("block", 1);
		
			trg0 = 2;
			timer0 = now + 15;
		}
	}
	if (trg0 == 2  && now > timer0)
	{
		if (Spa2 == 0){AddNPC("A17");
AddNPC("Amowenjian");
AddNPC("Aqilin");
AddNPC("Aqinglong");
AddNPC("Azhuque");
AddNPC("Abaihu");
AddNPC("Axuanwu");
Spa2 = 1;}
		int c2 = GetChar("剑神の曾彬");
		if (c2 > 0)
		{
			Perform(c, "guard", 6);
			Perform(c, "say", "剑~~剑神你居然为了一点小事杀了我，而且现在还和快活林的在一起？不管了，我不想混战，来单挑啊。");
			Perform(c, "guard", 2);
			Perform(c, "faceto", player);
		
			Perform(c1, "pause", 2);
			Perform(c1, "say", "敢不敢接受！");
			Perform(c1, "pause", 6);
			Perform(c1, "faceto", c2);

			Perform(c2, "say", "哼，凡心入魔，妄想成仙，留你不得。");
			Perform(c2, "pause", 8);
			Perform(c2, "say", "哼，我怎么会有你这样的弟子。");
			Perform(c2, "faceto", c);

			PlayerPerform("block", 0);
			PlayerPerform("pause", 4);
			PlayerPerform("say", "剑神你们终于来到了，要不然我要被群殴了。专门下毒的剑魔要最后杀，才能化解我心头之恨！");
			PlayerPerform("pause", 4);
			PlayerPerform("block", 1);
		
			trg0 = 3;
			timer0 = now + 8;
		}
	}
	if (trg0 == 3  && now > timer0)
	{
		if (GetHP(c)< 200 && k1 == 0)
		{
			if (GetHP(c1)<=0 && GetHP(c2)<=0)
			{
				
				Perform(c, "pause", 5);
				Perform(c, "say", "啊！可恶！");
				Perform(c, "faceto", player);
		
				PlayerPerform("block", 0);
				PlayerPerform("pause", 3);
				PlayerPerform("block", 1);
		
				gameover = 1;
				timer1 = now + 5;
				k1 = 1;
			}
		}
		if (GetHP(c) <= 0 && gameover != -1)
		{
			Say(player,"啊！！我太找杀了他！");
			gameover = -1;
			timer1 = now + 1;
		}
		if (GetHP(c1) <= 0 && k3 ==0)
		{
			Say(c1,"我，怎么会~~");
			k3 = 1;
		}
		if (GetHP(c2) <= 0 && k4 ==0)
		{
			Say(c2,"怎么可能我会败！");
			k4 = 1;
		}
	}
	if (gameover!=-1 && GetHP(player)<=0 && player > 0)
	{
		gameover = -1;
		timer1 = now + 2; 
	}
	if ((gameover==1 || gameover==-1) && now>timer1)
	{
		GameOver(gameover);
		gameover = 2;
	}
}
