@LabelIndex 15818
@StringIndex 0
class 0 party_leader_physicalspecial2 : party_leader {
parameter:
	int	PhysicalSpecial = 458752001;
	int	PhysicalSpecial2 = 458752001;

handler:
	EventHandler CREATED() {
		myself.i_ai0 = 0;
		super;
	}

	EventHandler ATTACKED(attacker) {
		if( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) {
			if( myself::IsNullCreature(myself.top_desire_target) == 0 ) {
				if( gg::Rand(100) < 33 && myself.top_desire_target == attacker && myself::DistFromMe(attacker) >= 40 ) {
					if( myself::Skill_GetConsumeMP(PhysicalSpecial2) < myself.sm.mp && myself::Skill_GetConsumeHP(PhysicalSpecial2) < myself.sm.hp && myself::Skill_InReuseDelay(PhysicalSpecial2) == 0 ) {
						myself::AddUseSkillDesire(attacker,PhysicalSpecial2,0,1,1000000);
					}
				}
				if( gg::Rand(100) < 33 && myself.top_desire_target == attacker && myself::DistFromMe(attacker) < 40 ) {
					if( myself::Skill_GetConsumeMP(PhysicalSpecial) < myself.sm.mp && myself::Skill_GetConsumeHP(PhysicalSpecial) < myself.sm.hp && myself::Skill_InReuseDelay(PhysicalSpecial) == 0 ) {
						myself::AddUseSkillDesire(attacker,PhysicalSpecial,0,1,1000000);
					}
				}
			}
		}
		super;
	}

	EventHandler CLAN_ATTACKED(attacker,damage,i6) {
		if( myself::GetLifeTime() > 7 && ( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) ) {
			if( myself::IsNullCreature(myself.top_desire_target) == 0 ) {
				if( gg::Rand(100) < 33 && myself.top_desire_target == attacker && myself::DistFromMe(attacker) >= 40 ) {
					if( myself::Skill_GetConsumeMP(PhysicalSpecial2) < myself.sm.mp && myself::Skill_GetConsumeHP(PhysicalSpecial2) < myself.sm.hp && myself::Skill_InReuseDelay(PhysicalSpecial2) == 0 ) {
						myself::AddUseSkillDesire(attacker,PhysicalSpecial2,0,1,1000000);
					}
				}
				if( gg::Rand(100) < 33 && myself.top_desire_target == attacker && myself::DistFromMe(attacker) < 40 ) {
					if( myself::Skill_GetConsumeMP(PhysicalSpecial) < myself.sm.mp && myself::Skill_GetConsumeHP(PhysicalSpecial) < myself.sm.hp && myself::Skill_InReuseDelay(PhysicalSpecial) == 0 ) {
						myself::AddUseSkillDesire(attacker,PhysicalSpecial,0,1,1000000);
					}
				}
			}
		}
		super;
	}

}
