class 1 royal_rush_party_private_hate : party_private
{
parameter:
	int	MobHate = 1024257;
	int	SelfBuff = 1040641;

handler:
	EventHandler CREATED()
	{
		if( myself::Skill_GetConsumeMP(SelfBuff) < myself.sm.mp && myself::Skill_GetConsumeHP(SelfBuff) < myself.sm.hp && myself::Skill_InReuseDelay(SelfBuff) == 0 )
		{
			myself::AddUseSkillDesire(myself.sm,SelfBuff,1,1,1000000);
		}
		super;
	}

	EventHandler ATTACKED(attacker,damage)
	{
		if( attacker.is_pc != 0 || myself::IsInCategory(11,attacker.npc_class_id) )
		{
			if( myself::IsNullCreature(myself.top_desire_target) == 0 )
			{
				if( gg::Rand(100) < 33 && myself.top_desire_target == attacker )
				{
					if( myself::Skill_GetConsumeMP(MobHate) < myself.sm.mp && myself::Skill_GetConsumeHP(MobHate) < myself.sm.hp && myself::Skill_InReuseDelay(MobHate) == 0 )
					{
						myself::AddUseSkillDesire(attacker,MobHate,0,1,1000000);
					}
				}
			}
		}
		super;
	}

	EventHandler PARTY_ATTACKED(attacker,private,damage)
	{
		if( gg::Rand(100) < 10 )
		{
			if( myself::Skill_GetConsumeMP(MobHate) < myself.sm.mp && myself::Skill_GetConsumeHP(MobHate) < myself.sm.hp && myself::Skill_InReuseDelay(MobHate) == 0 )
			{
				myself::AddUseSkillDesire(attacker,MobHate,0,1,1000000);
			}
		}
		super;
	}

}
