@LabelIndex 38140
@StringIndex 0
class 0 royal_rush_roomboss_4 : royal_rush_roomboss_basic {
parameter:
	int	ClanBuff1 = 266403841;
	int	RangeDDMagic1 = 264241153;

handler:
	EventHandler CREATED() {
		if( myself::Skill_GetConsumeMP(ClanBuff1) < myself.sm.mp && myself::Skill_GetConsumeHP(ClanBuff1) < myself.sm.hp && myself::Skill_InReuseDelay(ClanBuff1) == 0 ) {
			myself::AddUseSkillDesire(myself.sm,ClanBuff1,1,1,1000000);
		}
		super;
	}

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

	EventHandler CLAN_ATTACKED(attacker,victim,damage) {
		if( gg::Rand(100) < 33 && myself.top_desire_target != attacker ) {
			if( myself::Skill_GetConsumeMP(RangeDDMagic1) < myself.sm.mp && myself::Skill_GetConsumeHP(RangeDDMagic1) < myself.sm.hp && myself::Skill_InReuseDelay(RangeDDMagic1) == 0 ) {
				myself::AddUseSkillDesire(attacker,RangeDDMagic1,0,1,1000000);
			}
		}
		if( gg::Rand(100) < 10 ) {
			if( myself::Skill_GetConsumeMP(ClanBuff1) < myself.sm.mp && myself::Skill_GetConsumeHP(ClanBuff1) < myself.sm.hp && myself::Skill_InReuseDelay(ClanBuff1) == 0 ) {
				myself::AddUseSkillDesire(victim,ClanBuff1,0,1,1000000);
			}
		}
		super;
	}

}
