//  金华
int Rule = 1;
int RoundTime = 35;
int PlayerSpawn = 143;
int PlayerSpawnDir = 30;
int PlayerWeapon = 6;
int PlayerWeapon2 = 0;
int PlayerHP = 4000;

int trg0 = 0;
int trg1 = 0;
int now = 0;
int timer0 = 0;
int timer1 = 0;
int timer2 = 0;
int timer3 = 0;
int gameover = 0;

OnStart()
{
	AddNPC("npc-13-01");
	AddNPC("npc-13-03");
	AddNPC("npc-13-04");
	AddNPC("npc-13-05");
}


OnUpdate()
{
	int player = GetAnyChar("player");
	if (player < 0)
	{
		return 0;
	}
	if (gameover == 2)
	{
		return 0;
	}
	int now = GetGameTime();
	
	int c;
	int c1;
	int c3;
	int c4;

	if (trg0 == 0)
	{
		c = GetChar("履面");
		c1 = GetChar("雪魄");
		c3 = GetChar("雪山弟子-甲");
		c4 = GetChar("雪山弟子-乙");
		if (c>=0 && c1>0 && c3>0 && c4>0)
		{
 			Perform(c,"say", "来吧！！！"); 
			Perform(c,"pause", 3);
 			Perform(c,"say", "呵呵，有骨气！！"); 
			Perform(c,"pause", 9);   
			Perform(c,"say", "不要以为你很厉害，今天就让你尝尝失败的滋味！！"); 
			Perform(c,"pause", 3);
			Perform(c,"say", "雪魄，你认为你能杀得了我么？"); 
			Perform(c,"pause", 3);
			Perform(c,"say", "哼哼哼"); 
			Perform(c,"pause", 6);

			Perform(c1,"pause", 9);
			Perform(c1,"say", "落，准备应战！！！"); 
			Perform(c1,"pause", 3);
			Perform(c1,"say", "（好重的杀气！！！得小心应付）"); 
			Perform(c1,"pause", 3);
			Perform(c1,"say", "！！！！"); 
			Perform(c1,"pause", 9);
			Perform(c1,"say", "所以，你必须死！！"); 
			Perform(c1,"pause", 3);
			Perform(c1,"say", "履面，今天就是你的死期！！"); 

			Perform(c3,"say", "是！"); 
			Perform(c3,"pause", 28);

			Perform(c4,"say", "是！"); 
			Perform(c4,"pause", 28);

			PlayerPerform("block", 0);
			PlayerPerform("say", "履面，你准备死吧！！！");
			PlayerPerform("pause", 2);
                        PlayerPerform("say", "是，师兄！！"); 
			PlayerPerform("pause", 25);
			PlayerPerform("block", 1);
						
			trg0 = 1;
                }          
        }     
	if (trg0 == 1)
	{
		c = GetChar("履面");
		c1 = GetChar("雪魄");
		c3 = GetChar("雪山弟子-甲");
		c4 = GetChar("雪山弟子-乙");
		if (c>=0 && GetHP(c)<25000)
		{
                        ChangeBehavior(c, "Kill", c1);
                        Perform(c, "say", "废话去地狱说吧！！！看剑！！");
                        Perform(c, "pause", 18); 
                        Perform(c, "say", "看剑！！！剑.无量！！");
                        Perform(c, "pause", 3); 
                        Perform(c, "say", "现在才叫小心，是不是晚了点啊？？");
                        Perform(c, "pause", 6);      
                        Perform(c, "say", "死吧！！！！");
                        Perform(c, "pause", 3);
                        Perform(c, "say", "不过，不要以为我只有如此而已，让你看看我真正的力量吧！！"); 
                        Perform(c, "pause", 3);
                        Perform(c, "say", "呜！！！没想到，你居然伤得了我");

                        Perform(c1, "say", "退下！！");
                        Perform(c1, "pause", 3);
                        Perform(c1, "say", "现在，落，你退下！！");
                        Perform(c1, "pause", 6); 
                        Perform(c1, "say", "（可恶……）雪落，你没事吧？");
                        Perform(c1, "pause", 6);
                        Perform(c1, "say", "什么？？！！");
                        Perform(c1, "pause", 6);
                        Perform(c1, "say", "大家小心应战！！");
                        Perform(c1, "pause", 2);
                        Perform(c1, "say", "（杀气，又增强了……）");
                        Perform(c1, "pause", 10);

			Perform(c3,"use", 35);
			Perform(c3,"say", "怎么会……"); 
			Perform(c3,"pause", 24);

			Perform(c4,"use", 35);
			Perform(c4,"say", "呜……"); 
			Perform(c4,"pause", 23);

			PlayerPerform("block", 0);
			PlayerPerform("say", "……是");
			PlayerPerform("pause", 3);
			PlayerPerform("say", "可是，那你……");
			PlayerPerform("pause", 3);
			PlayerPerform("say", "为什么？？");
			PlayerPerform("pause", 6);
			PlayerPerform("say", "啊，师兄我没事！！");
			PlayerPerform("pause", 5);
			PlayerPerform("say", "（呼，好险……若不是师兄提醒，估计我就……）");
			PlayerPerform("pause", 3);
                        PlayerPerform("say", "呜！！"); 
			PlayerPerform("pause", 20);
			PlayerPerform("block", 1);
						
			trg0 = 2;
                }          
        }     
        if (trg0 == 2)        
        {             
		c = GetChar("履面");
		c1 = GetChar("雪魄");
		c3 = GetChar("雪山弟子-甲");
		c4 = GetChar("雪山弟子-乙"); 
                if (c>=0 && GetHP(c)<22000)
                { 
                        Perform(c, "pause", 3); 
                        Perform(c, "say", "哼，破绽！！");
                        Perform(c, "pause", 4);       
                        Perform(c, "say", "离落，你去死吧！！！！");
                        Perform(c, "pause", 2);
                        Perform(c, "say", "哼，想不到你还有点本事，不过……");                      

			Perform(c1,"use", 35);
                        Perform(c1, "say", "呜");
                        Perform(c1, "pause", 3);
                        Perform(c1, "say", "落，你快走！！！");
                        Perform(c1, "pause", 3);
                        Perform(c1, "say", "什么？？");
                        Perform(c1, "pause", 8);

                        PlayerPerform("pause", 10);

                        trg0 = 3;
                }          
        }    
        if (trg0 == 3)        
        {   
		c = GetChar("履面");
		c1 = GetChar("雪魄"); 
                if (c>=0 && c1<=0)  
                {        
                        Perform(c, "pause", 12); 

                  	PlayerPerform("block", 0);
			PlayerPerform("use", 19);
                        PlayerPerform("say", "可恶，你，你杀了师兄，我要你成为陪葬！！！");
                        PlayerPerform("pause", 2);
                        PlayerPerform("say", "师兄，你醒醒，你醒醒啊，为什么为什么你要替我挡那一剑啊？");
                        PlayerPerform("pause", 2);
                        PlayerPerform("say", "不！！！师兄！！师兄！！");
                        PlayerPerform("pause", 2);
                        PlayerPerform("say", "啊……");
                        PlayerPerform("pause", 4);
			PlayerPerform("block", 1);

                        trg0 = 4;
                }          
        }
        if (trg0 == 4)        
        {                   
		c = GetChar("履面");
                if (c>=0 && GetHP(c)<18000)  
                {      
                        Perform(c, "say", "接受现实吧，你永远不是我的对手！！哈哈哈哈！！");
                        Perform(c, "pause", 2);       
                        Perform(c, "say", "哼，无知的鼠辈");
                        Perform(c, "pause", 2);
                        Perform(c, "say", "比起你师兄，你差远了"); 
  
                  	PlayerPerform("block", 0);
			PlayerPerform("use", 19);
			PlayerPerform("use", 8);
                        PlayerPerform("say", "你，去死吧！！！");
                        PlayerPerform("pause", 4);
                        PlayerPerform("say", "……就算死我也要杀了你！！！");
                        PlayerPerform("pause", 4);
			PlayerPerform("block", 1);

                        trg0 = 5;
                }          
        }
        if (trg0 == 5)        
        {                   
		c = GetChar("履面"); 
                if (c>=0 && GetHP(c)<12000)  
                {      
                        Perform(c, "say", "（可恶，想不到这小子还很棘手啊）"); 

                        trg0 = 6;
                }          
        }
        if (trg0 == 6)        
        {                   
		c = GetChar("履面"); 
                if (c>=0 && GetHP(c)<5000)  
                { 
                        Perform(c, "say", "哼哼哼哼");
                        Perform(c, "pause", 10); 
                        Perform(c, "say", "密法--心稗！！！");
                        Perform(c, "pause", 2);              
                        Perform(c, "say", "看招！！！");
                        Perform(c, "pause", 3);
                        Perform(c, "say", "哼，有破绽！！！"); 
                        Perform(c, "pause", 3);

                  	PlayerPerform("block", 0);
                        PlayerPerform("pause", 3);
                        PlayerPerform("say", "怎么会？？啊！！我的头……好痛……");
                        PlayerPerform("pause", 3);
                        PlayerPerform("say", "好痛啊！！！");
                        PlayerPerform("pause", 3);
                        PlayerPerform("say", "啊！！！！！！啊！！！！！！");
                        PlayerPerform("pause", 3);
                        PlayerPerform("say", "唔！！！");
                        PlayerPerform("pause", 8);
                        PlayerPerform("say", "（可恶，我根本打不赢他……）");
                        PlayerPerform("pause", 2);
			PlayerPerform("block", 1);

                        trg0 = 7;  
                }          
        }
        if (trg0 == 7)        
        {  
		c = GetChar("履面");
                if (c>=0 && GetHP(c)<3000) 
                {     
                        Perform(c, "say", "为我杀人！！成为我的奴隶！！！");
                        Perform(c, "pause", 3);       
                        Perform(c, "say", "听着！从今以后你不再是以前的离落，你将成为我的杀手！！");
                        Perform(c, "pause", 3);
                        Perform(c, "say", "哼哼哼，杀了你？没那么容易……我要让你生不如死！！！"); 
                        Perform(c, "pause", 3);
                        Perform(c, "say", "哈哈，撑不住了吧！！！"); 
                        Perform(c, "pause", 3);

                        PlayerPerform("pause", 2);
                        PlayerPerform("say", "是……主人……");
                        PlayerPerform("pause", 10);
                        PlayerPerform("say", "杀了我……杀了我……啊……！！");
                        PlayerPerform("pause", 5);
                        PlayerPerform("say", "唔……");

                        trg0 = 8;
                        timer0 = now + 18;
                }      
        } 
        if (trg0 == 8 && now>timer0)        
        {  
		c = GetChar("履面");
                if (c>=0) 
                {     
                        RemoveNPC(c);
                        trg0 = 10;
                        timer1 = now + 3;
			gameover = 1;
                }
        }  
	if (gameover!=-1 && GetHP(player)<=0)
	{
		gameover = -1;
		timer1 = now + 2; 
	}	
	if ((gameover==1 || gameover==-1) && now>timer1)
	{
		GameOver(gameover);
		gameover = 2;
	}
}
     
















	
	