class 1 warrior_bomb : warrior
{
parameter:
	int	SelfRangeDDMagic = 1032449;

handler:
	EventHandler ATTACKED(attacker,damage)
	{
		if( myself::DistFromMe(attacker) < 200 )
		{
			if( myself::Skill_GetConsumeMP(SelfRangeDDMagic) < myself.sm.mp && myself::Skill_GetConsumeHP(SelfRangeDDMagic) < myself.sm.hp && myself::Skill_InReuseDelay(SelfRangeDDMagic) == 0 )
			{
				myself::AddUseSkillDesire(myself.sm,SelfRangeDDMagic,0,1,1000000);
			}
		}
		super;
	}

	EventHandler USE_SKILL_FINISHED(target,success,skill_name_id)
	{
		if( SelfRangeDDMagic != 0 )
		{
			if( skill_name_id == SelfRangeDDMagic )
			{
				if( success == 1 )
				{
					myself::Suicide();
				}
				else if( myself::Skill_GetConsumeMP(SelfRangeDDMagic) < myself.sm.mp && myself::Skill_GetConsumeHP(SelfRangeDDMagic) < myself.sm.hp && myself::Skill_InReuseDelay(SelfRangeDDMagic) == 0 )
				{
					myself::AddUseSkillDesire(myself.sm,SelfRangeDDMagic,0,1,1000000);
				}
			}
		}
		super;
	}

}
