@LabelIndex 101563
@StringIndex 11701
class 0 wizard_portarea : wizard_basic {
parameter:
	int	FieldCycle2 = 1;
	int	FieldCycle2_Condition = 101;
	int	FieldCycle2_Quantity = 10;
	int	Threshold_Level_Min2 = 1;
	int	Threshold_Level_Max2 = 2;
	int	Threshold_Point_Min2 = 0;
	int	Threshold_Point_Max2 = 1000000000;

handler:
	EventHandler CREATED() {
		myself::AddTimerEx(1300,10000);
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id,i0) {
		if( timer_id == 1300 ) {
			i0 = gg::GetStep_FieldCycle(FieldCycle);
			if( myself::IsMyBossAlive() == 0 && ( i0 < Threshold_Level_Min || i0 > Threshold_Level_Max ) ) {
				if( myself::IsInCombatMode(myself.sm) == 0 ) {
					myself::Despawn();
				}
			}
		} else if( timer_id == 1399 ) {
			myself::Despawn();
		}
		super;
	}

	EventHandler PARTY_DIED(attacker,private,i0,i1) {
		if( private == myself.boss && myself.sm.alive != 0 ) {
			if( FieldCycle2 != -1 && FieldCycle2_Condition == 101 ) {
				i0 = gg::GetStep_FieldCycle(FieldCycle2);
				if( i0 >= Threshold_Level_Min2 && i0 <= Threshold_Level_Max2 ) {
					gg::AddPoint_FieldCycle(FieldCycle2,FieldCycle2_Quantity,3,attacker);
				}
				myself::RemoveAllDesire();
				myself::Say(gg::MakeFString(1800024,"","","","",""));
				myself::AddTimerEx(1399,1500);
			}
		}
		super;
	}

}
