@LabelIndex 37843
@StringIndex 0
class 0 royal_rush_wizard_rangedebuff : royal_rush_wizard_ddmagic2 {
parameter:
	int	W_RangeDeBuff = 272629761;

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

}
