@LabelIndex 103640
@StringIndex 12131
class 0 ai_favored_darion : warrior_basic {
parameter:
	int	my_floor = 0;
	int	my_room = 0;
	int	my_level = 0;
	string	challanger_maker_name = "gludio58_1926_700m1";

handler:
	EventHandler CREATED() {
		myself::AddTimerEx(78001,( ( 3 * 60 ) * 1000 ));
	}

	EventHandler TIMER_FIRED_EX(timer_id,maker0) {
		if( timer_id == 78001 ) {
			if( myself.p_state != 3 && myself.p_state != 10 && gg::FloatToInt(myself.sm.hp) == gg::FloatToInt(myself.sm.max_hp) ) {
				maker0 = gg::GetNpcMaker(challanger_maker_name);
				if( gg::IsNull(maker0) == 0 ) {
					gg::SendMakerScriptEvent(maker0,78010039,0,0);
				}
				myself::Despawn();
			} else {
				myself::AddTimerEx(78001,( ( 3 * 60 ) * 1000 ));
			}
		}
		super;
	}

	EventHandler USE_SKILL_FINISHED(target,skill_name_id) {
		if( skill_name_id == Skill04_ID && myself::IsNullCreature(target) == 0 ) {
			myself::Say(gg::MakeFString(1800129,target.name,"","","",""));
			gg::SetNpcParam(target,9,( target.hp - ( target.hp / ( 10 - my_level ) ) ));
			gg::SetNpcParam(myself.sm,9,( myself.sm.hp + ( 10 - my_level ) ));
		}
		super;
	}

	EventHandler MY_DYING(attacker) {
		if( my_level == 3 || my_level == 6 ) {
			myself::Shout(gg::MakeFString(1800130,"","","","",""));
		} else if( myself::IsNullCreature(attacker) == 0 ) {
			myself::Shout(gg::MakeFString(1800131,attacker.name,"","","",""));
		}
		super;
	}

}
