@LabelIndex 56932
@StringIndex 0
class 0 wizard_ddmagic2_heal_clan : wizard_ddmagic2 {
parameter:
	int	MagicHeal = 458752001;

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

	EventHandler PARTY_ATTACKED(attacker,private) {
		if( private == myself.boss && myself.i_ai2 == 0 ) {
			if( private.hp < ( private.max_hp * 0.500000 ) ) {
				if( myself::Skill_GetConsumeMP(MagicHeal) < myself.sm.mp && myself::Skill_GetConsumeHP(MagicHeal) < myself.sm.hp && myself::Skill_InReuseDelay(MagicHeal) == 0 ) {
					myself::AddUseSkillDesire(private,MagicHeal,1,1,1000000);
				}
			}
		}
		super;
	}

	EventHandler USE_SKILL_FINISHED(target,skill_name_id) {
		if( skill_name_id == MagicHeal ) {
			myself.i_ai2 = 1;
			myself::AddTimerEx(777,( 2 * 1000 ));
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id) {
		if( timer_id == 777 ) {
			if( myself.i_ai2 == 1 ) {
				myself.i_ai2 = 0;
			}
		}
		super;
	}

}
