@LabelIndex 56144
@StringIndex 0
class 0 royal_rush_heretic_bomb : royal_rush_bomb {
handler:
	EventHandler CREATED() {
		myself.i_ai4 = 0;
		super;
	}

	EventHandler ATTACKED(attacker,i0) {
		if( myself.p_state != 3 && myself.p_state != 10 ) {
			if( myself.i_ai4 == 0 ) {
				myself.i_ai4 = 1;
			}
		}
		super;
	}

	EventHandler CLAN_ATTACKED(attacker,i0) {
		if( myself.p_state != 3 && myself.p_state != 10 ) {
			if( myself.i_ai4 == 0 ) {
				myself.i_ai4 = 1;
			}
		}
		super;
	}

	EventHandler OUT_OF_TERRITORY() {
		if( myself.i_ai4 == 0 ) {
			myself::RemoveAllAttackDesire();
			myself::AddMoveToDesire(myself.start_x,myself.start_y,myself.start_z,100);
		}
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,i0,c0) {
		if( script_event_arg1 == 10033 ) {
			c0 = gg::GetCreatureFromIndex(script_event_arg2);
			if( myself::IsNullCreature(c0) == 0 ) {
				myself.i_ai4 = 1;
				myself::RemoveAllAttackDesire();
				if( c0.is_pc != 0 || myself::IsInCategory(12,c0.class_id) ) {
					myself::AddAttackDesire(c0,1,( 1 * 200 ));
				}
			}
		} else if( script_event_arg1 == 10035 ) {
			myself.i_ai4 = 0;
			myself::RemoveAllAttackDesire();
			myself::AddMoveToDesire(myself.start_x,myself.start_y,myself.start_z,100);
		} else if( script_event_arg1 == 10002 ) {
			c0 = gg::GetCreatureFromIndex(script_event_arg2);
			if( myself::IsNullCreature(c0) == 0 ) {
				myself::RemoveAllAttackDesire();
				if( c0.is_pc != 0 || myself::IsInCategory(12,c0.class_id) ) {
					myself::AddAttackDesire(c0,1,( 1 * 200 ));
				}
			}
		}
	}

}
