@LabelIndex 18168
@StringIndex 0
class 0 wizard_ddmagic2_curse : wizard_ddmagic2 {
parameter:
	int	W_ShortRangeDDMagic = 272629761;
	int	W_LongRangeDDMagic = 272039937;
	int	DeBuff = 264568833;

handler:
	EventHandler ATTACKED(attacker,damage,i6,h0,i0) {
		super;
		h0 = myself::GetMaxHateInfo(0);
		if( ( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) && myself.i_ai0 == 0 ) {
			i0 = 0;
			if( myself::IsNullHateInfo(h0) == 0 ) {
				if( myself::IsNullCreature(h0.creature) == 0 ) {
					i0 = 1;
				}
			}
			if( gg::Rand(100) < 33 && gg::GetAbnormalLevel(attacker,myself::Skill_GetAbnormalType(DeBuff)) <= 0 && i0 == 1 ) {
				if( myself::Skill_GetConsumeMP(DeBuff) < myself.sm.mp && myself::Skill_GetConsumeHP(DeBuff) < myself.sm.hp ) {
					if( myself::Skill_InReuseDelay(DeBuff) == 0 ) {
						myself::AddUseSkillDesire(attacker,DeBuff,0,1,1000000);
					} else {
						myself::AddUseSkillDesire(attacker,DeBuff,0,1,1000000);
					}
				} else {
					myself.i_ai0 = 1;
					myself::AddAttackDesire(attacker,1,1000);
				}
			}
		}
		super;
	}

	EventHandler CLAN_ATTACKED(attacker,damage,i6) {
		if( ( myself::GetLifeTime() > 7 && ( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) ) && myself::GetHateInfoCount() == 0 ) {
			if( gg::Rand(100) < 33 && gg::GetAbnormalLevel(attacker,myself::Skill_GetAbnormalType(DeBuff)) <= 0 ) {
				if( myself::Skill_GetConsumeMP(DeBuff) < myself.sm.mp && myself::Skill_GetConsumeHP(DeBuff) < myself.sm.hp ) {
					if( myself::Skill_InReuseDelay(DeBuff) == 0 ) {
						myself::AddUseSkillDesire(attacker,DeBuff,0,1,1000000);
					} else {
						myself::AddUseSkillDesire(attacker,DeBuff,0,1,1000000);
					}
				} else {
					myself.i_ai0 = 1;
					myself::AddAttackDesire(attacker,1,1000);
				}
			}
		}
		super;
	}

}
