class 1 angel_killer : warrior_pa_casting_3skill_magical2
{
handler:
	EventHandler ATTACKED(attacker,c1,damage,i0)
	{
		myself::SetCurrentQuestID(348);
		if( attacker.master )
		{
			attacker = attacker.master;
		}
		if( myself::HaveMemo(attacker,348) && myself::GetMemoStateEx(attacker,348,0) < 8 && ( ( myself::GetMemoStateEx(attacker,348,1) % 100 ) / 10 ) == 1 && myself::OwnItemCount(attacker,4291) == 0 && myself::OwnItemCount(attacker,4398) == 0 )
		{
			if( myself.sm.hp < ( myself.sm.max_hp * 0.300000 ) )
			{
				i0 = myself::GetMemoStateEx(attacker,348,1);
				i0 = ( i0 + 10 );
				myself::SetMemoStateEx(attacker,348,1,i0);
				if( ( i0 % 10 ) == 0 )
				{
					myself::DeleteRadar(attacker,-2908,44128,-2712,1);
					myself::ShowRadar(attacker,-2908,44128,-2712,1);
				}
				else
				{
					myself::SetFlagJournal(attacker,348,19);
				}
				myself::Say(myself::MakeFString(34830,"","","","",""));
				myself::Despawn();
			}
		}
		else if( myself::HaveMemo(attacker,348) && myself::GetMemoStateEx(attacker,348,0) < 8 && ( ( myself::GetMemoStateEx(attacker,348,1) % 100 ) / 10 ) == 2 && myself::OwnItemCount(attacker,4291) == 0 && myself::OwnItemCount(attacker,4398) == 0 )
		{
			myself::Say(myself::MakeFString(34839,"","","","",""));
			myself::Despawn();
		}
		else if( myself::HaveMemo(attacker,348) && ( myself::OwnItemCount(attacker,4291) >= 1 || myself::OwnItemCount(attacker,4398) >= 1 ) )
		{
			myself::Say(myself::MakeFString(34839,"","","","",""));
			myself::Despawn();
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(c0,timer_id)
	{
		myself::SetCurrentQuestID(348);
		if( timer_id == 34801 )
		{
			myself::Despawn();
		}
		super;
	}

	EventHandler CREATED(i0)
	{
		myself::SetCurrentQuestID(348);
		myself::AddTimerEx(34801,( 1000 * 600 ));
		myself::Say(myself::MakeFString(34831,"","","","",""));
		super;
	}

}
