@LabelIndex 36515
@StringIndex 0
class 0 warrior_corpse_ghost_ddmagic : warrior_corpse_ghost_basic {
parameter:
	int	DDMagic = 262209537;

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

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

}
