@LabelIndex 20772
@StringIndex 0
class 0 ai_boss03_riba_iren : default_npc {
parameter:
	float	Attack_DecayRatio = 6.600000;
	float	UseSkill_DecayRatio = 66000.000000;
	float	Attack_BoostValue = 500.000000;
	float	UseSkill_BoostValue = 100000.000000;
	int	different_level_9_attacked = 295895041;
	int	different_level_9_see_spelled = 276234241;

handler:
	EventHandler NO_DESIRE() {
		myself::AddMoveAroundDesire(5,5);
	}

	EventHandler ATTACKED(attacker,damage) {
		if( attacker.level > ( myself.sm.level + 8 ) ) {
			if( gg::GetAbnormalLevel(attacker,myself::Skill_GetAbnormalType(different_level_9_attacked)) == -1 ) {
				if( different_level_9_attacked == 295895041 ) {
					myself::CastBuffForQuestReward(attacker,different_level_9_attacked);
					myself::RemoveAttackDesire(attacker.id);
					return;
				} else {
					myself::CastBuffForQuestReward(attacker,different_level_9_attacked);
				}
			}
		}
		if( ( myself.sm.max_hp / 2 ) > myself.sm.hp ) {
			if( myself::Skill_GetConsumeMP(295960577) < myself.sm.mp && myself::Skill_GetConsumeHP(295960577) < myself.sm.hp && myself::Skill_InReuseDelay(295960577) == 0 ) {
				myself::AddUseSkillDesire(myself.sm,295960577,1,1,1000000);
			}
		}
	}

	EventHandler SEE_SPELL(speller,skill_name_id) {
		if( speller.level > ( myself.sm.level + 8 ) ) {
			if( gg::GetAbnormalLevel(speller,myself::Skill_GetAbnormalType(different_level_9_see_spelled)) == -1 ) {
				if( different_level_9_see_spelled == 295895041 ) {
					myself::CastBuffForQuestReward(speller,different_level_9_see_spelled);
					myself::RemoveAttackDesire(speller.id);
					return;
				} else {
					myself::CastBuffForQuestReward(speller,different_level_9_see_spelled);
				}
			}
		}
	}

	EventHandler CLAN_ATTACKED(attacker,victim,damage) {
		if( attacker.level <= ( myself.sm.level + 8 ) ) {
			if( victim.class_id == 1029014 ) {
				if( ( victim.max_hp / 2 ) > victim.hp && gg::Rand(100) < 90 ) {
					if( myself::Skill_GetConsumeMP(295960577) < myself.sm.mp && myself::Skill_GetConsumeHP(295960577) < myself.sm.hp && myself::Skill_InReuseDelay(295960577) == 0 ) {
						myself::AddUseSkillDesire(victim,295960577,1,1,1000000);
					}
				}
			} else if( victim.class_id == 1029018 ) {
			} else if( ( victim.max_hp / 2 ) > victim.hp && gg::Rand(100) < 10 ) {
				if( myself::Skill_GetConsumeMP(295960577) < myself.sm.mp && myself::Skill_GetConsumeHP(295960577) < myself.sm.hp && myself::Skill_InReuseDelay(295960577) == 0 ) {
					myself::AddUseSkillDesire(victim,295960577,1,1,1000000);
				}
			}
		}
	}

	EventHandler SEE_CREATURE(creature) {
		if( creature.level > ( myself.sm.level + 8 ) ) {
			if( gg::GetAbnormalLevel(creature,myself::Skill_GetAbnormalType(different_level_9_attacked)) == -1 ) {
				if( different_level_9_attacked == 295895041 ) {
					myself::CastBuffForQuestReward(creature,different_level_9_attacked);
					myself::RemoveAttackDesire(creature.id);
					return;
				} else {
					myself::CastBuffForQuestReward(creature,different_level_9_attacked);
				}
			}
		} else {
			super;
		}
	}

}
