@LabelIndex 39028
@StringIndex 0
class 0 warrior_casting_ddmagic_selfbuff : warrior_casting_ddmagic {
parameter:
	int	SelfBuff = 263979009;

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(12,attacker.class_id) ) {
			if( myself.p_state != 3 && myself.p_state != 10 ) {
				if( gg::GetAbnormalLevel(myself.sm,myself::Skill_GetAbnormalType(SelfBuff)) <= 0 ) {
					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;
	}

}
